10.06.2015, 14:33
Code:
CMD:goto(playerid, params[])
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFF0000AA, "You need to be RCON for use this command");
new ID;
new pn[MAX_PLAYER_NAME];
new an[MAX_PLAYER_NAME];
new str[128];
if(sscanf(params, "u", ID)) return SendClientMessage(playerid, 0xFF0000AA, "USAGE: /goto [ID]");
if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, 0xFF0000AA, "ERROR: This player is not connected");
GetPlayerName(playerid, an, MAX_PLAYER_NAME);
GetPlayerName(ID, pn, MAX_PLAYER_NAME);
new Float:x;
new Float:y;
new Float:z;
GetPlayerPos(ID, x, y, z);
SetPlayerPos(playerid, x+1, y+1, z);
format(str, sizeof(str), "You have been teleported to %s", pn);
SendClientMessage(playerid, 0x00FF00AA, str);
if(IsPlayerInAnyVehicle(playerid))
GetVehiclePos(ID, x, y, z);
PutPlayerInVehicle(playerid, ID, 2);
{
GetPlayerPos(ID, x, y, z);
SetVehiclePos(playerid, x+1, y+1, z);
}
return 1;
}
You need to be RCON for use this command
I tried to join the server with the rcon password it's the same
And i am the owner of the server I can't use that command help..


