Just do the same thing you did to create the first plugin except this plugin use the ibproarcade_play_game_popup hook when adding a new plugin.
The one I made;
Product - ibank (dont think it matters but I put them under IBank)
Hook location - ibproarcade_play_game_popup
title - new window (just my name for it)
Code:
$amount = '1';
if (($vbulletin->userinfo[$vbulletin->options['icashf']] - $amount) < 0) {
eval(standard_error(fetch_error('stars')));
}
$vbulletin->db->query("update " . TABLE_PREFIX . "user set {$vbulletin->options['icashf']}={$vbulletin->options['icashf']}-'{$amount}' where userid='{$vbulletin->userinfo['userid']}'");
The only thing I changed from the original code from post 392 is your_error to stars as that is the name of the phrase I used to say you do not have enough stars to play a game.
If a members clicks on play a game the other one from post 392 charges the game cost, if they click on play game in new window this one charges them the cost of the game.
|