/find tracing continously
#3

I tried a lot but i just can't seem to let it work.

How can i let them trace continously so a moving (red) dot on the minimap the whole time, and when his phone is off. Its gone.



PHP код:
if(strcmp(cmd"/find"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
            
tmp strtok(cmdtextidx);
            if(!
strlen(tmp))
            {
                
SendClientMessage(playeridCOLOR_LIGHTYELLOW2"[USAGE:] /find [playerid]");
                return 
1;
            }
            if(
TrackingPlayer[playerid] == 1)
            {
            
SendClientMessage(playeridCOLOR_LIGHTYELLOW2"[ERROR:] Your already finding someone.");
            return 
1;
            }
            new 
id strval(tmp);
            if (
PlayerInfo[playerid][pFaction] != 255 && DynamicFactions[PlayerInfo[playerid][pFaction]][fType] == 1||PlayerInfo[playerid][pFaction] != 255 && DynamicFactions[PlayerInfo[playerid][pFaction]][fType] == 2||PlayerInfo[playerid][pFaction] != 255 && DynamicFactions[PlayerInfo[playerid][pFaction]][fType] == 3||PlayerInfo[playerid][pJob] == 3)
            {
                if(
IsPlayerConnected(id))
                {
                    if(
playerid != id)
                    {
                        if(
id != INVALID_PLAYER_ID)
                        {
                            if(
PhoneOnline[id] == 0)
                            {
                                
SendClientMessage(idCOLOR_LIGHTYELLOW2"[INFO:] Someone is tracking you.");
                                
format(stringsizeof(string), "[INFO:] Your tracking %s, checkpoint removed in 60 seconds."GetPlayerNameEx(id));
                                
SendClientMessage(playeridCOLOR_LIGHTYELLOW2string);
                                  new 
Float:x,Float:y,Float:z;
                                
GetPlayerPos(id,x,y,z);
                                
SetPlayerCheckpoint(playerid,x,y,z,10.0);
                                
SetTimerEx("ClearCheckpointsForPlayer"60000false"i"playerid);
                                
TrackingPlayer[playerid] = 1;
                            }
                            else
                            {
                                
SendClientMessage(idCOLOR_LIGHTYELLOW2"[ERROR:] That players phone is not turned on! You cannot track it.");
                            }
                        }
                    }
                    else
                    {
                        
SendClientMessage(idCOLOR_LIGHTYELLOW2"[ERROR:] You can't track yourself.");
                    }
                }
                else
                {
                    
SendClientMessage(playeridCOLOR_LIGHTYELLOW2"[ERROR:] Invalid Player ID.");
                }
            }
            else
            {
                
SendClientMessage(playeridCOLOR_LIGHTYELLOW2"[ERROR:] You are not eligible to use this command!");
            }
        }
        return 
1;
    } 
Reply


Messages In This Thread
/find tracing continously - by remyguys - 24.11.2011, 14:18
Re: /find tracing continously - by Alberto_DR - 24.11.2011, 14:33
Re: /find tracing continously - by remyguys - 30.11.2011, 19:12
Re: /find tracing continously - by Suzan223Pian - 12.09.2013, 06:30

Forum Jump:


Users browsing this thread: 2 Guest(s)