23.11.2010, 07:39
(
Last edited by Cypog; 23/11/2010 at 02:36 PM.
)
Hi,
i want to report a bug with OnPlayerUpdate:
If a player has a trailer attached to his vehicle and he is not moving, OnPlayerUpdate won't be called anymore.
I made a little script to test this (only working for playerid 0 if no other players are connected):
i want to report a bug with OnPlayerUpdate:
If a player has a trailer attached to his vehicle and he is not moving, OnPlayerUpdate won't be called anymore.
I made a little script to test this (only working for playerid 0 if no other players are connected):
pawn Code:
new bool:afk = false;
public OnGameModeInit()
{
SetGameModeText("Blank Script");
SetTimer("AFKTimer", 1000, 1);
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
return 1;
}
forward AFKTimer();
public AFKTimer()
{
if (IsPlayerConnected(0))
{
if (afk)
SendClientMessageToAll(0xFFFFFFAA, "AFK!");
afk = true;
}
}
public OnPlayerUpdate(playerid)
{
afk = false;
return 1;
}