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

Solved [Gesior Acc Maker for TFS 8.31] Position of players

drax skylon

o.O DrAx O.o
Joined
Sep 9, 2008
Messages
225
Reaction score
3
Hiho!

Well, I've posted it but anyone help me so I'm posting again...
well...I'd like show in "Account Information" the position of Accounts (like Tibia Global).
Real Name: XXX
Location: EUA
Position: Gamemaster
Creation: XXX

Well I've done it:
<TR BGCOLOR='.$config['site']['lightborder'].'><TD WIDTH=20%>Position:</TD><TD>'.$account->getCustomField("type").'</TD></TR>

And it's working nice...but it show only the number of "account type". For exemple:
The Gamemaster have "Account Type = 4" so it show it:
Position: 4

Well...I'd like change this numbers to names...(type 1= Player; type 2= Tutor; type 3=Senior Tutor; type 4= GM; type 5= GOD).

Please help me!!!!
 
Last edited:
Really easy :P
Note: Im using latest Gesior Website!

go to config/ and open config.php and add this in a new line:

PHP:
$positions = array(5 => 'GameMaster', 4 => 'Community Manager', 3 => 'Senior Tutor', 2 => 'Tutor', 1 => 'Player');

And instead of what you post in there:
PHP:
<TR BGCOLOR='.$config['site']['lightborder'].'><TD WIDTH=20%>Position:</TD><TD>'.$account->getCustomField("type").'</TD></TR>

Replace it with this:

PHP:
<TR BGCOLOR='.$config['site']['lightborder'].'><TD WIDTH=20%>Position:</TD><TD>'.$positions[$account_logged->getCustomField('type')].'</TD></TR>

If its not working its because u are not using latest Gesior website!

in config.php you can change the named and values from the positions!
 
It don't work cuz my version is 0.2 ( think)
But I've solve it...
I've created a new column in my database called "position". And I've put the default value called "player".
I've change my script for it
<TR BGCOLOR='.$config['site']['lightborder'].'><TD WIDTH=20%>Position:</TD><TD>'.$account->getCustomField("position").'</TD></TR>
So when you search the players it'll be showed... and you must edit de column "position" to the position of the account... If you have a gamemaster account you must change the column of the account to "Gamemaster".

Done!
Thank you for your help!!

Cya
 
Back
Top