Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- new bool:reload_start = false;
- new numPrinted;
- public OnPluginStart()
- {
- RegServerCmd("sm_sync_reload", CMD_VipSYNC_Reload);
- HookEvent("round_end", Event_OnRoundEnd);
- }
- public Event_OnRoundEnd(Handle:event, const String:name[], bool:silent)
- {
- reload_start = true;
- }
- public Action:CMD_VipSYNC_Reload(args) {
- if(reload_start == true)
- {
- reload_start = false;
- PrintToChatAll("\x04[VIP]\x01 Игроки VIP были успешно перезагруженны.");
- numPrinted = 5;
- CreateTimer(1.0, VipSYNC_ReloadCache, _, TIMER_REPEAT);
- }
- }
- public Action:VipSYNC_ReloadCache(Handle:timer)
- {
- if (numPrinted == 0)
- {
- PrintToChatAll("\x04[VIP]\x01 Перезагрузка карты !!!");
- ServerCommand("sm_map de_dust2");
- return Plugin_Stop;
- }
- PrintToChatAll("\x04[VIP]\x01 Смена карты через %i сек.", numPrinted);
- numPrinted--;
- return Plugin_Continue;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement