Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- new bool:CoolDown = false;
- public OnMapStart()
- {
- CreateTimer(15.0, CoolDown1, _, TIMER_FLAG_NO_MAPCHANGE);
- }
- public OnPluginStart()
- {
- AddCommandListener(CommandListener);
- }
- public Action:CommandListener(client, const String:command[], args)
- {
- if (StrEqual(command, "callvote", false))
- {
- new String:arg1[16];
- GetCmdArg(1, arg1, sizeof(arg1));
- if (StrEqual(arg1, "restartgame", false))
- {
- if(CoolDown == true)
- {
- CoolDown = false;
- CreateTimer(15.0, CoolDown2, _, TIMER_REPEAT|TIMER_FLAG_NO_MAPCHANGE);
- return Plugin_Continue;
- }
- else
- {
- CreateTimer(15.0, CoolDown3, _, TIMER_REPEAT|TIMER_FLAG_NO_MAPCHANGE);
- PrintToChatAll("Идёт кулдаун")
- return Plugin_Handled;
- }
- }
- }
- return Plugin_Continue;
- }
- public Action CoolDown1(Handle timer)
- {
- CoolDown = true;
- }
- public Action CoolDown2(Handle timer)
- {
- CoolDown = true;
- }
- public Action CoolDown3(Handle timer)
- {
- CoolDown = true;
- }
Advertisement
Add Comment
Please, Sign In to add comment