Norhy Posted August 2, 2013 Posted August 2, 2013 Please, what's wrong in this code? if (getPlayerMoney(player) > 2500) then -- and then setPlayerMoney(player, getPlayerMoney(player) - 2500 ) It is Client-side.
Castillo Posted August 2, 2013 Posted August 2, 2013 If you set/give/take money client side it won't sync with the server. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Sasu Posted August 2, 2013 Posted August 2, 2013 You can use takePlayerMoney to take an amount money of the player that you want. State: Inactive
-.Paradox.- Posted August 3, 2013 Posted August 3, 2013 He is right, try this one server.lua local killerMoney = 1000 --Amount of money when you kill somebody. local deadPlayerMoney = 1000 --Amount of money you lose when you die. local joinMoney = 1000 --Amount of money you earn when you join the server. function spawnOnJoin() givePlayerMoney(source, joinMoney) end function spawnOnDead(ammo, killer, weapon, bodypart) takePlayerMoney(source, deadPlayerMoney) if (killer) and (killer ~= source) then givePlayerMoney(killer, killerMoney) end end addEventHandler("onPlayerJoin", getRootElement(), spawnOnJoin) addEventHandler("onPlayerWasted", getRootElement(), spawnOnDead) If you're looking for a cheap paid scripter, don't hesitate to contact me. Great minds discuss ideas, Average minds discuss events and small minds discuss people.
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