KillTimer
#1

Hi,
I'm using the following timer to set a repetitive checkpoint;
PHP код:
PlayerTemp[playerid][CPTimer] = SetTimerEx("TracenCP"2000true"dd"playeridtargetID); 
This is the function:
PHP код:
function:TracenCP(playeridtargetID)
{
    if(
IsPlayerInAnyInterior(targetID) || PlayerTemp[targetID][phoneoff] != || !IsPlayerConnected(targetID))
    {
        
DisablePlayerCheckpoint(playerid);
        
KillTimer(PlayerTemp[playerid][CPTimer]);
        
SendClientWarning(playerid"Tracing failed.");
        return 
1;
    }
    new 
Float:position[3];
    
GetPlayerPos(targetIDposition[0], position[1], position[2]);
    
SetPlayerCheckpoint(playeridposition[0], position[1], position[2], 2.0);
    return 
1;

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
Reply


Messages In This Thread
KillTimer - by Amit1998 - 29.07.2017, 21:57
Re: KillTimer - by Paulice - 29.07.2017, 22:05
Re: KillTimer - by iamjems - 29.07.2017, 23:02

Forum Jump:


Users browsing this thread: 1 Guest(s)