Advertisement
BM_R1KO

Untitled

Jun 26th, 2017
252
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. new bool:reload_start = false;
  2. new numPrinted;
  3.  
  4. public OnPluginStart()
  5. {
  6.     RegServerCmd("sm_sync_reload", CMD_VipSYNC_Reload);
  7.     HookEvent("round_end", Event_OnRoundEnd);
  8. }
  9.  
  10. public Event_OnRoundEnd(Handle:event, const String:name[], bool:silent)
  11. {
  12.     reload_start = true;
  13. }
  14.  
  15. public Action:CMD_VipSYNC_Reload(args) {
  16.     if(reload_start == true)
  17.     {
  18.         reload_start = false;
  19.         PrintToChatAll("\x04[VIP]\x01 Игроки VIP были успешно перезагруженны.");
  20.         numPrinted = 5;
  21.         CreateTimer(1.0, VipSYNC_ReloadCache, _, TIMER_REPEAT);
  22.     }
  23. }
  24.  
  25. public Action:VipSYNC_ReloadCache(Handle:timer)
  26. {
  27.     if (numPrinted == 0)
  28.     {
  29.         PrintToChatAll("\x04[VIP]\x01 Перезагрузка карты !!!");
  30.         ServerCommand("sm_map de_dust2");
  31.         return Plugin_Stop;
  32.     }
  33.  
  34.     PrintToChatAll("\x04[VIP]\x01 Смена карты через %i сек.", numPrinted);
  35.     numPrinted--;
  36.  
  37.     return Plugin_Continue;
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement