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:

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

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

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

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...