Comando: /ir
Comando: /trazer
Créditos: https://portalsamp.com/thread-1771-post-6796.html
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!");
SendClientMessage(playerid, -1, "Voce Foi Teleportando Para O Player %s", nomeplayer);
SendClientMessage(idplayer, -1, "O Admin %s Foi Ate Voce!", GetPlayerNameF(playerid));
SetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(idplayer, a);
SetPlayerFacingAngle(playerid, a);
return 1;
}
Código:
CMD:trazer(playerid, params[])
{
new Float:x, Float:y, Float:z, Float:a;
new trazerid, nomeplayer[MAX_PLAYER_NAME];
GetPlayerName(trazerid, nomeplayer, MAX_PLAYER_NAME);
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFF0000AA, "[ERRO] Voce Nao Tem Permissao Para Utilizar Esse Comando!");
if(sscanf(params, "d", trazerid)) return SendClientMessage(playerid, 0xFF0000AA, "Use: /trazer [ID]");
if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, -1, "[ERRO]Este Player Nao Esta Conectado!");
SendClientMessage(trazerid, -1, "O Admin %s Levou Voce Ate Ele!", GetPlayerNameF(playerid));
SendClientMessage(playerid, -1, "Voce Trouxe O Player %s", nomeplayer);
GetPlayerFacingAngle(playerid, a);
GetPlayerPos(playerid, x, y, z);
SetPlayerPos(trazerid, x, y, z);
SetPlayerFacingAngle(trazerid, a);
return 1;
}