SA-MP Forums Archive
PutPlayerInVehicle - 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: PutPlayerInVehicle (/showthread.php?tid=167547)



PutPlayerInVehicle - FireCat - 12.08.2010

i made a teleport that when they tele it takes the car plus them the code that i puted is
Код:
if (IsPlayerInAnyVehicle(playerid))
	   SetVehiclePos(GetPlayerVehicleID(playerid), 1458.1984,1559.2050,10.8125);
	   PutPlayerInVehicle(playerid);
but i get



help me out D:

_______________________
[GDZ]leader



Re: PutPlayerInVehicle - Vince - 12.08.2010

Shouldn't there be a 'vehicleid', as-well as a 'seat' parameter at PutPlayerInVehicle?


Re: PutPlayerInVehicle - FireCat - 12.08.2010

? i dont get it O.o o.O


Re: PutPlayerInVehicle - JaTochNietDan - 12.08.2010

Well it's missing 2 parameters.

pawn Код:
PutPlayerInVehicle(playerid,GetPlayerVehicleID(playerid),0);



Re: PutPlayerInVehicle - FireCat - 12.08.2010

samething but it puts the player besides the vehicle, then i tried to fix it it works but i puted }else{ bthen i puts him in the vehicle teles and stuff but comesup unknowen command O.o


Re: PutPlayerInVehicle - akis_tze - 12.08.2010

try this
Код:
if(GetPlayerState(playerid) == 2)
		 		{
                                SetVehiclePos(GetPlayerVehicleID(playerid), 1458.1984,1559.2050,10.8125);
                                }



Re: PutPlayerInVehicle - r0b - 12.08.2010

You don't need the PutPlayerInVehicle, if someone sit in a car, that gets teleported, he teleports with the car.


Re: PutPlayerInVehicle - iggy1 - 13.08.2010

Try this (i dont think they do get tp'd with vehicles @ the above post )

pawn Код:
if (IsPlayerInAnyVehicle(playerid))
{
    new vid = GetPlayerVehicleID(playerid);
    SetVehiclePos(vid, 1458.1984,1559.2050,10.8125);
    PutPlayerInVehicle(playerid,vid,0);
}



Re: PutPlayerInVehicle - r0b - 13.08.2010

I think so, please test both and post back. Want to know, if it's needed or not.


Re: PutPlayerInVehicle - iggy1 - 13.08.2010

Doesn't set vehicles position i can confirm only players, for vehicles its SetVehiclePos.