SA-MP Forums Archive
adding Faction only cars?? - 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: adding Faction only cars?? (/showthread.php?tid=178898)



adding Faction only cars?? - nickyc95 - 24.09.2010

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


Re: adding Faction only cars?? - Voldemort - 24.09.2010

LSPDcar1 = AddstaticVeh...

Onstatechange

if(.._DRIVER)

if(getvehid == LSPDcar1)
{
//its LSPDcar
}


Re: adding Faction only cars?? - Mike_Peterson - 24.09.2010

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(....


Re: adding Faction only cars?? - Rachael - 24.09.2010

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.


Re: adding Faction only cars?? - Mike_Peterson - 24.09.2010

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


Re: adding Faction only cars?? - gtapolicemods - 25.09.2010

are you wanting a Locking system?


Re: adding Faction only cars?? - nickyc95 - 27.09.2010

MOD PLEASE CLOSE!

ISSUE RESOLVED!