Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Q&A
How to make a button visible if your a gang member (Help Please)
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Ben144" data-source="post: 467578" data-attributes="member: 73963"><p>Hey,</p><p></p><p>I am using FluxRP an i have created a simple button where the button is only visible to gang members only, meaning the user must be part of a gang to see the button, just like the gangs page but the button is not appearing .</p><p></p><p>[CODE=php] <?php</p><p>$gangID = filter($_GET['id']);</p><p>$topstatsurl = $url."/ganglb";</p><p>if (isset($_GET['id']))//We have an ID, search.</p><p>{</p><p> $gangID = filter_var($_GET['id'], FILTER_VALIDATE_INT); //Filter id for only intgers</p><p> if (mysql_num_rows(mysql_query('SELECT * FROM `rp_gangs` WHERE `id` = '.$gangID.' LIMIT 1')) == 1) //check if result exists</p><p> {</p><p> echo '<li id="tab-register-now"></p><p> <a href="{url}/gangs" style="z-index: 1;float: right;background-color: #ff0000;padding: 9px 9px;color: #000;text-decoration: none;margin-right: 100px;margin-top: 50px;font-size: 15px;font-weight: bold;border-radius: 10px;"><b>Staff Only</b><i></i></a> </li></p><p> ';</p><p> }</p><p>}</p><p>else</p><p>{</p><p> $getInfo = mysql_query("SELECT id,gang_id FROM rp_stats WHERE id = '".$_SESSION['user']['id']."'");</p><p> $OurInfo = mysql_fetch_array($getInfo);</p><p></p><p> if ($OurInfo['gang_id'] != 0)</p><p> $gangID = $OurInfo['gang_id'];</p><p> else</p><p> {</p><p> //die("Didn't choose a gang, and your not in a gang, set one up in game with :gangid");</p><p> header("Location: ".$topstatsurl);</p><p> exit;</p><p> die();</p><p> }</p><p>}</p><p></p><p>$getGangRanks = mysql_query("SELECT * FROM `rp_gangs_ranks` WHERE `gangid` = '".$gangID."' ORDER BY `rankid` DESC") or die(mysql_error());</p><p>$getGangMemebers = mysql_query("SELECT * FROM `rp_stats` WHERE `gang_id` = '".$gangID."' ORDER BY `gang_rank` DESC") or die(mysql_error());</p><p></p><p>?>[/CODE]</p><p></p><p>Any help appreciated and thanks in advance.</p></blockquote><p></p>
[QUOTE="Ben144, post: 467578, member: 73963"] Hey, I am using FluxRP an i have created a simple button where the button is only visible to gang members only, meaning the user must be part of a gang to see the button, just like the gangs page but the button is not appearing . [CODE=php] <?php $gangID = filter($_GET['id']); $topstatsurl = $url."/ganglb"; if (isset($_GET['id']))//We have an ID, search. { $gangID = filter_var($_GET['id'], FILTER_VALIDATE_INT); //Filter id for only intgers if (mysql_num_rows(mysql_query('SELECT * FROM `rp_gangs` WHERE `id` = '.$gangID.' LIMIT 1')) == 1) //check if result exists { echo '<li id="tab-register-now"> <a href="{url}/gangs" style="z-index: 1;float: right;background-color: #ff0000;padding: 9px 9px;color: #000;text-decoration: none;margin-right: 100px;margin-top: 50px;font-size: 15px;font-weight: bold;border-radius: 10px;"><b>Staff Only</b><i></i></a> </li> '; } } else { $getInfo = mysql_query("SELECT id,gang_id FROM rp_stats WHERE id = '".$_SESSION['user']['id']."'"); $OurInfo = mysql_fetch_array($getInfo); if ($OurInfo['gang_id'] != 0) $gangID = $OurInfo['gang_id']; else { //die("Didn't choose a gang, and your not in a gang, set one up in game with :gangid"); header("Location: ".$topstatsurl); exit; die(); } } $getGangRanks = mysql_query("SELECT * FROM `rp_gangs_ranks` WHERE `gangid` = '".$gangID."' ORDER BY `rankid` DESC") or die(mysql_error()); $getGangMemebers = mysql_query("SELECT * FROM `rp_stats` WHERE `gang_id` = '".$gangID."' ORDER BY `gang_rank` DESC") or die(mysql_error()); ?>[/CODE] Any help appreciated and thanks in advance. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
How to make a button visible if your a gang member (Help Please)
Top