SA-MP Forums Archive
Tele cmd problem [URGENT] - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Tele cmd problem [URGENT] (/showthread.php?tid=593428)



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(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;




Re: Tele cmd problem [URGENT] - AbyssMorgan - 05.11.2015

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;




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