Jump to content

[HELP] Weapon shop bug


Recommended Posts

Posted

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?

Posted
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 :roll:

Posted

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

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...