Jump to content

Can someone see whats wrong?


tim260

Recommended Posts

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...