-
Posts
727 -
Joined
-
Last visited
-
Days Won
40
Content Type
Profiles
Forums
Events
Everything posted by peterisgb
-
well the page just diplays the users, but nothing else, can't click them or anything, no other information is being taken by the database into the page.
-
well my game runs on all odd ID's are hackers and all even ID's are police. they fight eachother gaining points for there team. hackers vs police, its become quite successfull for me, but users are saying that they would like a page displaying all the users in the opposite team, i think it would be a good thing to have for me theme
-
the idea is its suppose to be like the normal userlist page, but when clicking odd/even in the selection list it displays evens and odds.
-
that kinda works, defo shows users, but all id's and links dont work. just displays username
-
I've tried to edit this page to get it to show only even or odd id's but i ain't doing something right, could i have a little help with this please. ty <?php include "globals.php"; global $db,$ir,$c,$userid,$h; $db->query("UPDATE users SET lastpage='Userlist' WHERE userid=$userid"); $_GET['st'] = abs((int) $_GET['st']); $st=($_GET['st']) ? $_GET['st'] : 0; $by=($_GET['by']) ? $_GET['by'] : 'userid'; $ord=($_GET['ord']) ? $_GET['ord'] : 'ASC'; $cnt=mysql_query("SELECT userid FROM users",$c); $membs=mysql_num_rows($cnt); $pages=(int) ($membs/100)+1; if($membs % 100 == 0) { $pages--; } print "Pages: "; for($i=1;$i <= $pages;$i++) { $stl=($i-1)*100; print "<a href='userlist.php?st=$stl&by=$by&ord=$ord'>$i</a> "; } print "<br /> Order By: <a href='userteam.php?st=$st&by=userid&ord=$ord'>User ID</a> | <a href='userteam.php?st=$st&by=username&ord=$ord'>Username</a> | <a href='userteam.php?st=$st&by=Even&ord=$ord'>Even users</a> | <a href='userteam.php?st=$st&by=Odd&ord=$ord'>Odd Users</a> | <a href='userteam.php?st=$st&by=level&ord=$ord'>Level</a> | <a href='userteam.php?st=$st&by=gymlevel&ord=$ord'>Gym Level</a><br /> <a href='userteam.php?st=$st&by=$by&ord=asc'>Ascending</a> | <a href='userteam.php?st=$st&by=$by&ord=desc'>Descending</a><br /><br /> "; print "<h3>Userlist</h3>"; $q=$db->query = 'SELECT `username` FROM `users` WHERE ( `userid` % 2 = '.( array_key_exists ( 'odd', $_GET ) ? 1 : 0 ).' ))'; $no1=$st+1; $no2=$st+100; print "Showing users $no1 to $no2 by order of $by $ord. <table width=90% cellspacing=1 class='table'> <tr style='background:gray'> <th>ID</th> <th>Links</th> <th>Name</th> <th>Level</th> <th>Gym Level</th> <th>Smoking Level</th> <th>Gender</th> <th>Race</th> <th>Online</th> </tr>"; while($r=$db->fetch_row($q)) { $d=""; if($r['donatordays']) { $r['username'] = "<font color='{$r['colour']}'>{$r['username']}</font>";$d="<img src='donator.gif' alt='Donator: {$r['donatordays']} Days Left' title='Donator: {$r['donatordays']} Days Left' />"; } $name=$r['username']; if($r['user_level']== 2) { $staff="<img src='images/owner.gif' alt='Game Staff' />"; } if($r['user_level']== 3) { $staff="<img src='images/owner.gif' alt='Game Staff' />"; } if($r['user_level']== 4) { $staff="<img src='images/owner.gif' alt='Game Staff' />"; } if($r['user_level']== 5) { $staff="<img src='images/owner.gif' alt='Game Staff' />"; } if($r['user_level']== 1) { $staff=""; } if($r['userid']==1) { $staff="<img src='images/owner.gif' alt='Game Staff' /><img src='images/admin.gif' alt='Game Owner' />"; } if ($r['sidename'] == 0) { $sides="N/A"; } if ($r['sidename'] == 1) { $sides="<img src='hacker.gif' title='Hackers' width='15' height='15'><b> <u><font color='cadetblue'>Hackers</font></u></b>"; } if ($r['sidename'] == 2) { $sides="<img src='police.gif' title='Police' width='15' height='15'><b> <u><font color='red'>Police</font></u></b>"; } print " <tr> <td>{$r['userid']}</td> <td><small>[<a href='viewuser.php?u={$r['userid']}'>View</a>] [<a href='attack.php?ID={$r['userid']}'>Attack</a>] [<a href='mailbox.php?action=compose&ID={$r['userid']}'>Mail</a>]</small></td> <td><a href='viewuser.php?u={$r['userid']}'>{$r['gangPREF']} <font color='{$r['colour']}'> {$r['username']} </font> $d $staff</a></td> <td>{$r['level']}</td> <td>{$r['gymlevel']}</td> <td>{$r['smoking']}</td> <td>{$r['gender']}</td> <td>{$r['race']}</td><td>"; if($r['laston'] >= time()-15*60) { print "<font color=green><b><img src='images/online.png'></b></font>"; } else { print "<font color=red><b><img src='images/offline.png'></b></font>"; } print "</td></tr>"; } print "</table>"; $h->endpage(); ?>
-
oh right, a dumb moment haha, nice work.
-
mccode-v2 Advanced Attack and Inventory Mod--One Click.
peterisgb replied to Joshua's topic in Free Modifications
i know that this mod is a old mod but i noticed one thing that was never mentioned in this whole thread and that is unequip the items. so i edited mine and here it is <?php include "globals.php"; if(!in_array($_GET['type'], array("equip_primary", "equip_secondary", "equip_armor", "equip_boots", "equip_helmet", "equip_breastplate", "equip_ring", "equip_leggings"))) { print "This slot ID is not valid."; $h->endpage(); exit; } if(!$ir[$_GET['type']]) { print "You do not have anything equipped in this slot."; $h->endpage(); exit; } item_add($userid, $ir[$_GET['type']], 1); $db->query("UPDATE users SET {$_GET['type']}=0 WHERE userid={$ir['userid']}"); $names=array( "equip_primary" => "Primary Weapon", "equip_secondary" => "Secondary Weapon", "equip_armor" => "Armor", "equip_boots" => "Boots", "equip_helmet" => "Helmet", "equip_breastplate" => "Breast Plates", "equip_ring" => "Gloves", "equip_leggings" => "Leggings", ); $equip=array( "equip_primary" => "primaryloaned", "equip_secondary" => "secondaryloaned", "equip_armor" => "armorloaned", ); mysql_query("UPDATE users SET {$equip[$_GET['type']]}=0 WHERE userid=$userid",$c); print "The item in your {$names[$_GET['type']]} slot was successfully unequiped."; $h->endpage(); ?> I'm not very good at this but i am surprised to notice not one person ever mentioning removing the items. -
and idea for you gallery, this will be a must see.
-
i was able to copy it perfectly fine with no problems. I've Zipped it for users who can't copy. http://www.vote.infamous-wars.com/download/
-
This is a very good mod. much better than the default page.
-
ty to you both Djkanna, your a star, Sniko, ty for teaching me a little
-
where do i put this, i tried the staff_items page. at the top it show its been credited to userid1 but its doesnt credit it.
-
that easy, thanks very much Sniko, nice work.
-
Hello, a quick question, How would i be able to credit myself all the items in the game to my inventory quickly?
-
i want to make a horse race, where people can bet on a horse and win or loose. i need a little help with a few of the actions. this is what i got so far <?php include "globals.php"; global $db,$ir,$r,$c,$userid,$h,$li; $db->query("UPDATE users SET lastpage='Race track' WHERE userid=$userid"); switch($_GET['action']) { case 'betonhorse2': do_betonhorse_change(); break; case 'racehorse2': do_racehorse_change(); break; default: tracks_home(); break; } function tracks_home() { global $db,$ir,$c,$userid,$h; $horsespeed1=rand(3, 15); $horsespeed2=rand(3, 15); $horsespeed3=rand(3, 15); $horsespeed4=rand(3, 15); print " <table bgcolor='white'><tr><td> <hr color='red' width='40%'><font color='red' size='+2'><center>1</center></font><hr color='red' width='40%'> <marquee behavior='scroll' scrollamount='$horsespeed1'><img src='images/horse.gif'></marquee> <br /> <hr color='blue' width='40%'><font color='blue' size='+2'><center>2</center></font><hr color='blue' width='40%'> <marquee behavior='scroll' scrollamount='$horsespeed2'><img src='images/horse.gif'></marquee> <br /> <hr color='green' width='40%'><font color='green' size='+2'><center>3</center></font><hr color='green' width='40%'> <marquee behavior='scroll' scrollamount='$horsespeed3'><img src='images/horse.gif'></marquee> <br /> <hr color='orange' width='40%'><font color='orange' size='+2'><center>4</center></font><hr color='orange' width='40%'> <marquee behavior='scroll' scrollamount='$horsespeed4'><img src='images/horse.gif'></marquee> </td </tr></table> "; } print ""; $h->endpage(); ?>
-
nice one, thanks for trying it, at least it getting out there lol, illusions gave me a couple good tips on it.
-
yeah i wanted to do that but i'm not that good at coding yet.
-
well i just introduced a teams thing, which each team, odd ids and even ids are in two different teams, in my case its all odd ids are hackers and all even ids are police. the hackers attack the police and police attack hackers, maybe you could work on something along these lines, the basics of this are in the thread before this one. something along these lines but improved would be good, i found it make users more active and want to use the attack system more. gets them more involved and competitive. :) an idea :)
-
thanks it worked like a charm, just another little help The default userlist pages, is there a way i can create another userlist and get it to display only Odd ID's or Even ID's?
-
i'll tset it out and get back with the resaults
-
so if i'm right like this? $db->query("UPDATE users SET sides=sides+1 WHERE userid={$ir['userid']} AND ((($ir['userid'] % 2) != 0)) AND (($r['userid'] % 2) == 0))) ",$c); or like this $db->query("UPDATE users SET sides=sides+1 WHERE userid=$userid AND (($ir['userid'] % 2) != 0))",$c); $db->query("UPDATE users SET sides=sides+1 WHERE userid=$userid AND (($r['userid'] % 2) == 0))",$c); or is that wrong.
-
well in ODD userid attacks a EVEN user ID then that user will get a +1, and if an EVEN id attacks a ODD user id they get a +1 but if a EVEN ID user attacks and EVEN user id they dont get a +1 same with ODD attacking ODD Its battles with good and evil. odds being evil and even id are good, that system is there now but i cant figure this line out to add to attackwon.php etc.
-
hello i need a little help with a sql which i'm not quite understand. could i have some help $db->query("UPDATE users SET sides=sides+1 WHERE userid={$ir['userid']}",$c); This is what i got so far, how would i get this formula to work like this sides +1 if (userid % 2) = 0"); and (userid % 2) <> 0"); so you only get a +1 if you are odd ID attacking Even ID and same vice versa.
-
yeah, i cant use it as my useronline page has far to much info on, mines on this forum somewhere.
-
could you put the system on a better file sharing site please.