Tele cmd problem [URGENT]
#1

The code doesn't get exceuted IG. When I type the code, it says use /teleto...
PHP код:
COMMAND:teleto(playeridparams[])
{
    new 
Float:xFloat:yFloat:zplayername[MAX_PLAYER_NAME];
    if(
sscanf(params"fff"Float:xFloat:yFloat: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(playeridplayernameSOS);
    
format(stringSOS"You have been teleported to %f, %f, %f !"xyz);
    
SendClientMessage(playerid0x33CCFFAAstring);
    
SetPlayerPos(playeridxyz);
    return 
1;

Reply
#2

PHP код:
COMMAND:teleto(playeridparams[]){
    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:xFloat:yFloat:zplayername[MAX_PLAYER_NAME];
    if(
sscanf(params"fff"xyz)) return SendClientMessage(playerid, -1"USAGE: /teleto [Location : x, y, z]");
    
GetPlayerName(playeridplayernameSOS);
    
format(stringSOS"You have been teleported to %f, %f, %f !"xyz);
    
SendClientMessage(playerid0x33CCFFAAstring);
    
SetPlayerPos(playeridxyz);
    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(playerid0xFFFFFFFF"/tpto <X> <Y> <Z> [interior] [virtualworld]");
    
SetPlayerPos(playerid,P[0],P[1],P[2]);
    if(
int>-1SetPlayerInterior(playerid,int);
    if(
vw>-1SetPlayerVirtualWorld(playerid,vw);
    
    
GetPlayerName(playeridplayernameSOS);
    
format(stringSOS"You have been teleported to %f, %f, %f [%d] [%d]!"xyzintvw);
    
SendClientMessage(playerid0x33CCFFAAstring);
    
SetPlayerPos(playeridxyz);
    return 
1;

Reply
#3

First cmd doesn't work.
Reply
#4

example:
/tpto 0 0 0
not /tpto 0,0,0

my not require a VW and INT so you can use it
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)