[Question]Timers...
#1

How can I make Timer that will be for whole server...

For example, when someone makes /ad...than that starts timer(about 60 sec.) and if someone tries to type in /ad with he will get some message that he need to wait 60 sec's..?
Reply
#2

Код:
// Top
new AntiAdSpam;
forward ResetAntiAdSpam();

// Ongamemodeinit
AntiAdSpam = 0;

// Command => ad
if (AntiAdSpam) { SendClientMessage ... return 1; }
AntiAdSpam = 1;
SetTimerEx("ResetAntiAdSpam", 60000, false);

// Functions
public ResetAntiAdSpam()
{
AntiAdSpam = 0;
return 1;
}
Reply
#3

Quote:
Originally Posted by Arrows73
Посмотреть сообщение
Код:
// Top
new AntiAdSpam;
forward ResetAntiAdSpam();

// Ongamemodeinit
AntiAdSpam = 0;

// Command => ad
if (AntiAdSpam) { SendClientMessage ... return 1; }
AntiAdSpam = 1;
SetTimerEx("ResetAntiAdSpam", 60000, false);

// Functions
public ResetAntiAdSpam()
{
AntiAdSpam = 0;
return 1;
}
I get 1 warning...

Код:
C:\Users\CrTheVirus\Desktop\Samp Server\[SAMP 0.3] - Razer\gamemodes\razer.pwn(20032) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664              Copyright © 1997-2006, ITB CompuPhase


1 Warning.
Line 20032 :
pawn Код:
SetTimerEx("ResetAntiAdSpam", 60000, false);
Reply
#4

Quote:
Originally Posted by Alex_Valde
Посмотреть сообщение
I get 1 warning...

Код:
C:\Users\CrTheVirus\Desktop\Samp Server\[SAMP 0.3] - Razer\gamemodes\razer.pwn(20032) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664              Copyright © 1997-2006, ITB CompuPhase


1 Warning.
Line 20032 :
pawn Код:
SetTimerEx("ResetAntiAdSpam", 60000, false);
EDIT: Woops...my bad :S ...Thanks dude!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)