Help! [+REP] - 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)
+--- Thread: Help! [+REP] (
/showthread.php?tid=340629)
Help! [+REP] -
NeonPotatoz - 08.05.2012
Well I'm attempting to make a package hunt minigame and some other pickup - minigame. Now I've got the basics done, all that's confusing me is the timer.
Snip:
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(response)
{
switch(dialogid)
{
case 110:
{
switch(listitem)
{
case 0:
{
SendClientMessageToAll(0x33AA33AA, "[Package Hunt] You Have 1 Minute to find Me! [Hint: 'I hang above /sf'] [Reward: +150 Score]");
package1 == CreatePickup(1210, 11, -2080.5066, 296.6889, 69.7718, -1);
SetTimerEx("timerend", 60000, false, "i", 1337);
}
case 1:
{
}
case 2:
{
}
}
}
}
}
return 1;
}
Now I want every one of them to start a timer of 1 minute. And at the end of the timer, if the pickup (briefcase) got picked up, killed timer, but if not, then it gives a "SendClientMessage"... A little help... Btw Don't mind how the script looks... It's to suit for the forum.
Re: Help! [+REP] -
HDFord - 08.05.2012
You have named the timer timerend how do this.
pawn Код:
forward timerend(playerid);
public timerend(playerid)
{
//sendclientmessage the public timerid is what happens when the timer is done
return 1;
}
When give a name to the timer.
pawn Код:
timerendA = SetTimerEx("timerend",6000,false,"i",3550);
Then you need to KillTimer OnPlayerEnterChecpoint KillTimer(timerendA);