Já diz tudo né ?
Estou com este sistema de vip
http://www.xtibia.co...s-04-e-tfs-036/
porem o sistema de venda de vip do gesior é diferente, e o player acaba não recebendo a vip , porem no site muda o status pra vip, alguém me ajuda?
está é a parte que acho que tem que mudar algo porem não sei o que é
if($buy_offer['type'] == 'vipdays') {
$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);
if($player_vip_time > 0)
$buy_player_account->setCustomField('vip_time', $player_vip_time + $buy_offer['days'] * 86400);
else
$buy_player_account->setCustomField('vip_time', time() + $buy_offer['days'] * 86400);
$account_logged->setCustomField('premium_points', $user_premium_points-$buy_offer['points']);
$user_premium_points = $user_premium_points - $buy_offer['points'];
e esta aqui é como funciona o sistema vip
function getResetTemple(cid)
local Query = db.getResult("SELECT `reset_temple` FROM `players` WHERE `players`.`id` = ".. getPlayerGUID(cid) ..";")
return (isPlayer(cid) == true and (Query:getDataInt("reset_temple") == 1)) and true or false
end
function isVip(cid)
local Query = db.getResult("SELECT `vip` FROM `accounts` WHERE `accounts`.`id` = ".. getPlayerAccountId(cid) ..";")
return (isPlayer(cid) == true and (Query:getDataInt("vip") == 1)) and true or false
end
function getVipTimeByName(Name)
local Query = db.getResult("SELECT `vip_time` FROM `accounts` WHERE `accounts`.`id` = ".. getAccountIdByName(Name) ..";")
return Query:getDataInt("vip_time")
end
function getVipDays(cid)
local Query = db.getResult("SELECT `vip_days` FROM `accounts` WHERE `accounts`.`id` = ".. getPlayerAccountId(cid) ..";")
return Query:getDataInt("vip_days")
end
Alguém ? me ajuda?