
Saha
Members-
Posts
44 -
Joined
-
Last visited
Never
Saha's Achievements
Newbie (1/14)
0
Reputation
-
Re: [sHOWCASE] Avalon Lol i love it when oxidation posts always makes it worthwhile reading what he posts +1 In signed up but that genre of game doesnt appeal to me so i dont think i will be playing +1 for a great layout though...
-
Re: [iN PROGRESS V2] Bank High Sealed Security Well who else would want to access your bank? if a hacker gets on your account and is good enough to get past your security if you have any then he/she should be good enough to get on your staff pannel or get money an easier way.... No point in this just a waste of time. BUT if you added a modification where other users could 'break' into your bank but had to attempt to crack your pin or something like that this would be good other then that kinda pointless dont ya think?
-
Re: [v2] Approval System You say it will stop them xfer'ing does this mean transfering money , items, bank xfer etc..? and if so why should this stop them logging in ? why not just ensure the user(s) cannot transfer, as a result of this they will not find use for the 'spam' account so you can just run a queery every 90 days to delete inactive users, which will include that extra account as im sure they will no longer use the account???
-
Re: Mail Bomb Pro Version http://www.killah-city.net/login.php Go for it see if zero laughs at you XD he has it but i think its ALOT more secure then this one :P
-
Re: [mccode v2] Faction with Armoury When my game is back up ill do it yes its not hard to convert a mod as simpleas Organised Crimes
-
Re: [mccode v2] Faction with Armoury BUMP Any sollution to my post above??
-
Re: [mccode v2] Faction with Armoury Right i added the attacklost.php fine but am getting errors with attackwon.php i cant figure out what i did wrong and cant find a solution tot he error. attackwon.php <?php $atkpage=1; include "globals.php"; $_GET['ID']=abs((int) $_GET['ID']); $_SESSION['attacking']=0; $ir['attacking']=0; $db->query("UPDATE users SET attacking=0 WHERE userid=$userid"); $od=$db->query("SELECT * FROM users WHERE userid={$_GET['ID']}"); if($_SESSION['attackwon'] != $_GET['ID']) { die ("Cheaters don't get anywhere."); } if($db->num_rows($od)) { $r=$db->fetch_row($od); $gq=$db->query("SELECT * FROM factions WHERE faID={$r['faction']}"); $ga=$db->fetch_row($gq); if($r['hp'] == 1) { print "What a cheater u are."; } else { $stole=round($r['money']/(rand(200,5000)/10)); $crys = rand(0,$r['crystals']); if($crys > 10) { $crys = 10; } if($r['crystals'] < 10) { $crys = rand(0,5); } if($r['crystals'] < 5) { $crys = rand(0,2); } if($r['crystals'] < 2) { $crys = 0; } echo "You beat ".$r['username']."!! You knock ".$r['username']." on the floor a few times to make sure he is unconscios, then open his wallet, snatch ".money_formatter($stole)." and ".$crys." Crystals then run home happily."; $hosptime=rand(10,30); $expgain=2; $db->query("UPDATE users SET exp=exp+$expgain,money=money+$stole WHERE userid=$userid"); if ($ir['faction'] AND $r['faction']) { mysql_query("UPDATE factions SET faREPUTATION=faREPUTATION-10 WHERE faID={$r['faction']}",$c); mysql_query("UPDATE factions SET faREPUTATION=faREPUTATION+10 WHERE faID={$ir['faction']}",$c); mysql_query("UPDATE factions SET faCHAIN=faCHAIN+10 WHERE faID={$ir['faction']}",$c); mysql_query("UPDATE factions SET faBCHAIN=faCHAIN WHERE faCHAIN > faBCHAIN faID={$r['faction']}",$c); mysql_query("UPDATE factions SET faCHAIN=0 WHERE faID={$r['faction']}",$c); print " You have gained <font color='green'>+10</font> Reputation for your faction."; } mysql_query("UPDATE users SET crystals=crystals+".$crys." WHERE userid=".$ir['userid']) or die(mysql_error()); mysql_query("UPDATE users SET crystals=crystals-".$crys." WHERE userid=".$r['userid']) or die(mysql_error()); $db->query("UPDATE users SET hp=1,money=money-$stole,hospital=$hosptime,hospreason='Mugged by <a href=\'viewuser.php?u={$userid}\'>{$ir['username']}</a>' WHERE userid={$r['userid']}"); event_add($r['userid'],"[url='viewuser.php?u=$userid']{$ir['username']}[/url] mugged you and stole \$$stole, and ".$crys." Crystals",$c); $atklog=mysql_escape_string($_SESSION['attacklog']); $db->query("INSERT INTO attacklogs VALUES('',$userid,{$_GET['ID']},'won',unix_timestamp(),$stole,'$atklog');"); $_SESSION['attackwon']=0; } $npcs=array( ); if($r['user_level']==0) { $q=$db->query("SELECT * FROM challengebots WHERE cb_npcid={$r['userid']}"); if ($db->num_rows($q)) { $cb=$db->fetch_row($q); $qk=$db->query("SELECT * FROM challengesbeaten WHERE userid=$userid AND npcid={$r['userid']}"); if(!$db->num_rows($qk)) { $m=$cb['cb_money']; $db->query("UPDATE users SET money=money+$m WHERE userid=$userid"); print " You gained \$$m for beating the challenge bot {$r['username']}"; $db->query("INSERT INTO challengesbeaten VALUES($userid, {$r['userid']})"); } } } else { print "You beat Mr. non-existant! Haha, owned!"; } $h->endpage(); ?> Error: Parse error: syntax error, unexpected $end in /home/colone/public_html/attackwon.php on line 74
-
Re: [mccode v2] Faction with Armoury I am attempting this but I'm not gunna promise anything, I'm a newb to coding so... And does your best chain work? and does the chain end after a period of time? Yes i tried using the old one off gang.php and edit the code to fit factions but it didnt seem to work if only life were that simple :roll:
-
Re: [mccode v2] Faction with Armoury Right ive added this but my members have asked if there could be a Log like in the gangs mod. Could anyone do this for me ive tried but ended up messing it up, thats what backup's are for :P
-
Hi CE ive tried and tried to sort out the attack system in my game but i keep getting new errors so i think its time i asked someone more experienced. Right when i attack a user and Click Leave i get this error: QUERY ERROR: Table 'colone_gangstaendz.factionwars' doesn't exist Query was SELECT * FROM factionwars WHERE (warDECLARER=1 AND warDECLARED=0) OR (warDECLARED=1 AND warDECLARER=0) this is the attacktake.php QUERY ERROR: Table 'colone_gangstaendz.factionwars' doesn't exist Query was SELECT * FROM factionwars WHERE (warDECLARER=1 AND warDECLARED=0) OR (warDECLARED=1 AND warDECLARER=0) But i have recently changed to factions and deleted all my gang tables and php files so im unsure about it. it is the Factions mod found here: http://criminalexistence.com/ceforums/i ... ic=27044.0 I am having the same problem with attackbeat.php This is the error. Parse error: syntax error, unexpected '}' in /home/colone/public_html/attackbeat.php on line 71 This is attackbeat.php: <?php $atkpage=1; include "globals.php"; $_GET['ID']=abs((int) $_GET['ID']); $_SESSION['attacking']=0; $ir['attacking']=0; $db->query("UPDATE users SET attacking=0 WHERE userid=$userid"); $od=$db->query("SELECT * FROM users WHERE userid={$_GET['ID']}"); if($_SESSION['attackwon'] != $_GET['ID']) { die ("Cheaters don't get anywhere."); } if($db->num_rows($od)) { $r=$db->fetch_row($od); $gq=$db->query("SELECT * FROM factions WHERE faID={$r['faction']}"); $ga=$db->fetch_row($gq); if($r['hp'] == 1) { print "What a cheater u are."; } else { mysql_query("INSERT INTO userattacks VALUES($userid,'You attacked <a href=viewuser.php?u={$r['userid']}>{$r['username']}</a> and hospitalized them for $hosptime minutes.',unix_timestamp());",$c); mysql_query("INSERT INTO userattacks VALUES({$r['userid']},'<a href=viewuser.php?u=$userid>{$ir['username']}</a> attacked you and hospitalized you for $hosptime minutes.',unix_timestamp());",$c); print "You beat {$r['username']}!! You beat {$r['username']} severely on the ground. When there is lots of blood showing, you head up to the nearest 10-story building's roof and drop him over the edge. You run home silently and carefully."; $hosptime=rand(50,150)+floor($ir['level']/2); $db->query("UPDATE users SET hp=1,hospital=$hosptime,hospreason='Hospitalized by <a href=\'viewuser.php?u={$userid}\'>{$ir['username']}</a>' WHERE userid={$r['userid']}"); event_add($r['userid'],"[url='viewuser.php?u=$userid']{$ir['username']}[/url] beat you up.",$c); $atklog=mysql_escape_string($_SESSION['attacklog']); $db->query("INSERT INTO attacklogs VALUES('',$userid,{$_GET['ID']},'won',unix_timestamp(),-1,'$atklog');"); $_SESSION['attackwon']=0; $warq=$db->query("SELECT * FROM factionwars WHERE (warDECLARER={$ir['faction']} AND warDECLARED={$r['faction']}) OR (warDECLARED={$ir['faction']} AND warDECLARER={$r['faction']})"); if ($db->num_rows($warq) > 0) { $war=$db->fetch_row($warq); $db->query("UPDATE factions SET faRESPECT=faRESPECT-10 WHERE faID={$r['faction']}"); $ga['gangRESPECT']-=10; $db->query("UPDATE factions SET faRESPECT=faRESPECT+10 WHERE faID={$ir['faction']}"); print " You earnt 10 respect for your faction!"; } } //Faction Kill if ($fa['faRESPECT']<=0 && $r['faction']) { $db->query("UPDATE users SET faction=0 WHERE faction={$r['faction']}"); $db->query("DELETE FROM factionwars WHERE faRESPECT<='0'"); $db->query("DELETE FROM factionwars WHERE warDECLARER={$fa['faID']} or warDECLARED={$fa['faID']}"); } if($r['user_level']==0) { $q=$db->query("SELECT * FROM challengebots WHERE cb_npcid={$r['userid']}"); if ($db->num_rows($q)) { $cb=$db->fetch_row($q); $qk=$db->query("SELECT * FROM challengesbeaten WHERE userid=$userid AND npcid={$r['userid']}"); if(!$db->num_rows($qk)) { $m=$cb['cb_money']; $db->query("UPDATE users SET money=money+$m WHERE userid=$userid"); print " You gained \$$m for beating the challenge bot {$r['username']}"; $db->query("INSERT INTO challengesbeaten VALUES($userid, {$r['userid']})"); } } } } } else { print "You beat Mr. non-existant!"; } $h->endpage(); ?> And finally attackwon.php. Error: QUERY ERROR: Table 'colone_gangstaendz.gangs' doesn't exist Query was SELECT * FROM gangs WHERE gangID=0 Attackwon.php: <?php $atkpage=1; include "globals.php"; $_GET['ID']=abs((int) $_GET['ID']); $_SESSION['attacking']=0; $ir['attacking']=0; $db->query("UPDATE users SET attacking=0 WHERE userid=$userid"); $od=$db->query("SELECT * FROM users WHERE userid={$_GET['ID']}"); if($_SESSION['attackwon'] != $_GET['ID']) { die ("Cheaters don't get anywhere."); } if($db->num_rows($od)) { $r=$db->fetch_row($od); $gq=$db->query("SELECT * FROM gangs WHERE gangID={$r['gang']}"); $ga=$db->fetch_row($gq); if($r['hp'] == 1) { print "What a cheater u are."; } else { $stole=round($r['money']/(rand(200,5000)/10)); $crys = rand(0,$r['crystals']); if($crys > 10) { $crys = 10; } if($r['crystals'] < 10) { $crys = rand(0,5); } if($r['crystals'] < 5) { $crys = rand(0,2); } if($r['crystals'] < 2) { $crys = 0; } echo "You beat ".$r['username']."!! You knock ".$r['username']." on the floor a few times to make sure he is unconscios, then open his wallet, snatch ".money_formatter($stole)." and ".$crys." Crystals then run home happily."; $hosptime=rand(10,30); $expgain=2; $db->query("UPDATE users SET exp=exp+$expgain,money=money+$stole WHERE userid=$userid"); if ($ir['faction'] AND $r['faction']) { mysql_query("UPDATE factions SET faREPUTATION=faREPUTATION-1 WHERE faID={$r['faction']}",$c); mysql_query("UPDATE factions SET faREPUTATION=faREPUTATION+1 WHERE faID={$ir['faction']}",$c); mysql_query("UPDATE factions SET faCHAIN=faCHAIN+1 WHERE faID={$ir['faction']}",$c); mysql_query("UPDATE factions SET faBCHAIN=faCHAIN WHERE faCHAIN > faBCHAIN faID={$r['faction']}",$c); mysql_query("UPDATE factions SET faCHAIN=0 WHERE faID={$r['faction']}",$c); print " You have gained <font color='green'>+1</font> Reputation for your faction."; } mysql_query("UPDATE users SET crystals=crystals+".$crys." WHERE userid=".$ir['userid']) or die(mysql_error()); mysql_query("UPDATE users SET crystals=crystals-".$crys." WHERE userid=".$r['userid']) or die(mysql_error()); $db->query("UPDATE users SET hp=1,money=money-$stole,hospital=$hosptime,hospreason='Mugged by <a href=\'viewuser.php?u={$userid}\'>{$ir['username']}</a>' WHERE userid={$r['userid']}"); event_add($r['userid'],"[url='viewuser.php?u=$userid']{$ir['username']}[/url] mugged you and stole \$$stole, and ".$crys." Crystals",$c); $atklog=mysql_escape_string($_SESSION['attacklog']); $db->query("INSERT INTO attacklogs VALUES('',$userid,{$_GET['ID']},'won',unix_timestamp(),$stole,'$atklog');"); $_SESSION['attackwon']=0; $warq=$db->query("SELECT * FROM gangwars WHERE (warDECLARER={$ir['gang']} AND warDECLARED={$r['gang']}) OR (warDECLARED={$ir['gang']} AND warDECLARER={$r['gang']})"); if ($db->num_rows($warq) > 0) { $war=$db->fetch_row($warq); $db->query("UPDATE gangs SET gangRESPECT=gangRESPECT-2 WHERE gangID={$r['gang']}"); $ga['gangRESPECT']-=2; $db->query("UPDATE gangs SET gangRESPECT=gangRESPECT+2 WHERE gangID={$ir['gang']}"); print " You earned 2 respect for your gang!"; } //Gang Kill if ($ga['gangRESPECT']<=0 && $r['gang']) { $db->query("UPDATE users SET gang=0 WHERE gang={$r['gang']}"); $db->query("DELETE FROM gangs WHERE gangRESPECT<='0'"); $db->query("DELETE FROM gangwars WHERE warDECLARER={$ga['gangID']} or warDECLARED={$ga['gangID']}"); } $npcs=array( ); if($r['user_level']==0) { $q=$db->query("SELECT * FROM challengebots WHERE cb_npcid={$r['userid']}"); if ($db->num_rows($q)) { $cb=$db->fetch_row($q); $qk=$db->query("SELECT * FROM challengesbeaten WHERE userid=$userid AND npcid={$r['userid']}"); if(!$db->num_rows($qk)) { $m=$cb['cb_money']; $db->query("UPDATE users SET money=money+$m WHERE userid=$userid"); print " You gained \$$m for beating the challenge bot {$r['username']}"; $db->query("INSERT INTO challengesbeaten VALUES($userid, {$r['userid']})"); } } } } } else { print "You beat Mr. non-existant! Haha, owned!"; } $h->endpage(); ?> Ive tried and tried to fix these errors but cannot do it, its starting to irritate me so i think its time for someone more experienced to show me how to fix this.
-
Re: [Mccodes v2] Hospital Error, help Sorted it forgot to add something :S
-
Hi Ce im sorry to ask a question as i know i should no the answer to it but im sure there are alot more better coders then me here and it will take them half the time to figure this error out and how to fix it. QUERY ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND bID=0 LIMIT 1' at line 1 Query was SELECT * FROM bounties WHERE bBOUNTIED= AND bID=0 LIMIT 1 Its in hospital.php and i havnt a clue how to fix it :S
-
Re: [mccode v2] Ajax Chat my edition LOL As a matter of Fact i got this http://www.linuxuser.at/wiki_old/most_simple_ajax_chat_room.html, and i replaced most of the Style features .. <?php /*----------------------------------------------------- -- Mono Country v1.0 BETA -- A product of DBS-entertainment -- Copyright held 2005 by Dabomstew -- INDEX.php -----------------------------------------------------*/ 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(); if($ir['chatban'] ==1) { print" <h3> YOU HAVE BEEN CHAT BANNED<h3>"; echo <<<EOF <style type="text/css"> input, textarea { display:none; } #content { display:none; } #chatwindow { display:none; } #chatwindow a { display:none; } .admin { display:none; } #chatnick { display:none;} #chatmsg { display:none;} #current_users { display:none; } #ch_input { display:none; } #ch_input2 { display:none;} .chat-bar { display:none;} </style> EOF; } $name=$ir['username']; if($ir['donatordays']) { $name = "[url='viewuser.php?u={$ir[']<font color=yellow>$name</font><font color=white>[/url]"; } else $name = "[url='viewuser.php?u={$ir[']<font color=cornsilk>$name</font>[/url]"; if( $ir['userid'] == 909 ) {$name = "[url='viewuser.php?u={$ir['][img=/images/eternal.png][/url]<style='font-weight:bold'><font color=Screamin' Green>"; } if( $ir['userid'] == 401 ) {$name = "[url='viewuser.php?u={$ir['][img=/images/gilmoregirl.png][/url]<style='font-weight:bold'><font color=pink>"; } if( $ir['userid'] == 1 ) {$name = "[url='viewuser.php?u={$ir['][img=/images/tearie.png][/url]<style='font-weight:bold'><font color=red>"; } if( $ir['userid'] == 12 ) {$name = "[url='viewuser.php?u={$ir['][img=/images/ladyc.png][/url]<style='font-weight:bold'><font color=Screamin' Green>"; } ?> <script type='text/javascript'> // Constructor function textareaResizer(tdiv) { if (textareaResizer.htmlstyle == null) textareaResizer.htmlstyle = document.getElementsByTagName('html')[0].style; var ua = navigator.userAgent.toLowerCase(), name; switch (true) { case ua.indexOf('konqueror') >= 0: case ua.indexOf('opera') >= 0: case ua.charAt(ua.indexOf('msie') + 5) == 5: // IE5 return; break; }; var index = textareaResizer.instances.length; textareaResizer.instances[textareaResizer.instances.length] = this; var handle = document.createElement('span'); handle.className = 'chat-bar'; handle.innerHTML = 'Page Resizer'; handle.onmousedown = function(e) { textareaResizer.instances[index].listen(e); }; handle.onmouseover = function() { this.style.cursor = 'n-resize'; }; handle.onmouseout = function() { this.style.cursor = 'auto'; }; handle = tdiv.parentNode.insertBefore(handle, tdiv.nextSibling); handle.middle = Math.ceil(textareaResizer.findHeight(handle) / 2); this.handle = handle; this.tdiv = tdiv; this.index = index; this.minHeight = 50; }; // Static properties textareaResizer.isResizing = false; textareaResizer.instances = new Array; textareaResizer.htmlstyle = null; // Static methods textareaResizer.findPosY = function(obj) { var curtop = 0; if (obj.offsetParent) while (obj.offsetParent) { curtop += obj.offsetTop obj = obj.offsetParent; } else if (obj.y) curtop += obj.y; return curtop; }; textareaResizer.findHeight = function(element, recalc) { if (element.height && recalc != true) return element.height; else { if (element.style.height) element.height = parseInt(element.style.height); else { element.style.height = element.clientHeight + 'px'; element.height = parseInt(element.style.height); }; return element.height; } }; textareaResizer.pageY = function(e) { if (!e.pageY) return e.clientY + window.document.documentElement.scrollTop; else return e.pageY; }; // Methods textareaResizer.prototype.listen = function(e) { var handle = this.handle, index = this.index; textareaResizer.htmlstyle.cursor = 'n-resize'; textareaResizer.isResizing = true; handle.onmousedown = null; handle.onmouseup = function(e) { textareaResizer.instances[index].stopListening(e); }; window.document.onmouseup = function(e) { textareaResizer.instances[index].stopListening(e); }; window.document.onmousemove = function(e) { textareaResizer.instances[index].resize(e); }; }; textareaResizer.prototype.resize = function(e) { if (!e) var e = window.event; e.cancelBubble = true; var selection = document.selection; if (selection) selection.clear(); if (textareaResizer.isResizing) { var tdiv = this.tdiv, handle = this.handle, minHeight = this.minHeight; /* This next statement is: * Textarea height + * Desired change in height + * Half the size of the handle (so the cursor stays in the middle of it) */ var newHeight = textareaResizer.findHeight(tdiv, true) + textareaResizer.pageY(e) - textareaResizer.findPosY(handle) - handle.middle; if (newHeight < minHeight) newHeight = minHeight; tdiv.style.height = newHeight + 'px'; }; }; textareaResizer.prototype.stopListening = function(e) { var handle = this.handle, index = this.index; textareaResizer.htmlstyle.cursor = 'auto'; textareaResizer.isResizing = false; window.document.onmousemove = null; window.document.onmouseup = null; handle.onmouseup = null; handle.onmousedown = function(e) { textareaResizer.instances[index].listen(e); }; }; </script> <style type="text/css"> input, textarea { font-family: courier new; font-size: 12px; background: black; } #content { width:500px; text-align:center; margin-left:25px; } #chatwindow { border:1px solid #0000CC; padding:4px; color:#CCCC99; width: 490px; height:500px; font-family: sans-serif; font-size: 14px; background: black; text-align:left; } #chatwindow a { font-family: sans-serif; padding-top: 1px; } .admin { color: #DB1900; font-weight: bold; } #chatnick { border: none; color:#FFCC00; border-bottom:1px solid #aaaaaa; padding:0px;} #chatmsg { border: none; color:#FFCC00; border-bottom:1px solid #0000CC; padding:4px;} #current_users { border: 1px solid #0000CC; padding:3px 3px 0px 3px; margin-top:3px; width: 475px; margin-left:auto; margin-right:auto; text-align:center; } #ch_input { border: 1px solid #0000CC; padding:3px 3px 0px 3px; margin-top:3px; width: 475px; margin-left:auto; margin-right:auto; text-align:center; } #ch_input2 { border: 1px solid #0000CC; padding:3px 3px 0px 3px; margin-top:3px; width: 475px; margin-left:auto; margin-right:auto; text-align:center; } .chat-bar { height: 3px; background: #0000CC; width: 300px; } </style> <center> <div id="content" style="border: 1px SOLID #070707;"> [b]CHAT[/b] Any Abuse will not be Tollerated putting any links to outside games also game ban Treat the Gossip with respect no spamming We have added a Roll feature you can acheive this with /roll <center><div id="chatwindow"></div></center> <div id="ch_input"> <center> <input id="chatkey" type="text" size=1 style="display:none" value = "" > <input id="chatnick" type="text" size="1" maxlength="999" style="display:none" value="<? echo "".$name.""; ?>"> <input id="chatmsg" type="text" size="59" maxlength="116" style="<? echo "".$style."";?>" onkeyup="keyup(event.keyCode);"> <input type="button" value="add" onclick="submit_msg();" style="color: #CCCC99; cursor:pointer;"> </center> </div> [url='javascript:addtext( ":angry:" )'][img=images/santa/angry.gif][/url] [url='javascript:addtext( ":cheesy:" )'][img=images/santa/cheesy.gif][/url] [url='javascript:addtext( ":cool:" )'][img=images/santa/cool.gif][/url] [url='javascript:addtext( ":cry:" )'][img=images/santa/cry.gif][/url] [url='javascript:addtext( ":embarassed:" )'][img=images/santa/embarassed.gif][/url] [url='javascript:addtext( ":grin:" )'][img=images/santa/grin.gif][/url] [url='javascript:addtext( ":huh:" )'][img=images/santa/huh.gif][/url] [url='javascript:addtext( ":kiss:" )'][img=images/santa/kiss.gif][/url] [url='javascript:addtext( ":laugh:" )'][img=images/santa/laugh.gif][/url] [url='javascript:addtext( ":lipsrsealed:" )'][img=images/santa/lipsrsealed.gif][/url] [url='javascript:addtext( ":rolleyes:" )'][img=images/santa/rolleyes.gif][/url] [url='javascript:addtext( ":sad:" )'][img=images/santa/sad.gif][/url] [url='javascript:addtext( ":shocked:" )'][img=images/santa/shocked.gif][/url] <script language='javascript' type='text/javascript'> function addtext( thetext ) { document.getElementById('chatmsg').value = document.getElementById('chatmsg').value + ' ' + thetext + ' '; } </script> So, who's here? (coming Soon!!) <div id="current_users"> <?PHP $q=mysql_query("SELECT * FROM users WHERE laston>unix_timestamp()-15*60 ORDER BY laston DESC",$c); while($r=mysql_fetch_array($q)) { echo "[url='viewuser.php?u={$r[']{$r['username']}[/url],"; } ?> </div></center> <script type="text/javascript"> var nick_maxlength=18; var http_request=false; var http_request2=false; var http_request3=false; var whoUpdate; var whoSubmit; /* reading */ function ajax_request(url){http_request=false;if(window.XMLHttpRequest){http_request=new XMLHttpRequest();if(http_request.overrideMimeType){http_request.overrideMimeType('text/xml');}}else if(window.ActiveXObject){try{http_request=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{http_request=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){}}} if(!http_request){alert('Giving up :( Cannot create an XMLHTTP instance');return false;} http_request.onreadystatechange=alertContents;http_request.open('GET',url,true);http_request.send(null);} function alertContents(){if(http_request.readyState==4){if(http_request.status==200){rec_response(http_request.responseText);}else{}}} /* writing */ function ajax_request2(url){http_request2=false;if(window.XMLHttpRequest){http_request2=new XMLHttpRequest();if(http_request2.overrideMimeType){http_request2.overrideMimeType('text/xml');}}else if(window.ActiveXObject){try{http_request2=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{http_request2=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){}}} if(!http_request2){alert('Giving up :( Cannot create an XMLHTTP instance');return false;} http_request2.onreadystatechange=alertContents2;http_request2.open('GET',url,true);http_request2.send(null);} function alertContents2(){if(http_request2.readyState==4){if(http_request2.status==200){rec_chatcontent(http_request2.responseText);}else{}}} /* whobox update */ function ajax_request3(url){http_request3=false;if(window.XMLHttpRequest){http_request3=new XMLHttpRequest();if(http_request3.overrideMimeType){http_request3.overrideMimeType('text/xml');}}else if(window.ActiveXObject){try{http_request3=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{http_request3=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){}}} if(!http_request3){alert('Giving up :( Cannot create an XMLHTTP instance');return false;} http_request3.onreadystatechange=alertContents3;http_request3.open('GET',url,true);http_request3.send(null);} function alertContents3(){ if(http_request3.readyState==4){ if(http_request3.status==200){ rec_whocontent(http_request3.responseText); }else{ window.setTimeout("alertContents3", "350"); } } } //function ajax_request4(url){http_request4=false;if(window.XMLHttpRequest){http_request4=new XMLHttpRequest();if(http_request4.overrideMimeType){http_request4.overrideMimeType('text/xml');}}else if(window.ActiveXObject){try{http_request4=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{http_request4=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){}}} //if(!http_request4){alert('Giving up :( Cannot create an XMLHTTP instance');return false;} //http_request4.onreadystatechange=alertContents4; //http_request4.open('GET',url,true);http_request4.send(null);} //function alertContents3(){if(http_request3.readyState==4){if(http_request3.status==200){rec_whocontent(http_request3.responseText);}else{}}} //* chat stuff */ chatmsg.focus() var show_newmsg_on_bottom=1; /* set to 0 to let new msg?s appear on top */ var waittime=1100; /* time between chat refreshes (ms) */ var whotime=6000; intUpdate=window.setTimeout("read_cont();", waittime); whoUpdate=window.setTimeout("read_users();", whotime); whoSubmit=window.setTimeout("submit_who();", whotime); chatwindow = document.getElementById('chatwindow'); chatwindow.innerHTML = "Loading..."; current_users = document.getElementById('current_users'); current_users.innerHTML = "<?PHP $q=mysql_query("SELECT * FROM users WHERE laston>unix_timestamp()-15*60 ORDER BY laston DESC",$c); while($r=mysql_fetch_array($q)) { echo "[url='viewuser.php?u={$r[']{$r['username']}[/url],"; } ?>"; function read_users() { zeit2 = new Date(); ms2 = (zeit2.getHours() * 24 * 60 * 1000) + (zeit2.getMinutes() * 60 * 1000) + (zeit2.getSeconds() * 1000) + zeit2.getMilliseconds(); ajax_request3("who.txt?x=" + ms); } function read_cont() { zeit = new Date(); ms = (zeit.getHours() * 24 * 60 * 1000) + (zeit.getMinutes() * 60 * 1000) + (zeit.getSeconds() * 1000) + zeit.getMilliseconds(); ajax_request2("chat.txt?x=" + ms); } function display_msg(msg1) { chatwindow.innerHTML = msg1.substr(0,msg1.length - 1); } function display_who(msg2) { current_users.innerHTML = msg2.substr(0,msg2.length -1); } function keyup(arg1) { if (arg1 == 13) submit_msg(); } function write_who(nick1) { zeit = new Date(); ms = (zeit.getHours() * 24 * 60 * 1000) + (zeit.getMinutes() * 60 * 1000) + (zeit.getSeconds() * 1000) + zeit.getMilliseconds(); ajax_request("http://www.blah.com/who.php?u=" + escape(nick1) + "&tag=" + ms); } function submit_who() { write_who(); whoUpdate=window.setTimeout("submit_who();", whotime); } function submit_msg() { clearTimeout(intUpdate); document.getElementById('chatnick').value ="<? echo "".$name.""; ?>"; if (document.getElementById('chatnick').value.length < nick_maxlength) document.getElementById('chatnick').value=document.getElementById('chatnick').value.substring(0,nick_maxlength); spaces=""; for(i=0;i<(nick_maxlength-document.getElementById('chatnick').value.length);i++) spaces+="-"; v=chatwindow.innerHTML.substring(chatwindow.innerHTML.indexOf("\n")) + "\n" + document.getElementById('chatnick').value + spaces + "| " + chatmsg.value; if (chatmsg.value != "") { //chatwindow.value=v.substring(1); write_msg(chatmsg.value,document.getElementById('chatnick').value,chatkey.value); } chatmsg.value=""; intUpdate=window.setTimeout("read_cont();", waittime); } function write_msg(msg1,nick1) { ajax_request("w.php?m=" + escape(msg1) + "&n=" + escape(nick1)); } function rec_response(str1) { } function rec_chatcontent(cont1) { if (cont1 != "") { out1 = unescape(cont1); if (show_newmsg_on_bottom == 0) { out1 = ""; while (cont1.indexOf("\n") > -1) { out1 = cont1.substr(0, cont1.indexOf("\n")) + "\n" + out1; cont1 = cont1.substr(cont1.indexOf("\n") + 1); out1 = unescape(out1); } } if (chatwindow.innerHTML != out1) { display_msg(out1); } intUpdate=window.setTimeout("read_cont()", waittime); } } function rec_whocontent(cont2) { if (cont2 != "") { current_users.innerHTML = cont2; //out2 = unscape(cont2); //if (current_users.innerHTML != out2) { display_who(out2); } whoUpdate=window.setTimeout("read_users()", whotime); } } new textareaResizer( document.getElementById('chatwindow') ); </script> </center> ^^^^^^^^ chat.php Completly different to The orriginal posted by who ever you care to give the credit to.. Well i just looked over it again and i believe i made a mistake and i apologise for that. ^_^
-
Re: [MCV1]Crimes Need An Item H1TM4N seriously AlabamaHit could do it but how would you learn if people did it all for you he is practically doing you a favour by not telling you. Pay attension to all the posts and visit php.net and learn all you can there are brilliant coders on CE who are still learning more and more each day, you should start by taking advice and trying things yourself.
-
Re: [REVIEW] Deadly Ghetto. Great game, quite challenging for a text based game, The layout is very good it is a quite unique game with a friendly community. As was said in #1 post it is a fairly new game and that is what it lack's it lacks players and would go very far with more active players. Well done +1 better then alot of games ive seen.