command tp
#1

i have this command to make teleport

PHP код:
COMMAND:tp(playeridparams[])
{
    new 
Target;
    if(!
sscanf(params"i"Target))
    {
        if(
Target == INVALID_PLAYER_ID) return SendClientMessage(playerid, -1"This player is not connected!");
        if(
IsPlayerInAnyVehicle(playerid))
        {
            new 
Float:pos[3];
            
GetVehiclePos(GetPlayerVehicleID(Target), pos[0], pos[1], pos[2]);
            
SetVehiclePos(GetPlayerVehicleID(playerid), pos[0], pos[1], pos[2]);
        } else {
            new 
Float:pos[3];
            
GetPlayerPos(Targetpos[0], pos[1], pos[2]); //<<< i want the player in front of playerid
            
SetPlayerPos(playeridpos[0], pos[1], pos[2]);//<<< same
        
}
    } else return 
SendClientMessage(playerid, -1"Usage: /goto [playerid]");
    return 
1;

i want change this command when playerid to teleport in front of player
Reply


Messages In This Thread
command tp - by crukk11 - 27.05.2017, 08:34
Re: command tp - by Wary - 27.05.2017, 10:18
Re: command tp - by asri - 27.05.2017, 10:37
Re: command tp - by Wary - 27.05.2017, 10:41

Forum Jump:


Users browsing this thread: 1 Guest(s)