Alen141 Posted December 24, 2012 Posted December 24, 2012 Hey guys,I'm stuck again so here is my acl car lock for my pony car but i want to lock it for Team but i got lost in team functions: Hunter = createVehicle ( 425, 362.26513671875, 1997.4976806641, 21.543445587158, 0, 0, 91.75 ) function lockArmy(player, seat, jacked) if source == Hunter then local accountname = getAccountName (getPlayerAccount(player)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Army" ) ) then return end cancelEvent() outputChatBox ( "Only Army is allowed to use this vehicle!", player, 255, 0, 0, true ) end end addEventHandler ( "onVehicleStartEnter", getRootElement(), lockArmy )
Castillo Posted December 24, 2012 Posted December 24, 2012 Hunter = createVehicle ( 425, 362.26513671875, 1997.4976806641, 21.543445587158, 0, 0, 91.75 ) function lockArmy ( player, seat, jacked ) if ( source == Hunter ) then local team = getPlayerTeam ( player ) local teamName = ( team and getTeamName ( team ) or "" ) if ( teamName == "Army" ) then cancelEvent ( ) outputChatBox ( "Only Army is allowed to use this vehicle!", player, 255, 0, 0, true ) end end end addEventHandler ( "onVehicleStartEnter", getRootElement(), lockArmy ) That's what you meant?
Alen141 Posted December 24, 2012 Author Posted December 24, 2012 Hunter = createVehicle ( 425, 362.26513671875, 1997.4976806641, 21.543445587158, 0, 0, 91.75 ) function lockArmy ( player, seat, jacked ) if ( source == Hunter ) then local team = getPlayerTeam ( player ) local teamName = ( team and getTeamName ( team ) or "" ) if ( teamName == "Army" ) then cancelEvent ( ) outputChatBox ( "Only Army is allowed to use this vehicle!", player, 255, 0, 0, true ) end end end addEventHandler ( "onVehicleStartEnter", getRootElement(), lockArmy ) That's what you meant? i edited code a bit and it worked so thanks,did this community ever concider about giving you a 100 000$ i mean you relly deserve it cuse if someone helped this community it would be you!
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