CMD:goto
#1

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;
}
When I used the command it's says
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..
Reply


Messages In This Thread
CMD:goto - by KamalBa - 10.06.2015, 14:33
Re: CMD:goto - by Prokill911 - 10.06.2015, 14:36
Re: CMD:goto - by KamalBa - 10.06.2015, 14:38
Re: CMD:goto - by DetoNater - 10.06.2015, 14:39
Re: CMD:goto - by Prokill911 - 10.06.2015, 14:39
Re: CMD:goto - by KamalBa - 10.06.2015, 14:41
Re: CMD:goto - by Prokill911 - 10.06.2015, 14:41
Re: CMD:goto - by KamalBa - 10.06.2015, 14:45
Re: CMD:goto - by SpaceX - 10.06.2015, 14:47
Respuesta: Re: CMD:goto - by alexus - 10.06.2015, 17:29

Forum Jump:


Users browsing this thread: 1 Guest(s)