12p Posted November 14, 2011 Share Posted November 14, 2011 (edited) In client, the use of getPlayerMoney returns local player's money and doesn't need any argument. For setPlayerMoney, only needs 1 argument. It sets local player's money. Am I right? Also, what happens if I replace any MTA built-in function with my own? For example, instead of built-in setPlayerMoney, I create my own custom function, and call it setPlayerMoney too. If I use it on my script file, what happens to MTA? Does it use the custom or the built-in function? Edited November 14, 2011 by Guest Link to comment
^Dev-PoinT^ Posted November 14, 2011 Share Posted November 14, 2011 (edited) [setPlayerMoney] Required Arguments thePlayer: Which player to set the money of amount: A whole integer specifying the new amount of money the player will have and getPlayerMoney Need The localPlayer Onley Edited November 14, 2011 by Guest Link to comment
12p Posted November 14, 2011 Author Share Posted November 14, 2011 (edited) I was sure getPlayerMoney didn't need any argument. Edited November 14, 2011 by Guest Link to comment
^Dev-PoinT^ Posted November 14, 2011 Share Posted November 14, 2011 iam not experienced Scripter i have months To Learn Now i Make My own Rool script wait for other one Link to comment
12p Posted November 14, 2011 Author Share Posted November 14, 2011 If anyone is going to answer to the money client functions thing, please don't use the wiki. Base your answer in your experience. Link to comment
TAPL Posted November 14, 2011 Share Posted November 14, 2011 if you replace any MTA built-in function with your own with same name you i'll get error (stack overflow) Link to comment
12p Posted November 14, 2011 Author Share Posted November 14, 2011 Okay, thank you very much. And what about the first question? Does client getPlayerMoney need any argument, in fact? Or the wiki is wrong with it? I remember it didn't need any. Link to comment
TAPL Posted November 14, 2011 Share Posted November 14, 2011 getPlayerMoney don't need argument in Client i remember i was try to get player money using function getPlayerFromName and try to get his money but always returned my money (local) wiki should be updated Link to comment
CapY Posted November 14, 2011 Share Posted November 14, 2011 wiki should be updated And it is updated, they did some new things.(or just improved design) Link to comment
12p Posted November 14, 2011 Author Share Posted November 14, 2011 Ty TAPL. I'll now update the wiki. I was waiting for this reply to do it hahaha Link to comment
AGENT_STEELMEAT Posted November 14, 2011 Share Posted November 14, 2011 No to all the above. Simply do this to replace a MTA function with one of your own: _getPlayerMoney = getPlayerMoney --store the old function function getPlayerMoney() --Your code here end setPlayerMoney clientside sets the local players money, but does not sync it with the server. Link to comment
12p Posted November 14, 2011 Author Share Posted November 14, 2011 Ty for the supermega fast tutorial and the other thing 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