Jump to content

Various


12p

Recommended Posts

Posted (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 by Guest
Posted (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 by Guest
Posted

If anyone is going to answer to the money client functions thing, please don't use the wiki. Base your answer in your experience.

Posted

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.

Posted

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

Posted

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.

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