SA-MP Forums Archive
Teleport with 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 with car (/showthread.php?tid=514172)



Teleport with car - Steel_ - 20.05.2014

How do i teleport myself with car with this code

CMD:visage(playerid,params)
{
#pragma unused params
SetPlayerPos(playerid, 2033.4410,1918.4377,12.1801);
return 1;
}

Please help i am new to Pawno


Re: Teleport with car - jihadmeneer - 20.05.2014

https://sampwiki.blast.hk/wiki/SetVehiclePos


Re: Teleport with car - Rittik - 20.05.2014

Код:
CMD:visage(playerid,params)
{
#pragma unused params
if(IsPlayerInVehicle(playerid,GetPlayerVehicleID(playerid))==1)
{
new vehicle=GetPlayerVehicleID(playerid)
SetPlayerPos(playerid, 2033.4410,1918.4377,12.1801);
SetVehiclePos(vehicle,2033.4410,1918.4377,12.1801);
PutPlayerInVehicle(playerid, vehicle, 0);
}
else
{
SetPlayerPos(playerid, 2033.4410,1918.4377,12.1801);
}
return 1;
}



Re: Teleport with car - Threshold - 20.05.2014

pawn Код:
CMD:visage(playerid, params[])
{
    #pragma unused params
    if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) SetVehiclePos(GetPlayerVehicleID(playerid), 2033.4410, 1918.4377, 12.1801);
    else SetPlayerPos(playerid, 2033.4410, 1918.4377, 12.1801);
    return 1;
}



Re: Teleport with car - Steel_ - 20.05.2014

Thank you so much for both of the scripts i used Benzo's one but both worked for me thx
jihadmeneer: i tried that it was too dificult for me to understand