• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Player Flags Is it only for premiums?

feslir

New Member
Joined
Sep 2, 2007
Messages
241
Reaction score
2
Location
Kosovo
Been trying to find how to edit the characters.php
so u get you're country flag at the name like this.
is it only for premiums?

ncdv8x.jpg
 
Last edited:
Try this..
Go to this line:
Code:
$main_content .= ($player->isOnline()) ? 'green' : 'red';
Aprox line 16.

after that line paste this:
Code:
			$acc = $SQL->query('SELECT * FROM accounts where id = '.$account->getId().';')->fetch();

And next to:
Code:
<b>'.$player->getName().'</b>

Paste:
Code:
<image src="image_directory/'.$acc['flag'].'.png">

Dont forget to change image_directory for the directory where you store the flag images.
 
Last edited:
Like this?

$acc = $SQL->query('SELECT * FROM accounts where id = '.$account->getId().';')->fetch();
<b>'.$player->getName().'</b>
<image src="image_directory/'.$acc['flag'].'.png">
$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD WIDTH=20%>Name:</TD><TD><font color="';
$main_content .= ($player->isOnline()) ? 'green' : 'red';
 
No.. Like this:
Code:
	$main_content .= ($player->isOnline()) ? 'green' : 'red';
	$acc = $SQL->query('SELECT * FROM accounts where id = '.$account->getId().';')->fetch();
	$main_content .= '"><b>'.$player->getName().'</b> <image src="flags/'.$acc['flag'].'.png"></font>';

I did not mean to say before, I did mean after XD!
 
Nice

dude it worked but but how can u do like a new bar under the player name like Country then the flag?

and million thanks for helping me:P
 
Last edited:
After
Code:
			$main_content .= '"><b>'.$player->getName().'</b> <image src="flags/'.$acc['flag'].'.png"></font>';

Paste:
Code:
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>Country:</TD><TD><image src="flags/'.$acc['flag'].'.png"></TD></TR>';
 
go to this line
Code:
$main_content .= '"><b>'.$player->getName().'</b> <image src="flags/'.$acc['flag'].'.png"></font>';
and remove
Code:
<image src="flags/'.$acc['flag'].'.png">
 
Back
Top