Timers screwed up
#1

Hey.
I'm having a problem with my timers.
Once they worked perfectly,But then i left my server,Came back today,And suddenly,All the timers screwed up.
I Mean,I've made some SendClientMessage's and GameTextForPlayer.. and more,So instead of sending a 1 client message in a minute,It sends 3 messages,
And stops working.I didn't change something from yesterday,But anyway i'll show you the codes:
top:
pawn Код:
forward VgodMsg(playerid);
forward Cheater(playerid);
forward RandomMsg(playerid);
OnPlayerConnect:
pawn Код:
SetTimer("RandomMsg",100000,0);
    SetTimer("VgodMsg",150000,0);
    SetTimer("Cheater",400000,0);
bottom:
pawn Код:
public RandomMsg(playerid)
{
    SendClientMessage(playerid,0xFFFFBFFF,"Forgot the commands? Check /Commands!");
    SendClientMessage(playerid,0xAAAA00FF,"Tired of standing in the same place?! Check our /Teles!");
    GameTextForAll("~R~/Commands,~G~/teles!",2000,5);
}
public VgodMsg(playerid)
{
    GameTextForAll("~y~Use /vgod on to get an ~n~invincible vehicle!",3000,5);
}
public Cheater(playerid)
{
    SendClientMessageToAll(0xFFFF80FF,"Think You've Spotted A Cheater?Use /Report to Alarm The admins that are online!");
    GameTextForAll("~r~/Report !",2567,5);
}
Does anyone knows the problem?
Thanks in advance.
Reply
#2

To keep them looping (i think thats what you want?) put repeating to true

pawn Код:
SetTimer("RandomMsg",100000,true);
SetTimer("VgodMsg",150000,true);
SetTimer("Cheater",400000,true);

EDIT: These timers only work for ID 0
This is if you want it to show for everyone.
pawn Код:
public RandomMsg(playerid)
{
SendClientMessageToAll(0xFFFFBFFF,"Forgot the commands? Check /Commands!");
SendClientMessageToAll(0xAAAA00FF,"Tired of standing in the same place?! Check our /Teles!");
GameTextForAll("~R~/Commands,~G~/teles!",2000,5);
}
public VgodMsg(playerid)
{
GameTextForAll("~y~Use /vgod on to get an ~n~invincible vehicle!",3000,5);
}
public Cheater(playerid)
{
SendClientMessageToAll(0xFFFF80FF,"Think You've Spotted A Cheater?Use /Report to Alarm The admins that are online!");
GameTextForAll("~r~/Report !",2567,5);
}
Reply
#3

Quote:
Originally Posted by Awaran[Enemy-Plus
; ]
To keep them looping (i think thats what you want?) put repeating to true

pawn Код:
SetTimer("RandomMsg",100000,true);
SetTimer("VgodMsg",150000,true);
SetTimer("Cheater",400000,true);
Ok i'll try thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)