Jump to content

getElementInterior


toptional

Recommended Posts

Simple short code not working.

(Server Sided)

function getInterior ( thePlayer ) 
    if ( getElementInterior( thePlayer ) == 0 ) then 
        outputChatBox ( "Yes you are outside ", thePlayer ) 
    else 
        outputChatBox ( "No you aren't outside ", thePlayer ) 
    end 
end 
addEventHandler("onResourceStart",getRootElement(),getInterior) 
  

Link to comment
    function getInterior ( ) 
 for _,thePlayer in ipairs(getElementsByType("player")) do 
        if ( getElementInterior( thePlayer ) == 0 ) then 
            outputChatBox ( "Yes you are outside ", thePlayer ) 
        else 
            outputChatBox ( "No you aren't outside ", thePlayer ) 
        end 
    end 
 end 
    addEventHandler("onResourceStart",getRootElement(),getInterior) 
      

or change event

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