if(strcmp(cmd, "/procurar", true) == 0)
{
format(file, sizeof(file), PASTA_CONTAS, GetPlayerNameEx(playerid));
if(dini_Int(file, "Profissao") == Policial_M || dini_Int(file, "Profissao") == Policial_C || dini_Int(file, "Profissao") == Policial_F || dini_Int(file, "Profissao") == Delegado || dini_Int(file, "Profissao") == Bope || dini_Int(file, "Profissao") == Swat || dini_Int(file, "Profissao") == Narcoticos || dini_Int(file, "Profissao") == FBI || dini_Int(file, "Profissao") == Interpol || dini_Int(file, "Profissao") == LSPD || dini_Int(file, "aAdmin") == 3)
{
new plid, motivo[64];
if(sscanf(cmdtext, "s[12]us[64]", cmd, plid, motivo))
{
SendClientMessage(playerid, Vermelho, "Use: /procurar [id] [motivo]");
return 1;
}
if(plid == playerid)
{
SendClientMessage(playerid, Vermelho, "Vocк nгo pode se procurar.");
return 1 ;
}
if(!IsPlayerConnected(plid))
{
SendClientMessage(playerid, Vermelho, "O(A) jogador(a) nгo estб conectado.");
}
else
{
if(GetDistanceBetweenPlayers(plid, playerid) < 10)
{
SetPlayerWantedLevel(plid, 2);
format(string, sizeof(string), "O(A) policial %s te setou um nivel de procurado, voce й um suspeito.", GetPlayerNameEx(playerid));
SendClientMessage(plid, Vermelho, string);
format(string, sizeof(string), "O(A) jogador(a) %s esta sendo procurado(a) por %s. Motivo: %s", GetPlayerNameEx(plid), GetPlayerNameEx(playerid), motivo);
SendClientMessageToAll(Blue, string);
}
else
{
SendClientMessage(playerid, Vermelho, "Chegue mais perto para tornar essa pessoa um suspeito.");
}
}
}
else
{
SendClientMessage(playerid,Vermelho, "Apenas policiais podem usar este comando.");
}
return 1;
}
if(strcmp(cmd, "/procurados", true) == 0) { new count = 0, msg[1000]; SendClientMessage(playerid, 0x008000AA, ".:: Procurados ::."); for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i) && Procurados[i]) { format(msg, sizeof(msg), "%s (ID: %d)", GetPlayerNameEx(i), i); SendClientMessage(playerid, 0x0088CAAA, msg); count++; } } if(count == 0) { SendClientMessage(playerid, 0xFF0000AA, "Ninguйm online estб sendo procurado!"); } return 1; } |