[HELP] timers - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP] timers (
/showthread.php?tid=88426)
[HELP] timers -
argon - 26.07.2009
Like im buildin a CP
And at onplayerentercheckpoint how to make if checkpoint entered like in 5 mins SendClientMessage(playerid,RED,"Hello world");
If you want you can help me better via xfire
xfire:zomg2
Re: [HELP] timers -
Born2die - 26.07.2009
So your goal is to send a message after 5 minutes in that CP?
Re: [HELP] timers -
James_Alex - 26.07.2009
use "SetTimerEx"
visit
https://sampwiki.blast.hk/wiki/SetTimerEx for more help
Re: [HELP] timers -
argon - 26.07.2009
Nope born
My goal is to have a cp, and player has 5 mins to get there to have that text
if he reaches after 5 mins appear a message sayin you loose
and i didnt understand that wiki SetTimerEx
Re: [HELP] timers -
argon - 26.07.2009
LIL help?
Re: [HELP] timers -
member - 26.07.2009
Here, I'll show you an example:
Put this under OnGameModeInit:
pawn Код:
new bool:PlayerInGame[MAX_PLAYERS] = false;
Then when you want the player's 5 minute timer to start put this:
pawn Код:
SetTimerEx("GameOver", 300000, false, "d", playerid);
PlayerInGame[playerid] = true;
Then your OnPlayerEnter Checkpoint should look something like this:
pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
if(PlayerInGame[playerid])
{
SendClientMessage(i, AAD_COLOR_RED, "Well done You have made it before the 5 minutes!!");
/// Do Something here
}
else
{
SendClientMessage(i, AAD_COLOR_RED, "You're too late!");
}
return 1;
}
and put this somewhere in your script (outside any commands and callbacks), like right at the bottom of your script:
pawn Код:
public GameOver(playerid)
{
SendClientMessage(playerid, 0xFF8080FF, "Game Over Bitch - You're 5 Minutes are up, too bad :P");
PlayerInGame[playerid] = false;
//// Do Something here to punish the player or whatever when his time is up.
return 1;
}
Re: [HELP] timers -
argon - 26.07.2009
Thanks dude.
Ima study that!
Re: [HELP] timers -
argon - 26.07.2009
Wow wow wowowowo
I got errors after errors
please help via teamviewer
but add xfire zomg2
so i can give teamviewer data!
Re: [HELP] timers -
member - 26.07.2009
what errors do you have post the error lines along with the errors or give me your msn. No Xfire