• 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 Vip status.

Natan Beckman

Well-Known Member
Joined
Aug 1, 2010
Messages
548
Reaction score
54
Location
Teresina-PI/Br
hi good guys will try to explain my doubt!
I'm having a problem, in the vip status shows that the player is VIP or not.
In the system gesior acc vip status obeys the storage.
More vip my system does not work for storage.
So the idea is to make the VIP status obey the function vip_time.
so I adicinais this tag in character.php:
PHP:
                                if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
                                $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>VIP Status:</TD><TD>';
                                $main_content .= ($account->isVip()) ? '<b><font color="green">VIP Account</font></b>' : '<b><font color="red">NOT VIP</font></b>';
                               if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
                                $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD VALIGN=top>Comment:</TD><TD>'.$comment.'</TD></TR>';
                        }
                        }
only that of an error in OTS_Account.
I added the tag in OTS_Account.php:
PHP:
    public function getVip_Time()
    {
        if( !isset($this->data['vip_time']) || !isset($this->data['lastday']) )
        {
            throw new E_OTS_NotLoaded();
        }

        return $this->data['vip_time'] - (date("z", time()) + (365 * (date("Y", time()) - date("Y", $this->data['lastday']))) - date("z", $this->data['lastday']));
    }
	
    public function getLastLogin()
    {
        if( !isset($this->data['lastday']) )
        {
            throw new E_OTS_NotLoaded();
        }

        return $this->data['lastday'];
    }
	
    public function isVip()
    {
        return ($this->data['vip_time'] - (date("z", time()) + (365 * (date("Y", time()) - date("Y", $this->data['lastday']))) - date("z", $this->data['lastday'])) > 0);
    }
There's no more error.
More does not show whether the player is VIP or not.

My OTS_Account.php:
<?php /**#@+ * @version 0 - Anonymous - GArAj0fX - Pastebin.com

My character.php
<?PHP $name = stripslashes(uc - Anonymous - 8deujFuU - Pastebin.com

Help plz....
 
Last edited:
Back
Top