30.11.2014, 04:30
pawn Код:
CMD:procurar(playerid, params[])
{
if(Logado[playerid] == false) return SendClientMessage(playerid,COR_CV,"[ ATENЗГO ] Й preciso logar para executar este comando");
if(!(PlayerInfo[playerid][pOrg] == 5 || PlayerInfo[playerid][pOrg] == 6)) return SendClientMessage(playerid, -1, "{008B00}[ ATENЗГO ] Apenas membros POLICIAIS podem usar este comando.");
new id, string[128], Float:pX, Float:pY, Float:pZ, idVeiculo;
if(sscanf(params, "u", id)) return SendClientMessage(playerid, -1, "{FFA500}[ USE ] /LOCALIZAR [ID]");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "{FF0000}[ERRO] Jogador nгo conectado");
if(usandoRastreamento[playerid] == 1) return SendClientMessage(playerid, -1, "{FF0000}[ERRO] Vocк jб estб usando o sistema de localizaзгo.");
if(id == playerid) return SendClientMessage(playerid, -1, "{FF0000}[ERRO] Vocк nгo pode rastrear a sн prуprio.");
/* if(strcmp(params, "off", true)==0)
{
CP_Localizando[playerid] = 0;
return 1;
} */
if(IsPlayerInAnyVehicle(playerid))
{
idVeiculo = GetPlayerVehicleID(playerid);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerInVehicle(i, idVeiculo))
{
PlayerPlaySound(i, 1058,0.0,0.0,0.0);
SetPlayerCheckpoint(i, pX,pY,pZ, 6);
CP_Localizando[i] = 1;
format(string, sizeof(string),"{FFFFFF}O procurado {FFCF9B}%s {FFFFFF}foi marcado no mapa.", Nome(id));
SendClientMessage(i, -1, string);
}
}
}
format(string, sizeof(string),"{FFFFFF}O procurado {FFCF9B}%s {FFFFFF}foi marcado no mapa.", Nome(id));
SendClientMessage(i, -1, string);
CP_Localizando[playerid] = 1;
updateLocalizarPlayer (playerid, id);
return 1;
}