[Help]Private Cars
#5

Quote:
Originally Posted by Kevin54321
Посмотреть сообщение
https://sampwiki.blast.hk/wiki/OnPlayerEnterVehicle
or: https://sampwiki.blast.hk/wiki/OnPlayerStateChange

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

Then something like "new privatecar[MAX_VEHICLES];" (= playerid).

OnPlayerEnterVehicle:
if(privatecar[vehicleid] == playerid) -> Everything is okey, else -> RemovePlayerFromVehicle

OnPlayerStateChange:
if (newstate == PLAYER_STATE_DRIVER)
-> if(privatecar[vehicleid] == playerid) -> Everything is okey, else -> RemovePlayerFromVehicle

Notes:
- Only for the driver or for both (driver and passengers)? -> See wiki (ispassenger,states)
- OnPlayerEnterVehicle only works if you "press f (or another key)", but if you get teleported into the car it doesnt work!)
Thanks this is what i've been looking for !
Reply


Messages In This Thread
[Help]Private Cars - by RevolutionLite - 10.12.2012, 18:25
Re: [Help]Private Cars - by WoodPecker - 10.12.2012, 18:44
Re: [Help]Private Cars - by RevolutionLite - 11.12.2012, 20:53
AW: [Help]Private Cars - by Kevin54321 - 11.12.2012, 21:44
Re: AW: [Help]Private Cars - by RevolutionLite - 12.12.2012, 18:43

Forum Jump:


Users browsing this thread: 1 Guest(s)