Everything's fine, compiles and runs... But wtf?!
#2

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:
pawn Код:
new playerTimers[MAX_PLAYERS];
Setting the timer:
pawn Код:
playerTimers[playerid] = SetTimerEx("AutoCrack", 3500, true, i, playerid);
Finaly, Kill this timer when they Die, or disconnect:
pawn Код:
public OnPlayerDisconnect(playerid, reason) {
    KillTimer(playerTimers[playerid]);
    return 1;
}
public OnPlayerDeath(playerid, killerid, reason) {
    KillTimer(playerTimers[playerid]);
    return 1;
}
About the commands, '/crackme' is 8 long, so:
pawn Код:
if (strcmp("/crackme", cmdtext, true, 6) == 0)
Should be:
pawn Код:
if (strcmp("/crackme", cmdtext, true, 8) == 0)

I hope this helps.
Reply


Messages In This Thread
Everything's fine, compiles and runs... But wtf?! - by Da' J' - 08.06.2012, 06:29
Re: Everything's fine, compiles and runs... But wtf?! - by Grimrandomer - 08.06.2012, 07:01
Re: Everything's fine, compiles and runs... But wtf?! - by leonardo1434 - 08.06.2012, 07:28
Re: Everything's fine, compiles and runs... But wtf?! - by Da' J' - 08.06.2012, 09:00
Re: Everything's fine, compiles and runs... But wtf?! - by leonardo1434 - 08.06.2012, 14:33

Forum Jump:


Users browsing this thread: 1 Guest(s)