Jump to content

keep getting an <eof> expected error


5150

Recommended Posts

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