Jump to content

Making factions (i can't get it to work)


Recommended Posts

  
function car_check ( theVehicle, seat, jacked ) -- when someone enters a vehicle 
  function(playerSource) 
 id = getElementModel ( theVehicle ) -- get the ID of the vehicle 
  if id == 433 or id == 427 or id == 470 or id == 432 then  
    if isObjectInACLGroup ( "user." .. playerSource, aclGetGroup ( "militar" ) ) then 
         outputChatBox ("REMEMBER: This is a government car.") 
         else 
         local pX, pY, pZ = getElementPosition (source)  
         createExplosion (pX, pY, pZ, 2, source) 
         outputChatBox ("You aren't a militar! Area 51 Security sistem detected you and a rocket was going directly to your head.") 
        end 
    end 
end 
    addEventHandler ( "onPlayerVehicleEnter", getRootElement(), car_check ) 

What's wrong?

Link to comment

This is fucked up.

function car_check ( theVehicle, seat, jacked ) -- when someone enters a vehicle 
 id = getElementModel ( theVehicle ) -- get the ID of the vehicle 
  if id == 433 or id == 427 or id == 470 or id == 432 then 
    if isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup ( "militar" ) ) then 
         outputChatBox ("REMEMBER: This is a government car.") 
         else 
         local pX, pY, pZ = getElementPosition (source) 
         createExplosion (pX, pY, pZ, 2, source) 
         outputChatBox ("You aren't a militar! Area 51 Security sistem detected you and a rocket was going directly to your head.") 
        end 
    end 
end 
    addEventHandler ( "onPlayerVehicleEnter", getRootElement(), car_check ) 

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