Mike269 Posted February 2, 2014 Posted February 2, 2014 Hello guys how can I edit that script? I want to make that Player with team "Staff" can enter this zone not AclGroup "Admin" Help please! col = createColCuboid ( 95.974617004395, 1751.3895263672, 17.640625, 255, 255, 255 ) zone = createRadarArea ( 95.974617004395, 1751.3895263672, 255, 255, 255, 0, 0, 170 ) setElementData (zone, "zombieProof", true) function enterAdmin(hitElement,matchingDimension) if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(hitElement)),aclGetGroup("Admin")) then toggleControl (hitElement, "fire", true ) toggleControl (hitElement, "aim_weapon", true) toggleControl (hitElement, "vehicle_fire", true) outputChatBox("Welcome to Admin area", hitElement, 0, 170, 255) else outputChatBox("Access denied", hitElement, 255, 0, 0) killPed (hitElement) end end addEventHandler( "onColShapeHit", col, enterAdmin )
Castillo Posted February 2, 2014 Posted February 2, 2014 if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(hitElement)),aclGetGroup("Admin")) then Change that to: if ( getPlayerTeam ( hitElement ) and getTeamName ( getPlayerTeam ( hitElement ) ) == "Staff" ) then San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Mike269 Posted February 2, 2014 Author Posted February 2, 2014 Thx, do you know way to able 2 teams to enter in zone?
Castillo Posted February 2, 2014 Posted February 2, 2014 Create a table with the teams, then check if the team of the player is in the table. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Castillo Posted February 2, 2014 Posted February 2, 2014 local teams = { [ "Staff" ] = true, [ "Staff2" ] = true } if ( getPlayerTeam ( hitElement ) and teams [ getTeamName ( getPlayerTeam ( hitElement ) ) ] ) then San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
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