Samking Posted September 11, 2018 Share Posted September 11, 2018 (edited) x, y, size = -2095.97632, -280.48669, 120 local greenzone = createColRectangle ( -2095.97632, -280.48669,85, 200) local greenzonemaparea = createRadarArea (-2095.97632, -280.48669,85, 200, 255,215,0, 120) function greenzoneEnter ( thePlayer, matchingDimension ) if getElementType( thePlayer ) ~= "player" then return end outputChatBox ( "* You Entered The VIP Vehicle recover Area", thePlayer, 0, 255, 0 ) toggleControl ( thePlayer, "fire", false ) toggleControl ( thePlayer, "next_weapon", true ) toggleControl ( thePlayer, "previous_weapon", true ) setPedWeaponSlot ( thePlayer, 0 ) toggleControl ( thePlayer, "aim_weapon", false ) toggleControl ( thePlayer, "vehicle_fire", false ) toggleControl ( thePlayer, "vehicle_secondary_fire", false ) end addEventHandler ( "onColShapeHit", greenzone, greenzoneEnter ) function greenzoneExit ( thePlayer, matchingDimension ) if getElementType( thePlayer ) ~= "player" then return end outputChatBox ( "* You Left The VIP Vehicle recover Area", thePlayer, 0, 255, 0 ) toggleControl ( thePlayer, "fire", true ) toggleControl ( thePlayer, "next_weapon", true ) toggleControl ( thePlayer, "previous_weapon", true ) toggleControl ( thePlayer, "aim_weapon", true ) toggleControl ( thePlayer, "vehicle_fire", true ) toggleControl ( thePlayer, "vehicle_secondary_fire", true ) end addEventHandler ( "onColShapeLeave", greenzone, greenzoneExit ) How I can make this Area That Only ACL group "VIP" can enter? Edited September 11, 2018 by Samking Link to comment
Dimos7 Posted September 11, 2018 Share Posted September 11, 2018 isObjectInACLGroup aclGetGroup getAccountName getPlayerAccount Link to comment
JeViCo Posted September 12, 2018 Share Posted September 12, 2018 + onPlayerLogin event + set/getElementData @Samking Link to comment
VenomOG Posted September 13, 2018 Share Posted September 13, 2018 x, y, size = -2095.97632, -280.48669, 120 local greenzone = createColRectangle ( -2095.97632, -280.48669,85, 200) local greenzonemaparea = createRadarArea (-2095.97632, -280.48669,85, 200, 255,215,0, 120) function greenzoneEnter ( thePlayer, matchingDimension ) if getElementType( thePlayer ) ~= "player" then return end if (isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Owner"))) then outputChatBox ( "* You Entered The VIP Vehicle recover Area", thePlayer, 0, 255, 0 ) toggleControl ( thePlayer, "fire", false ) toggleControl ( thePlayer, "next_weapon", true ) toggleControl ( thePlayer, "previous_weapon", true ) setPedWeaponSlot ( thePlayer, 0 ) toggleControl ( thePlayer, "aim_weapon", false ) toggleControl ( thePlayer, "vehicle_fire", false ) toggleControl ( thePlayer, "vehicle_secondary_fire", false ) end end else outputChatBox("exit your not allowed here xd leave madafaker",root,255,0,0) addEventHandler ( "onColShapeHit", greenzone, greenzoneEnter ) function greenzoneExit ( thePlayer, matchingDimension ) if getElementType( thePlayer ) ~= "player" then return end outputChatBox ( "* You Left The VIP Vehicle recover Area", thePlayer, 0, 255, 0 ) toggleControl ( thePlayer, "fire", true ) toggleControl ( thePlayer, "next_weapon", true ) toggleControl ( thePlayer, "previous_weapon", true ) toggleControl ( thePlayer, "aim_weapon", true ) toggleControl ( thePlayer, "vehicle_fire", true ) toggleControl ( thePlayer, "vehicle_secondary_fire", true ) end addEventHandler ( "onColShapeLeave", greenzone, greenzoneExit ) @Samking not tested Enjoy Link to comment
Samking Posted September 14, 2018 Author Share Posted September 14, 2018 On 12/09/2018 at 18:13, KnucklesSAEG said: x, y, size = -2095.97632, -280.48669, 120 local greenzone = createColRectangle ( -2095.97632, -280.48669,85, 200) local greenzonemaparea = createRadarArea (-2095.97632, -280.48669,85, 200, 255,215,0, 120) function greenzoneEnter ( thePlayer, matchingDimension ) if getElementType( thePlayer ) ~= "player" then return end if (isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Owner"))) then outputChatBox ( "* You Entered The VIP Vehicle recover Area", thePlayer, 0, 255, 0 ) toggleControl ( thePlayer, "fire", false ) toggleControl ( thePlayer, "next_weapon", true ) toggleControl ( thePlayer, "previous_weapon", true ) setPedWeaponSlot ( thePlayer, 0 ) toggleControl ( thePlayer, "aim_weapon", false ) toggleControl ( thePlayer, "vehicle_fire", false ) toggleControl ( thePlayer, "vehicle_secondary_fire", false ) end end else outputChatBox("exit your not allowed here xd leave madafaker",root,255,0,0) addEventHandler ( "onColShapeHit", greenzone, greenzoneEnter ) function greenzoneExit ( thePlayer, matchingDimension ) if getElementType( thePlayer ) ~= "player" then return end outputChatBox ( "* You Left The VIP Vehicle recover Area", thePlayer, 0, 255, 0 ) toggleControl ( thePlayer, "fire", true ) toggleControl ( thePlayer, "next_weapon", true ) toggleControl ( thePlayer, "previous_weapon", true ) toggleControl ( thePlayer, "aim_weapon", true ) toggleControl ( thePlayer, "vehicle_fire", true ) toggleControl ( thePlayer, "vehicle_secondary_fire", true ) end addEventHandler ( "onColShapeLeave", greenzone, greenzoneExit ) @Samking not tested Enjoy Error Excepted Near 'else Link to comment
Sorata_Kanda Posted September 14, 2018 Share Posted September 14, 2018 x, y, size = -2095.97632, -280.48669, 120 local greenzone = createColRectangle ( -2095.97632, -280.48669,85, 200) local greenzonemaparea = createRadarArea (-2095.97632, -280.48669,85, 200, 255,215,0, 120) function greenzoneEnter ( thePlayer, matchingDimension ) if getElementType( thePlayer ) ~= "player" then return end if (isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Owner"))) then outputChatBox ( "* You Entered The VIP Vehicle recover Area", thePlayer, 0, 255, 0 ) toggleControl ( thePlayer, "fire", false ) toggleControl ( thePlayer, "next_weapon", true ) toggleControl ( thePlayer, "previous_weapon", true ) setPedWeaponSlot ( thePlayer, 0 ) toggleControl ( thePlayer, "aim_weapon", false ) toggleControl ( thePlayer, "vehicle_fire", false ) toggleControl ( thePlayer, "vehicle_secondary_fire", false ) else outputChatBox("exit your not allowed here xd leave madafaker",root,255,0,0) end end addEventHandler ( "onColShapeHit", greenzone, greenzoneEnter ) function greenzoneExit ( thePlayer, matchingDimension ) if getElementType( thePlayer ) ~= "player" then return end outputChatBox ( "* You Left The VIP Vehicle recover Area", thePlayer, 0, 255, 0 ) toggleControl ( thePlayer, "fire", true ) toggleControl ( thePlayer, "next_weapon", true ) toggleControl ( thePlayer, "previous_weapon", true ) toggleControl ( thePlayer, "aim_weapon", true ) toggleControl ( thePlayer, "vehicle_fire", true ) toggleControl ( thePlayer, "vehicle_secondary_fire", true ) end addEventHandler ( "onColShapeLeave", greenzone, greenzoneExit ) Just as a tip: Try to keep your code clean and intented. Makes it much more readable and easier to spot errors like <eof> Link to comment
VenomOG Posted September 14, 2018 Share Posted September 14, 2018 3 hours ago, Sorata_Kanda said: x, y, size = -2095.97632, -280.48669, 120 local greenzone = createColRectangle ( -2095.97632, -280.48669,85, 200) local greenzonemaparea = createRadarArea (-2095.97632, -280.48669,85, 200, 255,215,0, 120) function greenzoneEnter ( thePlayer, matchingDimension ) if getElementType( thePlayer ) ~= "player" then return end if (isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Owner"))) then outputChatBox ( "* You Entered The VIP Vehicle recover Area", thePlayer, 0, 255, 0 ) toggleControl ( thePlayer, "fire", false ) toggleControl ( thePlayer, "next_weapon", true ) toggleControl ( thePlayer, "previous_weapon", true ) setPedWeaponSlot ( thePlayer, 0 ) toggleControl ( thePlayer, "aim_weapon", false ) toggleControl ( thePlayer, "vehicle_fire", false ) toggleControl ( thePlayer, "vehicle_secondary_fire", false ) else outputChatBox("exit your not allowed here xd leave madafaker",root,255,0,0) end end addEventHandler ( "onColShapeHit", greenzone, greenzoneEnter ) function greenzoneExit ( thePlayer, matchingDimension ) if getElementType( thePlayer ) ~= "player" then return end outputChatBox ( "* You Left The VIP Vehicle recover Area", thePlayer, 0, 255, 0 ) toggleControl ( thePlayer, "fire", true ) toggleControl ( thePlayer, "next_weapon", true ) toggleControl ( thePlayer, "previous_weapon", true ) toggleControl ( thePlayer, "aim_weapon", true ) toggleControl ( thePlayer, "vehicle_fire", true ) toggleControl ( thePlayer, "vehicle_secondary_fire", true ) end addEventHandler ( "onColShapeLeave", greenzone, greenzoneExit ) Just as a tip: Try to keep your code clean and intented. Makes it much more readable and easier to spot errors like <eof> Sorry I was on phone 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