Jump to content
MakeWebGames

Kamakaze

Members
  • Posts

    11
  • Joined

  • Last visited

    Never

Everything posted by Kamakaze

  1. Re: HELP Pwnt. And I Have A Few Very *Simple* Solutions :D, xD
  2. Re: [mccode] Simple user rating system v2 Hah, I Already Fixed This Mod And Added Stuff Into It Converted V1 And V2 :D
  3. Re: [mccode v1] User Rating As i said im still new to this and as i said I DID NOT make THIS mod i only edited it because it was broke and i edited some stuff :) and err... i don't see a +1 on me :-P thanks for feedback anyways
  4. Re: [mccode v1] User Rating NOTE: MCCODES V2 ONLY!! V1 is 2 posts above NOTE: I DID *NOT* make this mod *NOR* do i take responsibility for it! For V2 Create a file called rating.php here is the code to insert <?php /* Simple user rating system (Free Mod) For mccodes v2 only! Property of [url]www.ganjasworld.com[/url] Edited By Kamakaze To Make It Work!. */ session_start(); include "globals.php"; $ID = $_GET['ID']; $action = $_GET['action']; switch($action) { case 'goodrating': good_rating(); break; case 'badrating': bad_rating(); break; } if(!$ID) { echo "[b]Error!.[/b] - invaild player id."; $h->endpage(); exit; } if(!$action) { echo "[b]Error!.[/b] - invaild action."; $h->endpage(); exit; } function good_rating() { global $ir,$userid; if($ir['rates'] > 0){ $ID = $_GET['ID']; if($ID == $userid) { echo "[b]Warning!: You can't rate yourself!.[/b]"; } else { $result = $db->query("SELECT * FROM users WHERE userid='{$ID}'"); while($row = $db->fetch_row($result)) { $ratings = $row['goodratings']; } $db->query("UPDATE users SET goodratings = {$goodratings}+1 WHERE userid='{$ID}'"); $db->query("UPDATE users SET rates = '0' WHERE userid='{$userid}'"); echo "<font color=green>You gave a +1 rating to {$r['username']}!</font>"; } } else { echo "[b]Warning!: You can only rate once a day!.[/b]"; } } function bad_rating() { global $ir,$userid; if($ir['rates'] > 0){ $ID = $_GET['ID']; if($ID == $userid) { echo "[b]Warning!: You can't rate yourself!.[/b]"; } else { $result = $db->query("SELECT * FROM users WHERE userid='{$ID}'"); while($row = $db->fetch_row($result)) { $ratings = $row['badratings']; } $db->query("UPDATE users SET badratings = {$badratings}-1 WHERE userid='{$ID}'"); $db->query("UPDATE users SET rates = '0' WHERE userid='{$userid}'"); echo "<font color=red>You gave a -1 rating to {$r['username']}!</font>"; } } else { echo "[b]You can only rate once a day!.[/b]"; } } $h->endpage(); ?> in viewuser.php put this code whare you fell like it i prefer it under Online Ratings:[url='rating.php?ID={$r['][img=/images/positive.gif][/url] [b]<font color=green>+{$r['goodratings']}</font>[/b] l [url='rating.php?ID={$r['][img=/images/negative.gif][/url][b]<font color=red>{$r['badratings']}</font>[/b] For The SQL in phpMYADMIN `rates` int(11) NOT NULL default '1', `goodratings` int(11) NOT NULL default '0', `badratings` int(11) NOT NULL default '0', for the V2 cRON $db->query("UPDATE users SET rates=1,"); I hope it's right i haven't tested :) any problems [email protected] :-P Enjoy Peepz here at CE :mrgreen:
  5. Re: [REVIEW] Street Vendetta - Please review! New artwork if F**king A!!!
  6. Re: [mccode v1] User Rating   and if you don't feel like getting your own images then i think MGW said we can use his haha:P or if you want these pictures but don't want to copy his there is the exact same ones on MSN messenger :) A fixed V2 Ver coming when i fell like it :)
  7. Re: [mccode v1] User Rating Well This mod failed it was buggy never worked right so here's it fixed and edited to my needs NOTE: I DID *NOT* make this mod NOR take responsibility for this mod Ps. This mod is for "MCCODES V1 ONLY!" Create a file called rating.php and copy and paste this into the file <?php /* Simple user rating system (Free Mod) For mccodes v1 Property of [url]www.ganjasworld.com[/url] Edited By Kamakaze To Make It Work!. */ session_start(); require "global_func.php"; if($_SESSION['loggedin']==0) { header("Location: login.php");exit; } $userid=$_SESSION['userid']; require "header.php"; $h = new headers; $h->startheaders(); include "mysql.php"; global $c; $is=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid",$c) or die(mysql_error()); $ir=mysql_fetch_array($is); check_level(); $fm=money_formatter($ir['money']); $cm=money_formatter($ir['crystals'],''); $lv=date('F j, Y, g:i a',$ir['laston']); $h->userdata($ir,$lv,$fm,$cm); $h->menuarea(); $ID = $_GET['ID']; $action = $_GET['action']; switch($action) { case 'goodrating': good_rating(); break; case 'badrating': bad_rating(); break; } if(!$ID) { echo "[b]Error!.[/b] - invaild player id."; $h->endpage(); exit; } if(!$action) { echo "[b]Error!.[/b] - invaild action."; $h->endpage(); exit; } function good_rating() { global $ir,$userid; if($ir['rates'] > 0){ $ID = $_GET['ID']; if($ID == $userid) { echo "[b]Warning!: You can't rate yourself!.[/b]"; } else { $result = mysql_query("SELECT * FROM users WHERE userid='{$ID}'"); while($row = mysql_fetch_array($result)) { $ratings = $row['goodratings']; } mysql_query("UPDATE users SET goodratings = {$goodratings}+1 WHERE userid='{$ID}'"); mysql_query("UPDATE users SET rates = '0' WHERE userid='{$userid}'"); echo "<font color=green>You gave a +1 rating to {$r['username']}!</font>"; } } else { echo "[b]Warning!: You can only rate once a day!.[/b]"; } } function bad_rating() { global $ir,$userid; if($ir['rates'] > 0){ $ID = $_GET['ID']; if($ID == $userid) { echo "[b]Warning!: You can't rate yourself!.[/b]"; } else { $result = mysql_query("SELECT * FROM users WHERE userid='{$ID}'"); while($row = mysql_fetch_array($result)) { $ratings = $row['badratings']; } mysql_query("UPDATE users SET badratings = {$badratings}-1 WHERE userid='{$ID}'"); mysql_query("UPDATE users SET rates = '0' WHERE userid='{$userid}'"); echo "<font color=red>You gave a -1 rating to {$r['username']}!</font>"; } } else { echo "[b]You can only rate once a day!.[/b]"; } } $h->endpage(); ?>   Put this line in Viewuser.php i prefer it under Online Ratings:[url='rating.php?ID={$r['][img=/images/positive.gif][/url] [b]<font color=green>+{$r['goodratings']}</font>[/b] l [url='rating.php?ID={$r['][img=/images/negative.gif][/url][b]<font color=red>{$r['badratings']}</font>[/b]   SQL For Database In phpMYADMINa `rates` int(11) NOT NULL default '1', `goodratings` int(11) NOT NULL default '0', `badratings` int(11) NOT NULL default '0',   Im still a but of a noob but i did my best to fix a broken mod =D it has been tested and works any errors IM me [email protected] Should work fine :) hope for positive feedback :mrgreen: PS. i will be posting a V2 version soon :) EDIT!!: Forgot about the cRON code and i would like to point out the person who converted forgot to take $db-->query out of the cRON code   mysql_query("UPDATE users SET rates=1," $c);   The above cRON code may be wrong but i tryed to fix it i added a $c on thinking it was part of V1 cRON's Enjoy :)
  8. Re: [REVIEW] Street Vendetta - Please review!   i played whilst the game was in beta i liked it for a while then got bored and semi quit and now the game has now been released and stuff and gym pass mod and everything is in explore that puzzles me :P
  9. Re: [REVIEW] Street Vendetta - Please review! The Game was pretty good but now i can't be bothered i kind of recommend this game i got bored tho :D ~Kamakaze
  10. Re: Cheburn (adam) Torncity Aww, Come on people this is ridiculous. Stop dissing the man he is making a living and having fun at the same time no one is perfect at coding there is some tricks we all don't know, The lag isn't his fault he is trying his best It's not his fault people prefer his game to yours The guy never done me any harm i enjoy playing his game alot and bugger met look at the time 06:30am gotta get to bed :D But leave the poor guy alone for all of our sake :) Peace Out ~Kamakaze :)
  11. Re: V2 Staff Applications! It's kinda good but it goes to admin.php and it says V2 not V1 so i will have to fix that i tested the app i applied for admin i got set a sec or assist so it's screwed up!
×
×
  • Create New...