Pedro Silveira Posted December 16, 2017 Posted December 16, 2017 Hello, im trying to make this: function verificar12 ( l_5_0 ) anim1, anim2 = getPedAnimation( l_5_0 ) if ( getElementInterior( l_5_0 ) == 1 ) then if ( anim1 == "shop" and anim2 == "shp_serve_loop" ) then givePlayerMoney ( l_5_0, 10000 ) else outputChatBox("Você parou de roubar o caixa e não pegou nenhum dinheiro!", l_5_0, 255, 0, 0) end else outputChatBox("Você saiu da loja e o dinheiro foi devolvido!", l_5_0, 255, 0, 0) end end I call the function in this part: setTimer(verificar12, 90000, 1, l_5_0) But is returning this message: "ERROR: [SCRIPT]RoubarLojas\server.lua:27: attempt to call global 'getPedAnimation' <a nil value>" WHY?
Moderators IIYAMA Posted December 16, 2017 Moderators Posted December 16, 2017 getPedAnimation Isn't available serverside. It clearly says: Client-only function Do you want to improve your Lua programming skills and make less mistakes? Start with Lua Language Server! Useful functions 3x Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
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