Perdão faz assim Ficaria
Só que não testei só que provavelmente vai funcionar
Código:
new Float:distancia = 20; //A maior distância que o jogador pode estar do ponto ao alcance.
foreach(new i: players)//Executara apenas em jogadores conectados.
{
GetPlayerPos(i, Float:x, Float:y, Float:z);
if(IsPlayerInRangeOfPoint(playerid, Float:distancia, Float:x, Float:y, Float:z))
{
SendClientMessage(i, -1, "O Admin %s Foi Até %s", GetPlayerNameF(playerid), nomeplayer);
}
}
Código:
CMD:ir(playerid, params[])
{
new idplayer, nomeplayer[MAX_PLAYER_NAME];
new Float:x, Float:y, Float:z, Float:a;
GetPlayerName(idplayer, nomeplayer, MAX_PLAYER_NAME);
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFF0000AA, "[ERRO] Voce Nao Tem Permissao Para Utilizar Esse Comando!");
if(sscanf(params, "d", idplayer)) return SendClientMessage(playerid, 0xFF0000AA, "[ERRO] Use: /ir [Id]");
if(!IsPlayerConnected(idplayer)) return SendClientMessage(playerid, 0xFF0000AA, "[ERRO] Este Player Nao Esta Conectado No Servidor!");
new Float:distancia = 20; //A maior distância que o jogador pode estar do ponto ao alcance.
foreach(new i: players)//Executara apenas em jogadores conectados
{
GetPlayerPos(i, Float:x, Float:y, Float:z);
if(IsPlayerInRangeOfPoint(playerid, Float:distancia, Float:x, Float:y, Float:z))
{
SendClientMessage(i, -1, "O Admin %s Foi Até %s", GetPlayerNameF(playerid), nomeplayer);
}
}
SendClientMessage(playerid, -1, "Voce Foi Teleportando Para O Player %s", nomeplayer);
SendClientMessage(idplayer, -1, "O Admin %s Foi Ate Voce!", GetPlayerNameF(playerid));
GetPlayerPos(idplayer, Float:x, Float:y, Float:z);
SetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(idplayer, a);
SetPlayerFacingAngle(playerid, a);
return 1;
}