Track command help
#1

Hello, thats my track command, and when its executed, it must show a player marker on the minimap, but it doesnt?! Where's the problem, or is it in -
PHP код:
ShowPlayerMarkers(0); 
although I dont want the player markers to be seen on the minimap always, thats why I've set it to 0.

PHP код:
CMD:track(playeridparams[])
{
    new 
playerbstring[128];
       if(!
IsPlayerLoggedIn(playerid)) return SendClientMessage(playeridCOLOR_GREY"You need to login first before using any command.");
    if(!
IsACop(playerid) && !IsAHitman(playerid)) return SendClientMessage(playeridCOLOR_GREY"You are not authorized to use that command.");
    if(
Tracking[playerid] != -1)
    {
        
playerb Tracking[playerid];
        
Tracking[playerid] = -1;
        
SetPlayerMarkerForPlayer(playeridplayerbGetPlayerColor(playerb));
        
SendClientMessage(playeridCOLOR_LIGHTBLUE" You shut your tracker down.");
        return 
1;
    }
    if(
sscanf(params"u"playerb)) return SendClientMessage(playeridCOLOR_WHITE"USAGE: /track [playerid]");
    if(!
IsPlayerLoggedIn(playerb)) return SendClientMessage(playeridCOLOR_GREY"Invalid player id.");
    if(!
PlayerInfo[playerb][pCellphone]) return SendClientMessage(playeridCOLOR_GREY"Player has no cellphone.");
    if(
PhoneOff[playerb]) return SendClientMessage(playeridCOLOR_GREY"Player has their phone turned off.");
    if(
GetPlayerInterior(playerb)) return SendClientMessage(playeridCOLOR_GREY"Player is in an interior.");
    if(
GetPlayerVirtualWorld(playerb) != GetPlayerVirtualWorld(playerid)) return SendClientMessage(playeridCOLOR_GREY"Player is in another virtual world.");
    
// Tracking
    
Tracking[playerid] = playerb;
    
format(stringsizeof(string), " You turned your tracker on. (Tracking: %s)"RPN(playerb));
    
SendClientMessage(playeridCOLOR_LIGHTBLUEstring);
    
SetPlayerMarkerForPlayer(playeridplayerb0xFF0000FF);
    return 
1;

Reply
#2

Use SetTimerEx to disable Map Marker
Reply
#3

It doesnt even show a marker on the map/minimap...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)