Tele cmd problem [URGENT] -
Commands - 05.11.2015
The code doesn't get exceuted IG. When I type the code, it says use /teleto...
PHP код:
COMMAND:teleto(playerid, params[])
{
new Float:x, Float:y, Float:z, playername[MAX_PLAYER_NAME];
if(sscanf(params, "fff", Float:x, Float:y, Float:z)) return SendClientMessage(playerid, -1, "USAGE: /teleto [Location : x, y, z]");
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "ERROR: You are not RCON Admin");
if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "ERROR: You need to be on foot to teleport to a location");
GetPlayerName(playerid, playername, SOS);
format(string, SOS, "You have been teleported to %f, %f, %f !", x, y, z);
SendClientMessage(playerid, 0x33CCFFAA, string);
SetPlayerPos(playerid, x, y, z);
return 1;
}
Re: Tele cmd problem [URGENT] -
AbyssMorgan - 05.11.2015
PHP код:
COMMAND:teleto(playerid, params[]){
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "ERROR: You are not RCON Admin");
if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "ERROR: You need to be on foot to teleport to a location");
new Float:x, Float:y, Float:z, playername[MAX_PLAYER_NAME];
if(sscanf(params, "fff", x, y, z)) return SendClientMessage(playerid, -1, "USAGE: /teleto [Location : x, y, z]");
GetPlayerName(playerid, playername, SOS);
format(string, SOS, "You have been teleported to %f, %f, %f !", x, y, z);
SendClientMessage(playerid, 0x33CCFFAA, string);
SetPlayerPos(playerid, x, y, z);
return 1;
}
PHP код:
CMD:tpto(playerid,params[]){
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "ERROR: You are not RCON Admin");
if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "ERROR: You need to be on foot to teleport to a location");
new Float:P[3],int,vw;
if(sscanf(params,"fffI(-1)I(-1)",P[0],P[1],P[2],int,vw)) return SendClientMessage(playerid, 0xFFFFFFFF, "/tpto <X> <Y> <Z> [interior] [virtualworld]");
SetPlayerPos(playerid,P[0],P[1],P[2]);
if(int>-1) SetPlayerInterior(playerid,int);
if(vw>-1) SetPlayerVirtualWorld(playerid,vw);
GetPlayerName(playerid, playername, SOS);
format(string, SOS, "You have been teleported to %f, %f, %f [%d] [%d]!", x, y, z, int, vw);
SendClientMessage(playerid, 0x33CCFFAA, string);
SetPlayerPos(playerid, x, y, z);
return 1;
}
Re: Tele cmd problem [URGENT] -
Commands - 06.11.2015
First cmd doesn't work.
Re: Tele cmd problem [URGENT] -
AbyssMorgan - 06.11.2015
example:
/tpto 0 0 0
not /tpto 0,0,0
my not require a VW and INT so you can use it