Wisam Posted May 7, 2014 Share Posted May 7, 2014 (edited) Hey, Im now starting to learn scripting and its going well, but i wanted to know one event that could be very useful and its the player register event, i searched the wiki trying to find an event like onPlayerRegister cause i tryed to make a script that gives the player amount of money when he register.. i also tryed getAccount, getAccountData and onPlayerLogin but i could't figure it out Can you please help me?! Edited May 7, 2014 by Guest Link to comment
JR10 Posted May 7, 2014 Share Posted May 7, 2014 There is no event for onPlayerRegister. The function to add an account is called addAccount, there is no player anywhere so that an event will be triggered for him. You need to track your script and figure out where the account is added and you will probably find the responsible player and will be able to give him money. Link to comment
Wisam Posted May 7, 2014 Author Share Posted May 7, 2014 There is an easier way, i can put the givePlayerMoney in my login/register script at the function which creates an account(addAccount) in the client side, you think this gonna work?! Link to comment
JR10 Posted May 7, 2014 Share Posted May 7, 2014 That's exactly what I suggested in my first post. But, client-side? addAccount is server-side only and givePlayerMoney client-side will not change it server-side and therefore should never be used client-side. Link to comment
TAPL Posted May 7, 2014 Share Posted May 7, 2014 https://forum.multitheftauto.com/viewtopic.php?f=91&t=56958 Link to comment
Wisam Posted May 7, 2014 Author Share Posted May 7, 2014 Thank you alot both, best mta scripters 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