xeon17 Posted October 7, 2014 Share Posted October 7, 2014 Hello there, I have a small problem with the function getElementInterior , so everything is working but only the getElementInterior have a error at argument 1 got nil. I don't know to fix it,so please tell me what i'm doing wrong. addEvent("goLos", true) addEventHandler("goLos", root, function() if getPlayerMoney(source) >= 500 then takePlayerMoney(source, 500) fadeCamera ( source, false, 2.0, 0, 0, 0 ) setTimer ( fadeCameraDelayed, 3000, 1, source ) setTimer(theAir, 2000, 1, source) setTimer( function () if getElementInterior(source) == 1 then fadeCamera ( source, false, 2.0, 0, 0, 0 ) setTimer ( fadeCameraDelayed, 3000, 1, source ) setTimer(SpawLos, 2500, 1, source) end end, 30000, 1, source) end end ) Regards. Link to comment
Dimos7 Posted October 7, 2014 Share Posted October 7, 2014 that is client or server side? Link to comment
Dimos7 Posted October 7, 2014 Share Posted October 7, 2014 if getElementType(source) == 'player' then if getElementInterior(player) == 1 Link to comment
DNL291 Posted October 7, 2014 Share Posted October 7, 2014 Try this: addEvent("goLos", true) addEventHandler("goLos", root, function() if getPlayerMoney(source) >= 500 then takePlayerMoney(source, 500) fadeCamera ( source, false, 2.0, 0, 0, 0 ) setTimer ( fadeCameraDelayed, 3000, 1, source ) setTimer(theAir, 2000, 1, source) setTimer( function (source) if getElementInterior(source) == 1 then fadeCamera ( source, false, 2.0, 0, 0, 0 ) setTimer ( fadeCameraDelayed, 3000, 1, source ) setTimer(SpawLos, 2500, 1, source) end end, 30000, 1, source) end end ) Link to comment
xeon17 Posted October 7, 2014 Author Share Posted October 7, 2014 Try this: addEvent("goLos", true) addEventHandler("goLos", root, function() if getPlayerMoney(source) >= 500 then takePlayerMoney(source, 500) fadeCamera ( source, false, 2.0, 0, 0, 0 ) setTimer ( fadeCameraDelayed, 3000, 1, source ) setTimer(theAir, 2000, 1, source) setTimer( function (source) if getElementInterior(source) == 1 then fadeCamera ( source, false, 2.0, 0, 0, 0 ) setTimer ( fadeCameraDelayed, 3000, 1, source ) setTimer(SpawLos, 2500, 1, source) end end, 30000, 1, source) end end ) I fixed it already with help of a friend , thanks anyway for your help DNL291. Your code is correct 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