Tele cmd problem [URGENT]
#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


Messages In This Thread
Tele cmd problem [URGENT] - by Commands - 05.11.2015, 14:38
Re: Tele cmd problem [URGENT] - by AbyssMorgan - 05.11.2015, 14:44
Re: Tele cmd problem [URGENT] - by Commands - 06.11.2015, 14:32
Re: Tele cmd problem [URGENT] - by AbyssMorgan - 06.11.2015, 14:50

Forum Jump:


Users browsing this thread: 1 Guest(s)