08.06.2012, 07:01
Ok, i found a few problems.
First problem is you are using SetTimer, instead of SetTimerEx, so you dont pass its playerid.
This brings up the problem that you need to store a players 'TimerID'
At the top:
Setting the timer:
Finaly, Kill this timer when they Die, or disconnect:
About the commands, '/crackme' is 8 long, so:
Should be:
I hope this helps.
First problem is you are using SetTimer, instead of SetTimerEx, so you dont pass its playerid.
This brings up the problem that you need to store a players 'TimerID'
At the top:
pawn Код:
new playerTimers[MAX_PLAYERS];
pawn Код:
playerTimers[playerid] = SetTimerEx("AutoCrack", 3500, true, i, playerid);
pawn Код:
public OnPlayerDisconnect(playerid, reason) {
KillTimer(playerTimers[playerid]);
return 1;
}
public OnPlayerDeath(playerid, killerid, reason) {
KillTimer(playerTimers[playerid]);
return 1;
}
pawn Код:
if (strcmp("/crackme", cmdtext, true, 6) == 0)
pawn Код:
if (strcmp("/crackme", cmdtext, true, 8) == 0)
I hope this helps.