Jump to content

i made a hex gata.lua can someone help me


jdmark

Recommended Posts

object = createObject (980, 2813.330078125, -1468.1806640625, 16.254442214966) 
marker = createMarker(2813.330078125, -1468.1806640625, 16.254442214966, "cylinder", 2, 100, 0, 0, 100) 
function gate(player) 
  local data = getElementData(player,"job") 
  if (data=="hex") then  
  moveObject(object, 500, 2813.330078125, -1468.1806640625, 16.254442214966) 
   else 
   outputChatBox('Sorry, you can't enter the impound.",player,255,0,0) 
end 
  
addEventHandler("onmarkerhit",gateo) 
  
function gatec(player) 
moveObject(object,2813.330078125, -1468.1806640625, 16.254442214966) 
end 
addEventHandler("onmakerleave",gatec) 
end 
 

this is the lua script i made can someone check it please

Link to comment
object = createObject (980, 2813.330078125, -1468.1806640625, 16.254442214966) 
marker = createMarker(2813.330078125, -1468.1806640625, 16.254442214966, "cylinder", 2, 100, 0, 0, 100) 
  
function gate(player) 
    local data = getElementData(player,"job") 
    if (data=="hex") then 
        moveObject(object, 500, 2813.330078125, -1468.1806640625, 16.254442214966) 
    else 
        outputChatBox("Sorry, you can't enter the impound.",player,255,0,0) -- used both ' and " which broke the function 
    end 
end 
addEventHandler("onMarkerHit", marker, gate) -- Case sensitive!  
      
function gatec(player) 
    moveObject(object,2813.330078125, -1468.1806640625, 16.254442214966) 
end 
addEventHandler("onMarkerLeave", marker, gatec) -- case sensitive as well 
   

Link to comment
  • Moderators

I think that will be type()

if type(value) =="table" then -- not sure if table is also a type, but yes I think it is. 
  
elseif type(value) =="string" then 
  
elseif type(value) =="number" then 
  
end 

But hex becomes a number....... or you should first convert it to a string.

tostring() 
tonumber() 
  

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