SendClientMessage(id, 0x0080C0AA, "Voce Esta Sendo Abordado!");
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(i==playerid)return true;
if(IsPlayerInRangeOfPoint(i, 20.0, x, y, z))
{
SendClientMessage(i, -1, TExto);
return true;
}
}
PHP Code:
|
CMD:abordar(playerid, params[])
{
if(1 <= Profissao[playerid] <= 2)
{
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));
format(str, sizeof(str), "[PMESP] O Player %s Esta Sendo Abordado!", name);
SendClientMessageToAll(0xFF8040AA, str);
SendClientMessage(id, 0xFF8040AA, "[PMESP] Voce Esta Sendo Abordado!");
}
else SendClientMessage(playerid, 0xFF0000AA, "[PMESP]{FFFFFF} Voce Nao E Um Policia Militar!");
return 1;
}
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;
}
new Float:Pos[3];
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
for(new i; i < MAX_PLAYERS; i++)
{
if(IsPlayerInRangeOfPoint(i, 10.0, Pos[0], Pos[1], Pos[2]))
{
SendClientMessage(i, 0xFF8040AA, "[PMESP] Voce Esta Sendo Abordado!");
break;
}
}