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

[php] Short php question in Shopoffer.php

nystrom

New Member
Joined
Nov 17, 2009
Messages
269
Reaction score
0
Well i got a map hosting:) i need to change that in shosystem it only show player with world_id 1 in this part of shopsystem.php

PHP:
	$players_from_logged_acc = $account_logged->getPlayersList();
						if(count($players_from_logged_acc) > 0) {
							$players_from_logged_acc->orderBy('name');
							foreach($players_from_logged_acc as $player) {
								$main_content .= '<option>'.$player->getName().'</option>';
							}
						} else {
							$main_content .= 'You don\'t have any character on your account.';


Hope someone can help me! repp ofc^_^
 
Could you please try to be more precisive with your question or try to write it in decent english.

Cause I don't understand what you whant from us atm.
 
Could you please try to be more precisive with your question or try to write it in decent english.

Cause I don't understand what you whant from us atm.

Ok! I will try.

In this script belove it selects all players from the "logged" account, instead i want it to select it all players with world_id =1


PHP:
    $players_from_logged_acc = $account_logged->getPlayersList();
                        if(count($players_from_logged_acc) > 0) {
                            $players_from_logged_acc->orderBy('name');
                            foreach($players_from_logged_acc as $player) {
                                $main_content .= '<option>'.$player->getName().'</option>';
                            }
                        } else {
                            $main_content .= 'You don\'t have any character on your account.';
 
Sorry I am not familiar with the G-acc code, so I fear I cannot help you with that.
 
Code:
foreach($players_from_logged_acc as $player)
	if($player->getWorld() == 1)
		$main_content .= '<option>'.$player->getName().'</option>';
 
Back
Top