fog command
-
- Veteran Member
- Posts: 598
- Joined: 7 years ago
- Contact:
- Night Fury
- Mod Developer
- Posts: 677
- Joined: 7 years ago
- Contact:
- #include <zombie_escape>
- #define SVC_DIRECTOR_ID 51
- #define SVC_DIRECTOR_STUFFTEXT_ID 10
- new g_iMaxPlayers
- public plugin_init()
- {
- register_plugin("Unremoveable fog", "1.0", "Jack GamePlay")
- set_task(0.1, "Set_Fog", _, _, _, "b")
- g_iMaxPlayers = get_member_game(m_nMaxPlayers)
- }
- public Set_Fog()
- {
- for (new id = 1; id <= g_iMaxPlayers; id++)
- {
- if (!is_user_connected(id))
- continue
- Send_Cmd(id, "gl_fog 1")
- }
- }
- stock Send_Cmd(id, text[])
- {
- message_begin(MSG_ONE, SVC_DIRECTOR_ID, _, id)
- write_byte(strlen(text) + 2)
- write_byte(SVC_DIRECTOR_STUFFTEXT_ID)
- write_string(text)
- message_end()
- }
Last edited by Raheem 5 years ago, edited 1 time in total.
Reason: Updated code with powerful send_cmd stock to work with steam/nosteam/nonsteam
Reason: Updated code with powerful send_cmd stock to work with steam/nosteam/nonsteam
-
- Veteran Member
- Posts: 598
- Joined: 7 years ago
- Contact:
I have spam in console:
Server tried to send invalid command:"gl_fog 1
"
Server tried to send invalid command:"gl_fog 1
"
Server tried to send invalid command:"gl_fog 1
Can you fix this?
Server tried to send invalid command:"gl_fog 1
"
Server tried to send invalid command:"gl_fog 1
"
Server tried to send invalid command:"gl_fog 1
Can you fix this?
-
- Veteran Member
- Posts: 598
- Joined: 7 years ago
- Contact:
Its working fine. Can you add two extra commands to this? I want force these commands:
gl_fog 1 (done)
cl_minimodels 1
cl_weather 1
gl_fog 1 (done)
cl_minimodels 1
cl_weather 1
- Night Fury
- Mod Developer
- Posts: 677
- Joined: 7 years ago
- Contact:
Add afterczirimbolo wrote: ↑5 years ago Its working fine. Can you add two extra commands to this? I want force these commands:
gl_fog 1 (done)
cl_minimodels 1
cl_weather 1
Code: Select all
Send_Cmd(id, "gl_fog 1")
Code: Select all
Send_Cmd(id, "cl_minimodels 1")
Send_Cmd(id, "cl_weather 1")
Create an account or sign in to join the discussion
You need to be a member in order to post a reply
Create an account
Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute
Sign in
Who is online
Users browsing this forum: No registered users and 2 guests