• 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!

Code change

Joined
Jun 19, 2009
Messages
1,852
Reaction score
5
Hello!

Aleh made a vip script(php).. I'm currently using his but I've changed my vip system now.. it's based on this script by Kekox

So my question is, cud someone change this php script so it works with the vip system I am currently using?

PHP:
$vip = $SQL->query('SELECT `player_storage`.`player_id`, `player_storage`.`key`, `players`.`id` FROM `player_storage`, `players` WHERE `player_storage`.`player_id` = '.$player->getId().' AND `key` = 11551;')->fetchall();
if($vip[0]['key'] == 11551)
    $vipp = '<center><font color="green"><b>VIP</b></font></center>';
else
    $vipp = '<center><font color="red"><b>FREE</b></font></center>';

thanks!
 
try this:
Code:
$vip = $SQL->query("SELECT `vipdays` FROM `accounts` WHERE `id` IN (SELECT `account_id` FROM `players` WHERE `id` = '.$player->getId().')")
if($vip[0]['vipdays'] > 0)
	$vipp = '<center><font color="green"><b>VIP</b></font></center>';
else
	$vipp = '<center><font color="red"><b>FREE</b></font></center>';
im not either good at queries or php
 
Last edited:
what do you mean? :p this script doesn't connect with the sever i think, only with aac because it's highscores.php

if you mean site error then this:

Parse error: syntax error, unexpected T_IF in C:\xampp\htdocs\highscores.php on line 94
 
Maybe i think what the variable $vip need be closed in the line

PHP:
$vip = $SQL->query("SELECT `vipdays` FROM `accounts` WHERE `id` IN (SELECT `account_id` FROM `players` WHERE `id` = '.$player->getId().$')");
if($vip[0]['vipdays'] > 0)
	$vipp = '<center><font color="green"><b>VIP</b></font></center>';
else
	$vipp = '<center><font color="red"><b>FREE</b></font></center>';
 
None of the scripts works :s

Aveo's error:

Fatal error: Uncaught exception 'OutOfBoundsException' in C:\xampp\htdocs\pot\OTS_Player.php:2850 Stack trace: #0 C:\xampp\htdocs\highscores.php(93): OTS_Player->__get('getId') #1 C:\xampp\htdocs\index.php(167): include('C:\xampp\htdocs...') #2 {main} thrown in C:\xampp\htdocs\pot\OTS_Player.php on line 2850

Existance's error:

Parse error: syntax error, unexpected T_IF in C:\xampp\htdocs\highscores.php on line 94
 
Code:
$vip = $SQL->query("SELECT `vipdays` FROM `accounts` WHERE `id` IN (SELECT `account_id` FROM `players` WHERE `id` = ".$player->getId().")");
 
Back
Top