NotAvailable Posted June 18, 2010 Share Posted June 18, 2010 Hi, There is a horrible bug in my weapon shop: Ex. You have 1000$ & you buyed a M4 for 1000$... Then you kill a zombie & you get the 1000$ back + the zombie kill reward.. Someone knows how to fix it? Link to comment
Castillo Posted June 18, 2010 Share Posted June 18, 2010 Hi, There is a horrible bug in my weapon shop:Ex. You have 1000$ & you buyed a M4 for 1000$... Then you kill a zombie & you get the 1000$ back + the zombie kill reward.. Someone knows how to fix it? edit your zombie reward script Link to comment
Dark Dragon Posted June 19, 2010 Share Posted June 19, 2010 make sure both scripts use serverside money functions to avoid that Link to comment
TheRealCow Posted June 19, 2010 Share Posted June 19, 2010 maybe are you functions names same ? so he can trigger the events or something ? Link to comment
dzek (varez) Posted June 19, 2010 Share Posted June 19, 2010 your weapon shop is using client-side money taking. ITS WRONG. Use server-side example: -- instead of using something like (client side): takePlayerMoney(playerElement, price) -- use: (client side) triggerServerEvent('takeMoneyFromMe', playerElement, price) -- (server side part) addEvent('takeMoneyFromMe', getRootElement(), function(price) takePlayerMoney(source, price) end) -- you should add server side money checking too, to prevent money hacking and/or getting NEGATIVE money after buying 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