PutPlayerInVehicle
#1

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
Reply
#2

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

? i dont get it O.o o.O
Reply
#4

Well it's missing 2 parameters.

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

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
Reply
#6

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

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

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);
}
Reply
#9

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)