SA-MP Forums Archive
Teleport command while in a car - 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)
+--- Thread: Teleport command while in a car (/showthread.php?tid=657331)



Teleport command while in a car - Zeus666 - 05.08.2018

Hi. I want to add /entergarage and /exitgarage command, but if player is in a car while using this, i want to teleport him with the car, and being in the car too, and if there's any pasager (g)

PHP код:
CMD:exitgarage(playeridparams[])
{
    if(
pInfo[playerid][pFaction] != return SendClientMessage(playerid, -1"You are not from this faction!");
     if 
IsPlayerInRangeOfPoint(playerid5.01587.9971, -1641.037213.6033))
    {
     
SetPlayerPos(playerid55.6726, -135.03792.4967);
         }
    return 
1;

how can I do this?


Re: Teleport command while in a car - Lokii - 05.08.2018

PHP код:
SetVehiclePos(GetPlayerVehicleID(playerid), 55.6726, -135.03792.4967); 



Re: Teleport command while in a car - Zeus666 - 05.08.2018

THank you. How can I do if driver or the passager types /exitgarage to teleport the vehicle with the driver & passagers on it on the same seat?