Seatbelt crash
#1

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

Reply
#2

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.
Reply
#3

Код:
TimerStack = SetTimerEx("DisablePlayerKnockout",3500,0,"i",playerid);
Edit: ninja'd
Reply
#4

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)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)