Updating a players pos with timer
#4

Also don't forget to set a variable to the timer for properly using KillTimer

For example

PHP код:

new ptimer// ptimer like pos timer

public UpdatePlayerPos(playerid)
{
    new 
Float:xFloat:yFloat:z;
    
GetPlayerPos(playeridxyz);
    
// Don't know what you wanna do, so i'll use it with SetPlayerCheckpoint
    
for(new 0MAX_PLAYERS;p++)
    {
        if(
== playerid) continue;
        else return 
SetPlayerCheckpoint(ixyz5.0);
    }
// In ur command

ptimer SetTimerEx("UpdatePlayerPos"500true"d"playerid);

// In the command to stop

if(strcmp(cmdtext"/stoptimer"true) == 0)
{
     
KillTimer(ptimer);
     print(
"Timer killed");
     return 
1;

Reply


Messages In This Thread
Updating a players pos with timer - by ross8839 - 22.02.2014, 12:13
Re: Updating a players pos with timer - by BroZeus - 22.02.2014, 13:23
Re: Updating a players pos with timer - by Smileys - 22.02.2014, 14:25
Re : Updating a players pos with timer - by S4t3K - 22.02.2014, 14:30

Forum Jump:


Users browsing this thread: 1 Guest(s)