Author Topic: [SOLVED] Credits code, need help bad!!  (Read 2057 times)

Offline capabmx

[SOLVED] Credits code, need help bad!!
« on: December 03, 2007, 12:17:04 am »
Thanks in advance to whoever helps me out with this :). I'm just looking for the code that gives a user credits when he/she posts. Because I'd like to use it for other things like referrals, and whatnot. Any help would be greatly appreciated, and I can probably find it if nobody helps, but I'm trying to make a couple of other mods so I'm like strangled lol.

Offline Daniel15

Re: Credits code, need help bad!!
« Reply #1 on: December 03, 2007, 12:28:49 pm »
You can use something like this, it's the neatest way:
Code: [Select]
updateMemberData($context['user']['id'], array('money' => 'money + 10'));
That gives the current user ($context['user']['id'] is the current user's ID) 10 credits. Change the "10" to whatever you want :)

Offline capabmx

Re: Credits code, need help bad!!
« Reply #2 on: December 04, 2007, 06:32:17 am »
Ahh thank you so much :).