• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Windows Gesior VIPSystem

Natan Beckman

Well-Known Member
Joined
Aug 1, 2010
Messages
548
Reaction score
54
Location
Teresina-PI/Br
how i can add:

PHP:
                        $buy_player_account->setCustomField('vip_time', '86400' * $buy_offer['days'] + time());
                        $buy_player_account->setCustomField('vip', '1');
                         }
                        elseif ($player_vip_days >= 1) {
                        $buy_player_account->setCustomField('vip_time', $player_lastlogin +('86400' * $buy_offer['days']));
                        }

in:

PHP:
										if($buy_offer['type'] == 'pacc') {
											$player_vip_time = $buy_player_account->getCustomField('vip_time');
											$player_lastlogin = $buy_player_account->getCustomField('lastday');
											$save_transaction = 'INSERT INTO '.$SQL->tableName('z_shop_history_pacc').' (id, to_name, to_account, from_nick, from_account, price, pacc_days, trans_state, trans_start, trans_real) VALUES (NULL, '.$SQL->quote($buy_player->getName()).', '.$SQL->quote($buy_player_account->getId()).', '.$SQL->quote($buy_from).',  '.$SQL->quote($account_logged->getId()).', '.$SQL->quote($buy_offer['points']).', '.$SQL->quote($buy_offer['days']).', \'realized\', '.$SQL->quote(time()).', '.$SQL->quote(time()).');';
											$SQL->query($save_transaction);
											$buy_player_account->setCustomField('vip_time', $player_vip_time+$buy_offer['days']);
											$account_logged->setCustomField('premium_points', $user_premium_points-$buy_offer['points']);
											$user_premium_points = $user_premium_points - $buy_offer['points'];
											if($player_vip_time == 0) {
												$buy_player_account->setCustomField('lastday', time());
											}
											$main_content .= '<center><h2>VIP Days added!</h2><b>'.$buy_offer['days'].' time</b> of VIP time added to the account of player <b>'.$buy_player->getName().'</b> for <b>'.$buy_offer['points'].' premium points</b> from your account.<br />Now you have <b>'.$user_premium_points.' premium points</b>.<br><br><a href="index.php?subtopic=shopsystem">Go to Shop Site</a><br>';
											}
 
Back
Top