Car problems - 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: Car problems (
/showthread.php?tid=191794)
Car problems -
Osviux - 20.11.2010
1. When a player tries to enter a police vehicle, he enters it and is forced to exit it and then a message apears 'You are not a police officer!'
Well i want that when a player tries to enter a police vehicle he would not enter it, but would pull the handle of the vehicle's door and then a message would apear.
2. There are some monster trucks created inside an arena, but when i go out of the arena i find those trucks invisible in the other side of town. I think that the arena is up and the trucks are falling down. What to do?
Re: Car problems -
Osviux - 20.11.2010
Bumpiest bump in bump bumpistory.
Re: Car problems -
[MWR]Blood - 20.11.2010
2. Just save the vehicles some metres above the arena, so the objects will have some time to load properly, and monsters won't fall down.
Re: Car problems -
rs.pect - 20.11.2010
Quote:
Originally Posted by Osviux
1. When a player tries to enter a police vehicle, he enters it and is forced to exit it and then a message apears 'You are not a police officer!'
Well i want that when a player tries to enter a police vehicle he would not enter it, but would pull the handle of the vehicle's door and then a message would apear.
|
Use OnPlayerEnterVehicle, not OnPlayerStateChange. To prevent entering in OnPlayerEnterVehicle, freeze and unfreeze him.
Re: Car problems -
Mikkel_Pedersen - 20.11.2010
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
SetVehicleParamsForPlayer(vehicleid, playerid, 0, 1);
return 1;
}
Ain't 100% sure if this will get called in time, I just did a fast test, and during the testing it went fine.
Re: Car problems -
Osviux - 20.11.2010
Ok, thanks. Ill try that.