Log in

View Full Version : "charging" points for an act


tort
05-04-2007, 09:31 PM
I have competitions.php installed and icash.


I am trying to "charge" for every entry into the competition. Lets say something like 20 points.
Usually, when trying to charge or give for something I know you just post the following in the appropriate hook:


$amount = '1';
$vbulletin->db->query("update " . TABLE_PREFIX . "user set {$vbulletin->options['icashf']}={$vbulletin->options['icashf']}+'{$amount}' where userid='{$vbulletin->userinfo['userid']}'");


The problem I am having is that it does not appear that there are any hooks for me to insert that code into under the competitions addon.

For those that are not familiar with competitions.php.....

Basically, competitions are created and users can submit an answer to a question, I want to run some sort of function that debits x amount of points from thier accounts whenever they submit an answer.

thank you, I have tried to explain as much as I can, but if I have left anything out let me know.

Thanks,


I run 3.6.5

i figured it out, thanks!