Vercetti1010 Posted February 9, 2008 Share Posted February 9, 2008 k, here is the situation. i need some help on making a script that sets a players money to x amount when he spawns. ive been around the forums and the example scripts dont work. yes, i put it at the end of broph. please give me information that a person new to lua would understand, dont just give me a link to the wiki. oh one more note, id rather this be a separate script so we dont have to rely on broph. Link to comment
Jumba' Posted February 9, 2008 Share Posted February 9, 2008 Make a folder in C:\Program Files\MTA San Andreas\server\mods\deathmatch\resources\ call it "joinmoney" (or whatever) Open up a text editor and put this. You can change the 10000 to whatever amount to whatever you want. function consoleMoneyOnJoin ( ) givePlayerMoney ( source, 10000 ) outputChatBox ("There's $10k for you!", source, 255, 255, 0, true ) end addEventHandler ( "onPlayerJoin", getRootElement(), consoleMoneyOnJoin ) save it as money.lua now create a file called meta.xml and put this in it. "Yourname" description="Description" type="server" /> Place these two files in the moneyj folder and done, now you just do /start moneyj to get it to work. MAybe you could also add it in the mta server config file to start automatically when the server starts. Link to comment
Vercetti1010 Posted February 9, 2008 Author Share Posted February 9, 2008 thank you. i appreciate the relevant answer. i guess you could have told by now that im a newbie. im glad to get some help and not just the wiki or someone telling me that this has been discussed already (not going to name any names) 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