10.01.2013, 08:36
Hello, when i type /track it doesnt show the marker where player is, here is the cmd:
pawn Код:
CMD:track(playerid, params[])
{
new playerb, string[128];
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
if(!IsACop(playerid) && !IsAHitman(playerid) && !IsASoldier(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You are not an PCSD Oficer.");
if(IsACop(playerid) && !PlayerInfo[playerid][pFacDuty]) return SendClientMessage(playerid, COLOR_GREY, "You are not on duty.");
if(Tracking[playerid] != -1)
{
playerb = Tracking[playerid];
Tracking[playerid] = -1;
SetPlayerMarkerForPlayer(playerid, playerb, GetPlayerColor(playerb));
SendClientMessage(playerid, COLOR_LIGHTBLUE, " You shut your tracker down.");
return 1;
}
if(sscanf(params, "u", playerb)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /track [playerid]");
if(!IsPlayerLoggedIn(playerb)) return SendClientMessage(playerid, COLOR_GREY, "Invalid player id.");
if(!PlayerInfo[playerb][pCellphone]) return SendClientMessage(playerid, COLOR_GREY, "Player has no cellphone.");
if(PhoneOff[playerb]) return SendClientMessage(playerid, COLOR_GREY, "Player has their phone turned off.");
if(GetPlayerInterior(playerb)) return SendClientMessage(playerid, COLOR_GREY, "Player is in an interior.");
if(GetPlayerVirtualWorld(playerb) != GetPlayerVirtualWorld(playerid)) return SendClientMessage(playerid, COLOR_GREY, "Player is in another virtual world.");
// Tracking
Tracking[playerid] = playerb;
format(string, sizeof(string), " You turned your tracker on. (Tracking: %s)", RPN(playerb));
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
SetPlayerMarkerForPlayer(playerid, playerb, MARKER_LIGHTBLUE);
return 1;
}