PHP Code:
CMD:abordar(playerid, params[])
{
if(Profissao[playerid] > 2) return SendClientMessage(playerid, 0xFF0000AA, "[PMESP]{FFFFFF} Voce Nao E Um Policia Militar!");
new id;
if(sscanf(params,"u",id)) return SendClientMessage(playerid, -1, "[PMESP] Use: /abordar [ID]");
SetPlayerSpecialAction(id, SPECIAL_ACTION_CUFFED);
new str[180], name[MAX_PLAYER_NAME];
GetPlayerName(id, name, sizeof(name));
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(i==playerid || i == id)return true;
if(IsPlayerInRangeOfPoint(i, 20.0, x, y, z))
{
SendClientMessage(i, 0xFF8040AA, str);
return true;
}
}
SendClientMessage(id, 0xFF8040AA, "[PMESP] Voce Esta Sendo Abordado!");
return 1;
}