Seatbelt crash - 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: Seatbelt crash (
/showthread.php?tid=169898)
Seatbelt crash -
Typhome - 21.08.2010
When crashing, will:
Код:
TimerStack = SetTimerEx("DisablePlayerKnockout",3500,1,"i",playerid);
Код:
public DisablePlayerKnockout(playerid)
{
TogglePlayerControllable(playerid, 1);
SendClientMessage(playerid, COLOR_GREEN, "You have recovered from the shock. You can drive again.");
KillTimer(TimerStack);
return 1;
}
But it's still spamming text: You have recovered from the shock... (and freezez, unfreezes, freezes, etc)
What problem's? :S
Re: Seatbelt crash -
CracK - 21.08.2010
You must have an array of timer ids.
Like this:
Код:
new TimerStack[MAX_PLAYERS];
TimerStack[playerid] = SetTimerEx("DisablePlayerKnockout",3500,0,"i",playerid);
KillTimer(TimerStack[playerid]);
Edit: I was a fail ninja at first.
Re: Seatbelt crash -
Vetle - 21.08.2010
Код:
TimerStack = SetTimerEx("DisablePlayerKnockout",3500,0,"i",playerid);
Edit: ninja'd
Re: Seatbelt crash -
Typhome - 21.08.2010
Quote:
Originally Posted by CracK
You must have an array of timer ids.
Like this:
Код:
new TimerStack[MAX_PLAYERS];
TimerStack[playerid] = SetTimerEx("DisablePlayerKnockout",3500,0,"i",playerid);
KillTimer(TimerStack[playerid]);
Edit: I was a fail ninja at first.
|
Thanks. Now fixed (i turned 1 to 0)