Advertisement
iFenomenal

Program de noapte furien

Feb 11th, 2019
425
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.42 KB | None | 0 0
  1. #include <amxmodx>
  2.  
  3. new a[6]
  4.  
  5. public plugin_init()
  6. {
  7.    register_plugin("NightMod", "1.0", "eXtream")
  8.  
  9.    set_task(60.0, "task_check_time", 38427236, _, _, "b")
  10. }
  11.  
  12. public task_check_time()
  13. {
  14.    get_time("%H:%M", a, 5)
  15.  
  16.  if (equal(a, "21:58"))
  17.    {
  18.       chat_color(0, "!g[ExtreamCS] !nEste ora !g21:59 !nserverul trece pe setarile de noapte.")
  19.    }
  20.  
  21.    if (equal(a, "21:59"))
  22.    {
  23.       server_cmd("amx_map de_dust2")
  24.       server_cmd("amx_cvar mp_timelimit 0")
  25.    }
  26.        
  27.    if (equal(a, "11:58"))
  28.    {
  29.       chat_color(0, "!g[ExrteamCS] !nEste ora !g11:59 serverul trece pe setarile de zi.")
  30.    }
  31.  
  32.  
  33.    if (equal(a, "11:59"))
  34.    {
  35.       server_cmd("amx_map de_kabul32")
  36.       server_cmd("amx_cvar mp_timelimit 35")
  37.    }
  38. }
  39. stock chat_color(const id, const input[], any:...)
  40. {
  41.    new count = 1, players[32]
  42.  
  43.    static msg[191]
  44.  
  45.    vformat(msg, 190, input, 3)
  46.  
  47.    replace_all(msg, 190, "!g", "^4")
  48.    replace_all(msg, 190, "!n", "^1")
  49.    replace_all(msg, 190, "!t", "^3")
  50.    replace_all(msg, 190, "!t2", "^0")
  51.  
  52.    if (id) players[0] = id; else get_players(players, count, "ch")
  53.    {
  54.       for (new i = 0; i < count; i++)
  55.       {
  56.          if (is_user_connected(players[i]))
  57.          {
  58.             message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
  59.             write_byte(players[i])
  60.             write_string(msg)
  61.             message_end()
  62.          }
  63.       }
  64.    }
  65. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement