[HELP] how to make a teleport cmd
#1

Hi all.

I'm a newbie scripter, i will make a TP cmd to tp to one of my admin houses.
And i maked one and it works, But the car don't wil get with me.

THANKS!
Reply
#2

pawn Код:
if(!IsPlayerInAnyVehicle(playerid))//checks if the player isnt in a vehicle
    {
        SetPlayerPos(playerid,X,Y,Z);
    }
    else//if the player isnt in a vehicle
    {
        new vehicleid = GetPlayerVehicleID(playerid);
        SetPlayerPos(playerid,X,Y,Z);
        SetVehiclePos(vehicleid,X,Y,Z);
        PutPlayerInVehicle(playerid,vehicleid,0);
       
    }
That will check if the player isnt in a vehicle, then if he isnt, it will teleport his player position to the X,Y,Z that you need to edit, if he is in a vehicle it teleports him and his vehicle to X,Y,Z and then puts the player inside the vehicle just add that into your command and change X,Y,Z to your co ordinates
Reply
#3

Thanks man this help me alot!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)