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

Proglem z wyciągnięciem danych

Status
Not open for further replies.

Jensej

Member
Joined
Feb 28, 2009
Messages
807
Reaction score
8
Witam.
Robie sobie skrypt w php.
I potrzebuję, aby skyrpt wyświetlał mi Nazwe Gildi oraz ilość członków, gdy jestem zalogowany na konto Lidera(mówie tutaj o stronie )(php).
Proszę o pomoc
 
@up
Tak?
A czym jest obiekt $guild?
Pomysl.

Pierdolnij foreacha po kazdej gildi i sprawdzaj czy nie jest leaderem (popatrz do guilds.php, albo kolegi up).
Moze troche czasochlonne, ale ZYCIE.
 
forum od tego jest, próbowałem tak jak mówisz ale $guild świruję dlatego napisałem. Aż tak płytki nie jestem żeby odrazu pisać, najpierw próbowałem
 
PHP:
if( $guild->getLeader()->getId() == $zalogowany_lider_czy_cos ) {
	$n = 0;
	foreach( $guild->getGuildRanks() as $rank )
		$n += count($rank->getPlayers());

	echo $guild->getName() . ' (' . $n . ')';
}
 
Status
Not open for further replies.
Back
Top