Available fog command

Unpaid Requests, Public Plugins
Post Reply
czirimbolo
Veteran Member
Veteran Member
Poland
Posts: 598
Joined: 7 years ago
Contact:

fog command

#1

Post by czirimbolo » 5 years ago

Hello,

can someone make a plugin which can force gl_fog 1 command?
Image

User avatar
Night Fury
Mod Developer
Mod Developer
Posts: 677
Joined: 7 years ago
Contact:

#2

Post by Night Fury » 5 years ago

  1. #include <zombie_escape>
  2.  
  3. #define SVC_DIRECTOR_ID 51
  4. #define SVC_DIRECTOR_STUFFTEXT_ID 10
  5.  
  6. new g_iMaxPlayers
  7.  
  8. public plugin_init()
  9. {
  10.     register_plugin("Unremoveable fog", "1.0", "Jack GamePlay")
  11.    
  12.     set_task(0.1, "Set_Fog", _, _, _, "b")
  13.    
  14.     g_iMaxPlayers = get_member_game(m_nMaxPlayers)
  15. }
  16.  
  17. public Set_Fog()
  18. {
  19.     for (new id = 1; id <= g_iMaxPlayers; id++)
  20.     {
  21.         if (!is_user_connected(id))
  22.             continue
  23.  
  24.         Send_Cmd(id, "gl_fog 1")
  25.     }
  26. }
  27.  
  28. stock Send_Cmd(id, text[])
  29. {
  30.     message_begin(MSG_ONE, SVC_DIRECTOR_ID, _, id)
  31.     write_byte(strlen(text) + 2)
  32.     write_byte(SVC_DIRECTOR_STUFFTEXT_ID)
  33.     write_string(text)
  34.     message_end()
  35. }
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
Want your own mod edition? PM me.
Accepting private projects.
Discord: Fury#7469
Image

czirimbolo
Veteran Member
Veteran Member
Poland
Posts: 598
Joined: 7 years ago
Contact:

#3

Post by czirimbolo » 5 years ago

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?
Image

User avatar
Raheem
Mod Developer
Mod Developer
Posts: 2214
Joined: 7 years ago
Contact:

#4

Post by Raheem » 5 years ago

Fixed. check now.
He who fails to plan is planning to fail

czirimbolo
Veteran Member
Veteran Member
Poland
Posts: 598
Joined: 7 years ago
Contact:

#5

Post by czirimbolo » 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
Image

User avatar
Night Fury
Mod Developer
Mod Developer
Posts: 677
Joined: 7 years ago
Contact:

#6

Post by Night Fury » 5 years ago

czirimbolo 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
Add after

Code: Select all

Send_Cmd(id, "gl_fog 1")
:

Code: Select all

Send_Cmd(id, "cl_minimodels 1")
Send_Cmd(id, "cl_weather 1")
Want your own mod edition? PM me.
Accepting private projects.
Discord: Fury#7469
Image

Post Reply

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

Register

Sign in

Who is online

Users browsing this forum: No registered users and 2 guests