SA-MP Forums Archive
[HELP] how to make a teleport cmd - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP] how to make a teleport cmd (/showthread.php?tid=175343)



[HELP] how to make a teleport cmd - MiniDennis - 09.09.2010

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!


Re: [HELP] how to make a teleport cmd - PinkFloydLover - 09.09.2010

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


Re: [HELP] how to make a teleport cmd - MiniDennis - 09.09.2010

Thanks man this help me alot!