KraZ Posted August 20, 2012 Posted August 20, 2012 Why doesn't my script work? no debug errors... http://pastebin.com/f9hvvZ78
TAPL Posted August 20, 2012 Posted August 20, 2012 radar = createRadarArea(2418.4255371094, -1735,121.6306152344,100,0,150,0,153) setElementData(radar,"zombieProof",true) staffZone = createColRectangle (2418.4255371094, -1735,121.6306152344,100) addEventHandler("onColShapeHit", staffZone, function(h) if not isElement(h) then return end if getElementData(h,"zombie") then killPed(h) end end) function enterArea(thePlayer) local posX, posY = getElementPosition(thePlayer) local inArea = isInsideRadarArea(radar, posX, posY) if (inArea) then if hasObjectPermissionTo(thePlayer, "command.slap") then outputChatBox("Welcome to the StaffZone", thePlayer, 0, 255, 0, true) else outputChatBox("You are not allowed in this area, Sorry...", thePlayer, 255, 0, 0, true) outputChatBox("You are being warped.", thePlayer, 255, 0, 0, true) setElementPosition(thePlayer, 2341.2072753906, -1658.8668212891, 13.379216194153) end end end addEventHandler("onColShapeHit", staffZone, enterArea)
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