help teleport
#6

Try this:
PHP код:
CMD:goto(playeridparams[])
{
    new 
id;
    if(
IsPlayerConnected(id))
    {
        if ( 
GetPVarIntplayerid"AdminLevel" ) < 1)
            return 
SendClientMessageplayerid, -1"You are not allowed to use this command!");
        {
            if(!
sscanf(params"ui"id))
            {
                new 
string[64];
                new 
vehid GetPlayerVehicleID(playerid);
                new 
name[MAX_PLAYER_NAME];
                new 
Float:xFloat:yFloat:z;
                new 
PlayerName[MAX_PLAYER_NAME];
                
GetPlayerPos(id,x,y,z);
                
GetVehiclePos(vehid,x,y,z);
                
SetPlayerInterior(playerid,GetPlayerInterior(id));
                
GetPlayerName(playeridnamesizeof(name));
                
GetPlayerName(idPlayerNamesizeof(PlayerName));
                
format(stringsizeof(string), "{FF4500}%s {FFFFFF}teleported his self to you."name);
                
SendClientMessage(id, -1string);
                
format(stringsizeof(string), "You teleported yourself to {FF4500}%s."PlayerName);
                
SendClientMessage(playerid, -1string);
                
SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(id));
                
SetPlayerPos(playerid,x+2,y,z);
                
SetVehiclePos(vehid,x+2,y,z);
                
PutPlayerInVehicle(playeridvehid0);
                return 
1;
            }
            else return 
SendClientMessage(playerid, -1"Usage : /goto [id/name]");
        }
    }
    else return 
SendClientMessage(playerid, -1"Player is not connected.");

If it's not the correct color for ORANGESV, you need to get the hex code and put it inside these brackets: {COLORCODE} so, for e.g: ****** Orange Hex Code and just get the code and do this, {FF4500}.

Reply


Messages In This Thread
help teleport - by asri - 16.07.2017, 15:59
Re: help teleport - by Logan0147 - 16.07.2017, 16:47
Re: help teleport - by SilverScripter - 16.07.2017, 16:51
Re: help teleport - by crukk11 - 16.07.2017, 21:19
Re: help teleport - by aoky - 16.07.2017, 21:29
Re: help teleport - by aoky - 16.07.2017, 21:32
Re: help teleport - by Daymen - 16.07.2017, 21:57
Re: help teleport - by asri - 19.07.2017, 02:21
Re: help teleport - by Daymen - 19.07.2017, 19:26
Re: help teleport - by asri - 22.07.2017, 11:01

Forum Jump:


Users browsing this thread: 1 Guest(s)