P4RK0UR Posted February 1, 2014 Posted February 1, 2014 local military = {[520]=true, [425]=true, [447]=true,} function pAccess (thePlayer, seat) if military[getElementModel(source)] and getTeamName(getPlayerTeam(thePlayer)) ~= "Army" and seat == 0 then cancelEvent() outputChatBox("you are not part of the Military", thePlayer) end end addEventHandler("onVehicleStartEnter",root,pAccess) I am so nearly done, i just want to restrict this to MULTIPLE teams. please can you add AirForce and MARSOC to this script as i don't know how to dot it for more that one. thank you so much for your time and help.
Castillo Posted February 1, 2014 Posted February 1, 2014 local military = { [ 520 ] = true, [ 425 ] = true, [ 447 ] = true } local teams = { [ "Military" ] = true, [ "AirForce" ] = true, [ "MARSOC" ] = true } function pAccess ( thePlayer, seat ) if ( military [ getElementModel ( source ) ] and not teams [ getTeamName ( getPlayerTeam ( thePlayer ) ) ] and seat == 0 ) then cancelEvent ( ) outputChatBox ( "you are not part of the Military", thePlayer ) end end addEventHandler ( "onVehicleStartEnter", root, pAccess )
P4RK0UR Posted February 2, 2014 Author Posted February 2, 2014 THANK YOU once again you are so helpful, once i get my paypal in a few months i must donate a little bit of money to you to say thanks
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now