toptional Posted August 17, 2013 Share Posted August 17, 2013 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
./BlackBird# Posted August 17, 2013 Share Posted August 17, 2013 thePlayer = The resource that was started Link to comment
toptional Posted August 17, 2013 Author Share Posted August 17, 2013 So whats the fix? Must I define thePlayer or something, I'm confused. Link to comment
./BlackBird# Posted August 17, 2013 Share Posted August 17, 2013 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
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