adding Faction only cars??
#1

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

LSPDcar1 = AddstaticVeh...

Onstatechange

if(.._DRIVER)

if(getvehid == LSPDcar1)
{
//its LSPDcar
}
Reply
#3

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(....
Reply
#4

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.
Reply
#5

isnt OnPlayerEnterVehicle callback + ispassenger check or getplayerstate = driver check better?
Reply
#6

are you wanting a Locking system?
Reply
#7

MOD PLEASE CLOSE!

ISSUE RESOLVED!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)