OnPlayerUpdate Doesn't work ... - 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: OnPlayerUpdate Doesn't work ... (
/showthread.php?tid=514050)
OnPlayerUpdate Doesn't work ... -
UnAngel - 19.05.2014
Hello i try to make a simple afk system but my onplayerupdate doesn't work i dont know why
this is the public
PHP код:
public OnPlayerUpdate(playerid)
{
if(!IsPlayerConnected(playerid)) return 0;
print("[system] Work!");
if(GetPVarInt(playerid, "AFKTime") > 0 && !IsPlayerNPC(playerid)) SetPVarInt(playerid, "AFKTime", 0);
return 1;
}
it is doesn't send the work message i dont know why ...
thanks :]
Re: OnPlayerUpdate Doesn't work ... -
David (Sabljak) - 19.05.2014
Код:
public OnPlayerUpdate(playerid)
{
if(IsPlayerConnected(playerid))
{
print("[system] Work!");
if(GetPVarInt(playerid, "AFKTime") > 0 && !IsPlayerNPC(playerid)) SetPVarInt(playerid, "AFKTime", 0);
}
return 1;
}
Re: OnPlayerUpdate Doesn't work ... -
UnAngel - 19.05.2014
doesn't work ....