5150 Posted February 10, 2017 Share Posted February 10, 2017 (edited) i have this script here, and i changed it from get team name to get ACL group, but now its saying <eof> expected near 'else' on line 83, what is that and how can i fix it? Spoiler radar1 = createRadarArea(-3301.9208984375, 1493.0335693359, 301.27514648438, 288.4755859375, 255, 0, 0, 10) setElementData(radar1,"zombieProof",true) Zone1 = createColRectangle( -3301.9208984375, 1493.0335693359, 301.27514648438, 288.4755859375) addEventHandler("onColShapeHit", Zone1, function(h) if not isElement(h) then return end if getElementData(h,"zombie") then killPed(h) end --These zones are also zombie proof end) function enterArea1(thePlayer) local posX, posY = getElementPosition(thePlayer) local inArea = isInsideRadarArea(radar1, posX, posY) if (inArea) then local allowed= "5150" function hasPermission(player) --[ local ACLs = split(allowed, ',') for _, group in pairs(ACLs)do local ACLgroup = aclGetGroup ( group ) if ACLgroup then local accName = getAccountName(getPlayerAccount( player )) if isObjectInACLGroup ( "user.".. accName, ACLgroup ) then --who is allowed return true end end end --] primaryWeaponControl = isControlEnabled ( thePlayer, "fire" ) if ( primaryWeaponControl == true ) then toggleControl ( thePlayer, "fire", true ) -- change to true/false to allow/disallow shooting. end end else triggerClientEvent(thePlayer, "displayTimer1", thePlayer) end end addEventHandler("onColShapeHit", Zone1, enterArea1) function warp1() local posX, posY = getElementPosition(source) local inArea = isInsideRadarArea(radar1, posX, posY) if (inArea) then function enterArea1(thePlayer) local posX, posY = getElementPosition(thePlayer) local inArea = isInsideRadarArea(radar1, posX, posY) if (inArea) then local allowed= "5150" function hasPermission(player) local ACLs = split(allowed, ',') for _, group in pairs(ACLs)do local ACLgroup = aclGetGroup ( group ) if ACLgroup then local accName = getAccountName(getPlayerAccount( player )) if isObjectInACLGroup ( "user.".. accName, ACLgroup ) then return true end end end primaryWeaponControl = isControlEnabled ( thePlayer, "fire" ) if ( primaryWeaponControl == true ) then toggleControl ( thePlayer, "fire", true ) -- change to true/false to allow/disallow shooting. end end else triggerClientEvent(thePlayer, "displayTimer1", thePlayer) end end end end addEventHandler("onColShapeHit", Zone1, enterArea1) else giveWeapon ( thePlayer, 46, 6, true ) if isPedInVehicle ( source ) then local playerVehicle = getPedOccupiedVehicle ( source ) setElementPosition(playerVehicle, -1534.62439, 758.44031, 7.18750) else setElementPosition(source, -1534.62439, 758.44031, 7.18750) end end end end addEvent("warp1", true) addEventHandler("warp1", root, warp1) --------------------------------------------------------------------------------------------------------------------------------------------- Edited February 10, 2017 by Mandalore5150 Link to comment
pa3ck Posted February 11, 2017 Share Posted February 11, 2017 There is no if but an else here addEventHandler("onColShapeHit", Zone1, enterArea1) else Remove that else. 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