29.07.2017, 21:57
Hi,
I'm using the following timer to set a repetitive checkpoint;
This is the function:
If the tracing fails it should display the msg once and stop the timer but it doesnt.
Sometimes( I havent found the cause yet) it bugs it out completely and spams everyone Tracing Failed.
I'm killing the timer on a player spawn and disconnection aswell.
Thanks
I'm using the following timer to set a repetitive checkpoint;
PHP код:
PlayerTemp[playerid][CPTimer] = SetTimerEx("TracenCP", 2000, true, "dd", playerid, targetID);
PHP код:
function:TracenCP(playerid, targetID)
{
if(IsPlayerInAnyInterior(targetID) || PlayerTemp[targetID][phoneoff] != 0 || !IsPlayerConnected(targetID))
{
DisablePlayerCheckpoint(playerid);
KillTimer(PlayerTemp[playerid][CPTimer]);
SendClientWarning(playerid, "Tracing failed.");
return 1;
}
new Float:position[3];
GetPlayerPos(targetID, position[0], position[1], position[2]);
SetPlayerCheckpoint(playerid, position[0], position[1], position[2], 2.0);
return 1;
}
Sometimes( I havent found the cause yet) it bugs it out completely and spams everyone Tracing Failed.
I'm killing the timer on a player spawn and disconnection aswell.
Thanks