Sign in to follow this  
Robbster

getElementInterior

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) 
  

Share this post


Link to post
    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

Share this post


Link to post

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.