Jump to content
MakeWebGames

gurpreet

Members
  • Posts

    834
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by gurpreet

  1. Re: No attacking people in Fed.   I got a parse error when i used that, so i used:   if($ir['fedjail'] > 0) { print "No attacking people who can't attack back...TUT TUT!"; $h->endpage(); exit; }   But that just lets me still attack people in fed.
  2. Re: Voted Today?   Doesn't work for me when I use: echo ($votes > 4) ? '<u>Vote</u>':'';
  3. Re: No attacking people in Fed. Well, the reason they are in fed is usually because they abused a bug or something to get lots of money. So if theyre in fed, they will just lose it and others who arent in fed will get it all
  4. Ok so i think my attack.php got messed up, people can somehow attack others who are in fed jail, giving them lots of money. here's my attack.php   <?php $menuhide=1; $atkpage=1; include "globals.php"; if($_GET['ID'] == '1') { echo "You cannot attack admin, Sorry."; $h->endpage(); exit; } $_GET['ID'] == (int) $_GET['ID']; if(!$_GET['ID']) { print "WTF you doing, bro?"; $h->endpage(); exit; } else if($_GET['ID'] == $userid) { print "Only the crazy attack themselves."; $h->endpage(); exit; } else if ($ir['hp'] <= 1) { print "Only the crazy attack when their unconscious. [url='index.php']Back[/url]"; $h->endpage(); exit; } else if ($_SESSION['attacklost'] == 1) { print "Only the losers of all their EXP attack when they've already lost. [url='index.php']Back[/url]"; $_SESSION['attacklost']=0; $h->endpage(); exit; } //get player data $youdata=$ir; $q=$db->query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid={$_GET['ID']}"); $odata=$db->fetch_row($q); $myabbr=($ir['gender']=="Male") ? "his" : "her"; $oabbr=($ir['gender']=="Male") ? "his" : "her"; if($ir['attacking'] && $ir['attacking'] != $_GET['ID']) { print "Bad, bad, bad girl. [url='index.php']Back[/url]"; $_SESSION['attacklost']=0; $h->endpage(); exit; } if($odata['hp'] == 1) { print "This player is unconscious. [url='index.php']> Back[/url]"; $h->endpage(); $_SESSION['attacking']=0; $ir['attacking']=0; $db->query("UPDATE users SET attacking=0 WHERE userid=$userid"); exit; } else if($odata['hospital']) { print "This player is in hospital. [url='index.php']> Back[/url]"; $h->endpage(); $_SESSION['attacking']=0; $ir['attacking']=0; $db->query("UPDATE users SET attacking=0 WHERE userid=$userid"); exit; } else if($ir['hospital']) { print "While in hospital you can't attack. [url='hospital.php']> Back[/url]"; $h->endpage(); $_SESSION['attacking']=0; $ir['attacking']=0; $db->query("UPDATE users SET attacking=0 WHERE userid=$userid"); exit; } else if($odata['jail']) { print "This player is in jail. [url='index.php']> Back[/url]"; $h->endpage(); $_SESSION['attacking']=0; $ir['attacking']=0; $db->query("UPDATE users SET attacking=0 WHERE userid=$userid"); exit; } else if($ir['jail']) { print "While in jail you can't attack. [url='jail.php']> Back[/url]"; $h->endpage(); $_SESSION['attacking']=0; $ir['attacking']=0; $db->query("UPDATE users SET attacking=0 WHERE userid=$userid"); exit; } else if($odata['travelling']) { print "That player is travelling. [url='index.php']> Back[/url]"; $h->endpage(); $_SESSION['attacking']=0; $ir['attacking']=0; $db->query("UPDATE users SET attacking=0 WHERE userid=$userid"); exit; } print "<table width=100%><tr><td colspan=2 align=center>"; if($_GET['wepid']) { if($_SESSION['attacking']==0 && $ir['attacking'] == 0) { if ($youdata['energy'] >= $youdata['maxenergy']/2) { $youdata['energy']-= floor($youdata['maxenergy']/2); $me=floor($youdata['maxenergy']/2); $db->query("UPDATE users SET energy=energy- {$me} WHERE userid=$userid"); $_SESSION['attacklog']=""; $_SESSION['attackdmg']=0; } else { print "You can only attack someone when you have 50% energy"; $h->endpage(); exit; } } $_SESSION['attacking']=1; $ir['attacking']=$odata['userid']; $db->query("UPDATE users SET attacking={$ir['attacking']} WHERE userid=$userid"); $_GET['wepid'] = (int) $_GET['wepid']; $_GET['nextstep'] = (int) $_GET['nextstep']; //damage if($_GET['wepid'] != $ir['equip_primary'] && $_GET['wepid'] != $ir['equip_secondary']) { print "Stop trying to abuse a game bug. You can lose all your EXP for that. [url='index.php']> Home[/url]"; $db->query("UPDATE users SET exp=0 where userid=$userid",$c); die(""); } $qo=$db->query("SELECT i.* FROM items i WHERE i.itmid={$_GET['wepid']}"); $r1=$db->fetch_row($qo); $mydamage=(int) (($r1['weapon']*$youdata['strength']/($odata['guard']/1.5))*(rand(8000,12000)/10000)); $hitratio=max(10,min(60*$ir['agility']/$odata['agility'],95)); if(rand(1,100) <= $hitratio ) { $q3=$db->query("SELECT i.armor FROM items i WHERE itmid={$odata['equip_armor']} ORDER BY rand()"); if($db->num_rows($q3)) { $mydamage-=$db->fetch_single($q3); } if($mydamage < -100000) { $mydamage=abs($mydamage); } else if($mydamage < 1) { $mydamage=1; } $crit=rand(1,40); if($crit==17) { $mydamage*=rand(20,40)/10; } else if($crit==25 or $crit == 8) { $mydamage/=(rand(20,40)/10); } $mydamage=round($mydamage); $odata['hp']-=$mydamage; if($odata['hp']==1) { $odata['hp']=0;$mydamage+=1; } $db->query("UPDATE users SET hp=hp-$mydamage WHERE userid={$_GET['ID']}"); print "<font color=red>{$_GET['nextstep']}. Using your {$r1['itmname']} you hit {$odata['username']} doing $mydamage damage ({$odata['hp']})</font> \n"; $_SESSION['attackdmg']+=$mydamage; $_SESSION['attacklog'].="<font color=red>{$_GET['nextstep']}. Using {$myabbr} {$r1['itmname']} {$ir['username']} hit {$odata['username']} doing $mydamage damage ({$odata['hp']})</font> \n"; } else { print "<font color=red>{$_GET['nextstep']}. You tried to hit {$odata['username']} but missed ({$odata['hp']})</font> \n"; $_SESSION['attacklog'].="<font color=red>{$_GET['nextstep']}. {$ir['username']} tried to hit {$odata['username']} but missed ({$odata['hp']})</font> \n"; } if($odata['hp'] <= 0) { $odata['hp']=0; $_SESSION['attackwon']=$_GET['ID']; $db->query("UPDATE users SET hp=0 WHERE userid={$_GET['ID']}"); print " [b]What do you want to do with {$odata['username']} now?[/b] <form action='attackwon.php?ID={$_GET['ID']}' method='post'><input type='submit' value='Mug Them' /></form> <form action='attackbeat.php?ID={$_GET['ID']}' method='post'><input type='submit' value='Hospitalize Them' /></form> <form action='attacktake.php?ID={$_GET['ID']}' method='post'><input type='submit' value='Leave Them' /></form>"; } else { //choose opp gun $eq=$db->query("SELECT i.* FROM items i WHERE i.itmid IN({$odata['equip_primary']}, {$odata['equip_secondary']})"); if(mysql_num_rows($eq) == 0) { $wep="Fists"; $dam=(int)((((int) ($odata['strength']/$ir['guard']/100)) +1)*(rand(8000,12000)/10000)); } else { $cnt=0; while($r=$db->fetch_row($eq)) { $enweps[]=$r; $cnt++; } $weptouse=rand(0,$cnt-1); $wep=$enweps[$weptouse]['itmname']; $dam=(int) (($enweps[$weptouse]['weapon']*$odata['strength']/($youdata['guard']/1.5))*(rand(8000,12000)/10000)); } $hitratio=max(10,min(60*$odata['agility']/$ir['agility'],95)); if(rand(1,100) <= $hitratio) { $q3=$db->query("SELECT i.armor FROM items i WHERE itmid={$ir['equip_armor']} ORDER BY rand()"); if($db->num_rows($q3)) { $dam-=$db->fetch_single($q3); } if($dam < -100000) { $dam=abs($dam); } else if($dam < 1) { $dam=1; } $crit=rand(1,40); if($crit==17) { $dam*=rand(20,40)/10; } else if($crit==25 or $crit == 8) { $dam/=(rand(20,40)/10); } $dam=round($dam); $youdata['hp']-=$dam; if ($youdata['hp']==1) { $dam+=1; $youdata['hp']=0; } $db->query("UPDATE users SET hp=hp-$dam WHERE userid=$userid"); $ns=$_GET['nextstep']+1; print "<font color=blue>{$ns}. Using $oabbr $wep {$odata['username']} hit you doing $dam damage ({$youdata['hp']})</font> \n"; $_SESSION['attacklog'].="<font color=blue>{$ns}. Using $oabbr $wep {$odata['username']} hit {$ir['username']} doing $dam damage ({$youdata['hp']})</font> \n"; } else { $ns=$_GET['nextstep']+1; print "<font color=red>{$ns}. {$odata['username']} tried to hit you but missed ({$youdata['hp']})</font> \n"; $_SESSION['attacklog'].="<font color=blue>{$ns}. {$odata['username']} tried to hit {$ir['username']} but missed ({$youdata['hp']})</font> \n"; } if($youdata['hp'] <= 0) { $youdata['hp']=0; $_SESSION['attacklost']=1; $db->query("UPDATE users SET hp=0 WHERE userid=$userid"); print "<form action='attacklost.php?ID={$_GET['ID']}' method='post'><input type='submit' value='Continue' />"; } } } else if ($odata['hp'] < 5) { print "You can only attack those who have health"; $h->endpage(); exit; } else if ($ir['gang'] == $odata['gang'] && $ir['gang'] > 0) { print "You are in the same gang as {$odata['username']}! What are you smoking today dude!"; $h->endpage(); exit; } else if ($youdata['energy'] < $youdata['maxenergy']/2) { print "You can only attack someone when you have 50% energy"; $h->endpage(); exit; } else if ($youdata['location'] != $odata['location']) { print "You can only attack someone in the same location!"; $h->endpage(); exit; } else { } print "</td></tr>"; if($youdata['hp'] <= 0 || $odata['hp'] <= 0) { print "</table>"; } else { $vars['hpperc']=round($youdata['hp']/$youdata['maxhp']*100); $vars['hpopp']=100-$vars['hpperc']; $vars2['hpperc']=round($odata['hp']/$odata['maxhp']*100); $vars2['hpopp']=100-$vars2['hpperc']; $mw=$db->query("SELECT i.* FROM items i WHERE i.itmid IN({$ir['equip_primary']}, {$ir['equip_secondary']})"); print "<tr><td colspan=2 align='center'>Attack with: "; if($db->num_rows($mw) > 0) { while($r=$db->fetch_row($mw)) { if(!$_GET['nextstep']) { $ns=1; } else { $ns=$_GET['nextstep']+2; } if($r['itmid']==$ir['equip_primary']) { print "[b]Primary Weapon:[/b] "; } if($r['itmid']==$ir['equip_secondary']) { print "[b]Secondary Weapon:[/b] "; } print "[url='attack.php?nextstep=$ns&ID={$_GET[']{$r['itmname']}[/url] "; } } else { print "You have nothing to fight with."; } print "</table>"; print "<table width='50%' align='center'><tr><td align=right>Your Health: </td><td><img src=greenbar.png width={$vars['hpperc']} height=10><img src=redbar.png width={$vars['hpopp']} height=10></td><tr><td align=right>Opponents Health: </td><td><img src=greenbar.png width={$vars2['hpperc']} height=10><img src=redbar.png width={$vars2['hpopp']} height=10></td></tr></table>"; } $h->endpage(); ?>   Would it be: if(!$_GET['ID' ==$fed) { print "You cannot attack someone in federal jail?"; $h->endpage(); exit; }   I really suck at coding so please don't bash me for tryin
  5. I searched but could not find a proper answer. ((WILL*100.0)/2.5)+(LEVEL/4) that's 1 of my crimes. To make it harder do i change it to: ((WILL*15.0)/2.5)+(LEVEL/15)? Or would that be too hard?
  6. Re: [MCcode V2] Item Info revamp! i get this stuff, i have renamed the .gif's to my Bargreen and Barred.
  7. Re: Voted Today?   $votes = sprintf("SELECT list FROM votes WHERE userid = '%u' ", ($ir['userid'])); $vote = mysql_query($votes); if(mysql_num_rows($vote) >2)//Change the 2 to however many there are. { echo "some message"; }   with the >2 what does that mean? number of vote sites?
  8. Re: Voted Today?   lol thats funny right there. without sprintf would be this...   $vote = $db->query("SELECT list FROM votes WHERE userid = ".$ir['userid']." "); if(mysql_num_rows($vote) >2)//Change the 2 to however many there are. { echo "some message"; }   what im not sure is goin to work is the query itself, it might nix up the userid So would this work? and i think i put in the header, right?
  9. i have MCcodes. i was wondering how to add a link thing in to my header so that it says "have you voted today?", but ONLY if they havent voted. if they have this sign goes. i know it may be easy for some, but i suck at coding so please help.
  10. Re: [Free Mod]Rent A Spy[v2] Then I get: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/gurpreet/public_html/rentaspy.php on line 4
  11. Re: [Free Mod]Rent A Spy[v2] Well I'm really bad at coding, and I'm wondering how can I remove the Donator function? So anyone can use this?
  12. Re: y isnt der a jail in v1 This is going off-topic :P BTW I'm 14 and I speak like this :D
  13. I have secured my Crystal Market, well as far as I can, from the known Injection. What the problem is on My Site is that new users get the highest stats, and a crap load of crystals, and the best house in the game.   1 @@::@@ [1411] 2 evil killa19 [1410] 3 W&W † Drako † [602] 4 sunflower58 [779] 5 knightrider [744]   Rank 3,4 and 5 are normal, but 1 and 2 just joined, and are the strongest in-game.   Money: $0 Crystals: 1851683647   I am willing to pay to protect my game, as I can't really do much, I've run out of ideas. Please help me. Thanks.
  14. Re: Advanced RentASpy[V2] Urmmm dunno why but i get "You have to be a donator to do this!"
  15. Re: HElP! ok i suck at coding BUT i think the 1st one means that $membs and $pages arent valid, so you cant use them.
  16. Re: This is annoying me, security issues. I know WHO the culprits are, just don't know how to stop them from using whatever they use...
  17. Re: This is annoying me, security issues. I'm not a player, i just keep it like that for show. In logs do you mean via the cpanel or in-game?
  18. Re: This is annoying me, security issues. Bumpppppppppppppppppppp More are coming :( 1 haloboy2k8 [1201] 2 ozzy [1196] 3 W&W † Drako † [602] 4 sunflower58 [779] 5 knightrider [744]
  19. Ok so my game is www.death-wars.com, and i have no idea how but people who just joined have the best stats and stuff, if someone good at testing security can go to my game and help me I would appreciate it a lot! The user ID 1197 is the newest member, yet he has more stats than donators.
  20. Re: Check this idiot out... Wow...I live near this guy :P Maybe I can sort him out... OR I CAN BLOW HIS BRAINS OUT!!!!
  21. Re: Spamming You also spammed on my game after I had deleted your user a lot of times and renamed your usernames.
  22. I want to make my game more professional by doing the following: 1) When they join they get a mail saying welcome to my game blah blah etc. 2) They get an event saying "You have recieved $1000 and 50 crystals to help you start on game-name". Thanks
  23. Re: Check this idiot out... Is it just me or is he totally retarded?   Can't spell tooth....
  24. Re: Underline overline Oh well I'm too tired :P Looking for killzone hacks for my bro. ANYWAYS I want it like Killahs-Ghetto have.
  25. Re: Underline overline Ok so now everything is underlined in black, and it turns red underlined when I pput my mouse on it. If possible can I get it like http://www.killahs-ghetto.com? Here's mine.
×
×
  • Create New...