12p Posted February 28, 2011 Posted February 28, 2011 By logic, if there is a "ping" element data, then it should exist a "money" element data. Does it exist, and what's the name of it? I tried with "money" and "cash" but both doesn't work... It is for my "dxscoreboard" 'modification'
Castillo Posted March 1, 2011 Posted March 1, 2011 I don't think it exist an element data for that o_O, but you could do it by yourself easily San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
12p Posted March 1, 2011 Author Posted March 1, 2011 There is no such event like onPlayerMoneyChange, I don't have any idea of how to do that Of course I could do it by setTimer or using onClientRender but it wouldn't be ok and may use too much CPU.
Moderators Citizen Posted March 1, 2011 Moderators Posted March 1, 2011 Hi The Kid, Of course I could do it by setTimer lol I thought that at the begining but I have another idea: (All in ServerSide: ) Replace all givePlayerMoney by giveMoney in your GM and put this function in your code: function giveMoney( thePlayer, money ) if amount and money then givePlayerMoney( thePlayer, money ) triggerEvent( "onPlayerMoneyChange", getRootElement (), thePlayer, money ) end end And put this at the top of your GM: addEvent("onPlayerMoneyChange", true ) Then you can use addEventHandler( "onPlayerMoneyChange", getRootElement(), yourFunction ) for every functions you want Exemple: function yourFunction( thePlayer, money ) -- executed each time the server uses the giveMoney function end addEventHandler( "onPlayerMoneyChange", getRootElement(), yourFunction ) I think that it is what you want The rEvolution is coming ...
Moderators Citizen Posted March 1, 2011 Moderators Posted March 1, 2011 No problem The rEvolution is coming ...
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