tim260 Posted September 28, 2011 Share Posted September 28, 2011 I edited this script so its only for military but its not working when im in no team ( so team:none ) it doesnt work i just enter militaryVehicles = { [523]=true,[598]=true,[596]=true,[597]=true,[490]=true } militaryTeams = {["Military"]=true,["Naval"]=true} function militaryenterVehicle ( player, seat, jacked ) if ( militaryVehicles[getElementModel ( source )] ) and ( not militaryTeams[getTeamName(getPlayerTeam( player ))] ) and ( seat == 0 ) then outputChatBox ( "You aren't a Military Officer , you mayn't drive this.", player ) --and tell the player why cancelEvent() end end addEventHandler ( "onVehicleStartEnter", getRootElement(), militaryenterVehicle ) Link to comment
SDK Posted September 28, 2011 Share Posted September 28, 2011 militaryVehicles = { [523]=true,[598]=true,[596]=true,[597]=true,[490]=true } militaryTeams = {["Military"]=true,["Naval"]=true} function militaryenterVehicle ( player, seat, jacked ) if ( militaryVehicles[getElementModel ( source )] ) and ( getPlayerTeam( player ) ) and ( not militaryTeams[getTeamName(getPlayerTeam( player ))] ) and ( seat == 0 ) then outputChatBox ( "You aren't a Military Officer , you mayn't drive this.", player ) --and tell the player why cancelEvent() end end addEventHandler ( "onVehicleStartEnter", getRootElement(), militaryenterVehicle ) Link to comment
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