Posts: 4
Threads: 3
Joined: Sep 2010
Reputation:
0
Hi, the title kinda says it all..
I am wanting to add it so that the LSPD police cars and alll other police related vehicals are made so that you have to be in faction group 1 for you to be able to drive the car. If you are not i want it to make the player get out of the car and display a message to them..
If you can help please post...
Thanks
-Nickyc95
Posts: 560
Threads: 32
Joined: Aug 2010
Reputation:
0
LSPDcar1 = AddstaticVeh...
Onstatechange
if(.._DRIVER)
if(getvehid == LSPDcar1)
{
//its LSPDcar
}
Posts: 844
Threads: 32
Joined: Apr 2009
Reputation:
0
you gotta make factions.... like If(IsACop[playerid] == 1)
then onplayerentervehicle the check if the model id is 596 = a pd car
then the check if the player is a cop... if not remove him from vehicle.. read tutorials
and police related cars who are not standard/singleplayer police department cars like a undercover vehicle u gotta define with fbiveh1 = AddStaticVehicle(....
Posts: 380
Threads: 11
Joined: Feb 2010
Reputation:
0
The check OnPlayerChangeState is good, but it is also good to have a periodic check under an existing timer, because players will soon learn that they can exploit into the vehicles using animations, or tabbing after they start the 'enter vehicle' animation.
Posts: 844
Threads: 32
Joined: Apr 2009
Reputation:
0
isnt OnPlayerEnterVehicle callback + ispassenger check or getplayerstate = driver check better?
Posts: 111
Threads: 23
Joined: Jul 2009
Reputation:
0
are you wanting a Locking system?
Posts: 4
Threads: 3
Joined: Sep 2010
Reputation:
0
MOD PLEASE CLOSE!
ISSUE RESOLVED!