
LegendFTW
Members-
Posts
54 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by LegendFTW
-
also this is wat i have atm: function pic_change() { global $db,$ir,$c,$userid,$h; print "<h3>Pic Change</h3> Please note that this must be externally hosted, [url='http://imageshack.us']ImageShack[/url] is our recommendation. Any images that are not 150x150 will be automatically resized <form action='preferences.php?action=picchange2' method='post'> New Pic: <input type='text' name='newpic' value='{$ir['display_pic']}' /> <input type='submit' value='Change Name' /></form>"; } function do_pic_change() { global $db,$ir,$c,$userid,$h; if($_POST['newpic'] == "") { print "You did not enter a new pic. [url='preferences.php?action=picchange']> Back[/url]"; } else { $_POST['forums_avatar']=$_POST['newpic']; $_POST['forums_avatar']=str_replace(array("<", ">",addslashes("'"),addslashes('"')), array("<", ">","'","""), $_POST['forums_avatar']); if(strpos($_POST['forums_avatar'],".php") !== false || strpos($_POST['forums_avatar'],".asp") !== false || strpos($_POST['forums_avatar'],".aspx") !== false || strpos($_POST['forums_avatar'],".htm") !== false) { print("Invalid characters [url='preferences.php?action=picchange']> Back[/url]"); $h->endpage(); exit; } if(strpos($_POST['forums_avatar'],".gif") === false && strpos($_POST['forums_avatar'],".jpg") === false && strpos($_POST['forums_avatar'],".png") === false && strpos($_POST['forums_avatar'],".jpeg") === false) { print("Invalid extension, please use a gif, jpg or png image [url='preferences.php?action=picchange']> Back[/url]"); $h->endpage(); exit; } $db->query("UPDATE users SET display_pic='{$_POST['forums_avatar']}' WHERE userid=$userid"); print "Pic changed!"; } } I would really appreciate it if someone could make it so forum avatars are still in use and sort of merge these two codes Thanks
-
tried the user display pic mod function pic_change() { global $db,$ir,$c,$userid,$h; print "<h3>Pic Change</h3> Please note that this must be externally hosted, [url='http://imageshack.us']ImageShack[/url] is our recommendation. Any images that are not 150x150 will be automatically resized <form action='preferences.php?action=picchange2' method='post'> New Pic: <input type='text' name='newpic' value='{$ir['display_pic']}' /> <input type='submit' value='Change Name' /></form>"; } function do_pic_change() { global $db,$ir,$c,$userid,$h; if($_POST['newpic'] == "") { print "You did not enter a new pic. [url='preferences.php?action=picchange']> Back[/url]"; } else { $_POST['forums_avatar']=$_POST['newpic']; $_POST['forums_avatar']=str_replace(array("<", ">",addslashes("'"),addslashes('"')), array("<", ">","'","""), $_POST['forums_avatar']); if(strpos($_POST['forums_avatar'],".php") !== false || strpos($_POST['forums_avatar'],".asp") !== false || strpos($_POST['forums_avatar'],".aspx") !== false || strpos($_POST['forums_avatar'],".htm") !== false) { print("Invalid characters [url='preferences.php?action=picchange']> Back[/url]"); $h->endpage(); exit; } if(strpos($_POST['forums_avatar'],".gif") === false && strpos($_POST['forums_avatar'],".jpg") === false && strpos($_POST['forums_avatar'],".png") === false && strpos($_POST['forums_avatar'],".jpeg") === false) { print("Invalid extension, please use a gif, jpg or png image [url='preferences.php?action=picchange']> Back[/url]"); $h->endpage(); exit; } $db->query("UPDATE users SET display_pic='{$_POST['forums_avatar']}' WHERE userid=$userid"); print "Pic changed!"; } } and I keep getting this error when I try to add this to the preferences: Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/damagedc/public_html/preferences.php on line 215
-
im sure peter could help u with this hes a great designer
-
i have the same problem with this anyone know how to fix?
-
Sounds pretty good reminds me of the games you see on facebook though where you help other players
-
Errors I get: QUERY ERROR: Column count doesn't match value count at row 1 Query was INSERT INTO imremovelogs VALUES ('', 1, 1, 1, 60, 167, unix_timestamp(), 'izzypod5 removed a Mini Roxi from the car market belonging to ID 1.') QUERY ERROR: Column count doesn't match value count at row 1 Query was INSERT INTO imbuylogs VALUES ('', 1, 1, 5, 2800, 60, 168, unix_timestamp(), 'thedaddy bought a Mini Roxi from the car market for $2800 from user ID 1') and here is the code which I need fixed: $db->query("INSERT INTO imbuylogs VALUES ('', {$r['cmCAR']}, {$r['cmADDER']}, $userid, {$r['cmPRICE']}, {$r['cmID']}, $i, unix_timestamp(), '{$ir['username']} bought a {$r['carNAME']} from the car market for \${$r['cmPRICE']} from user ID {$r['cmADDER']}')", $c); print "You bought the {$r['carNAME']} from the market for \$".number_format($r['cmPRICE'])."."; $db->query("INSERT INTO imremovelogs VALUES ('', {$r['cmCAR']}, {$r['cmADDER']}, $userid, {$r['cmID']}, $i, unix_timestamp(), '{$ir['username']} removed a {$r['carNAME']} from the car market belonging to ID {$r['cmADDER']}.')", $c); $db->query("DELETE FROM carmarket WHERE cmID={$_GET['ID']}",$c); I think it might be something to do with the unix timestamp but not sure so i posted here please help :)
-
[align=right][/align]u can just make a if function for examplethis is the one i use for my ranks: if($r['level']<3) { $rank="Private [img=Ranks/rank1.png]"; } else if($r['level']<5 AND $r['level']>=3) { $rank="Corporal [img=Ranks/rank2.png]"; } else if($r['level']<10 AND $r['level']>=5) { $rank="Sergeant [img=Ranks/rank3.png]"; } this ensures everytime they reach a certain level their rank will change with the picture and name of rank :) its basically the same principle this would be added to the viewuser under if($r['laston'] >= time()-15*60) { $on="<font color=green>[b]Online[/b]</font>"; } else { $on="<font color=red>[b]Offline[/b]</font>"; }
-
have tried both ways using row and array cause i did think it had to stay as array heres the error i got Warning: array_rand() [function.array-rand]: First argument has to be an array in /home/damagedc/public_html/petshopcron.php on line 10 Warning: array_rand() [function.array-rand]: First argument has to be an array in /home/damagedc/public_html/petshopcron.php on line 11 Warning: array_rand() [function.array-rand]: First argument has to be an array in /home/damagedc/public_html/petshopcron.php on line 12 Warning: array_rand() [function.array-rand]: First argument has to be an array in /home/damagedc/public_html/petshopcron.php on line 13 Warning: array_rand() [function.array-rand]: First argument has to be an array in /home/damagedc/public_html/petshopcron.php on line 14 Warning: array_rand() [function.array-rand]: First argument has to be an array in /home/damagedc/public_html/petshopcron.php on line 15 Warning: array_rand() [function.array-rand]: First argument has to be an array in /home/damagedc/public_html/petshopcron.php on line 16 Warning: array_rand() [function.array-rand]: First argument has to be an array in /home/damagedc/public_html/petshopcron.php on line 17 Warning: array_rand() [function.array-rand]: First argument has to be an array in /home/damagedc/public_html/petshopcron.php on line 18 Warning: array_rand() [function.array-rand]: First argument has to be an array in /home/damagedc/public_html/petshopcron.php on line 19 Warning: array_rand() [function.array-rand]: First argument has to be an array in /home/damagedc/public_html/petshopcron.php on line 20 Warning: array_rand() [function.array-rand]: First argument has to be an array in /home/damagedc/public_html/petshopcron.php on line 21 Warning: array_rand() [function.array-rand]: First argument has to be an array in /home/damagedc/public_html/petshopcron.php on line 22 Warning: array_rand() [function.array-rand]: First argument has to be an array in /home/damagedc/public_html/petshopcron.php on line 23 Warning: array_rand() [function.array-rand]: First argument has to be an array in /home/damagedc/public_html/petshopcron.php on line 24 Warning: array_rand() [function.array-rand]: First argument has to be an array in /home/damagedc/public_html/petshopcron.php on line 25 Warning: array_rand() [function.array-rand]: First argument has to be an array in /home/damagedc/public_html/petshopcron.php on line 26 Warning: array_rand() [function.array-rand]: First argument has to be an array in /home/damagedc/public_html/petshopcron.php on line 27 Warning: array_rand() [function.array-rand]: First argument has to be an array in /home/damagedc/public_html/petshopcron.php on line 28 Warning: array_rand() [function.array-rand]: First argument has to be an array in /home/damagedc/public_html/petshopcron.php on line 29 Warning: array_rand() [function.array-rand]: First argument has to be an array in /home/damagedc/public_html/petshopcron.php on line 30 Warning: array_rand() [function.array-rand]: First argument has to be an array in /home/damagedc/public_html/petshopcron.php on line 31 Warning: array_rand() [function.array-rand]: First argument has to be an array in /home/damagedc/public_html/petshopcron.php on line 32 Warning: array_rand() [function.array-rand]: First argument has to be an array in /home/damagedc/public_html/petshopcron.php on line 33 Warning: array_rand() [function.array-rand]: First argument has to be an array in /home/damagedc/public_html/petshopcron.php on line 34 Warning: array_rand() [function.array-rand]: First argument has to be an array in /home/damagedc/public_html/petshopcron.php on line 35 and im just gonna post the full code so u can spot where it is im going wrong:S <?php require "globals.php"; global $c; $db->query("TRUNCATE TABLE pstock;"); $er=$db->query("SELECT * FROM items WHERE itmtype=9",$c); while($r=$db->fetch_row($er)) { $petid[$r['itmid']]++; } $pet[0]=array_rand($petid, 1); $pet[1]=array_rand($petid, 1); $pet[2]=array_rand($petid, 1); $pet[3]=array_rand($petid, 1); $pet[4]=array_rand($petid, 1); $pet[5]=array_rand($petid, 1); $pet[6]=array_rand($petid, 1); $pet[7]=array_rand($petid, 1); $pet[8]=array_rand($petid, 1); $pet[9]=array_rand($petid, 1); $pet[10]=array_rand($petid, 1); $pet[11]=array_rand($petid, 1); $pet[12]=array_rand($petid, 1); $pet[13]=array_rand($petid, 1); $pet[14]=array_rand($petid, 1); $pet[15]=array_rand($petid, 1); $pet[16]=array_rand($petid, 1); $pet[17]=array_rand($petid, 1); $pet[18]=array_rand($petid, 1); $pet[19]=array_rand($petid, 1); $pet[20]=array_rand($petid, 1); $pet[21]=array_rand($petid, 1); $pet[22]=array_rand($petid, 1); $pet[23]=array_rand($petid, 1); $pet[24]=array_rand($petid, 1); $pet[25]=array_rand($petid, 1); $db->query("INSERT INTO pstock VALUES('','','{$pet[0]}','','230000')"); $db->query("INSERT INTO pstock VALUES('','','{$pet[1]}','','230000')"); $db->query("INSERT INTO pstock VALUES('','','{$pet[2]}','','230000')"); $db->query("INSERT INTO pstock VALUES('','','{$pet[3]}','','230000')"); $db->query("INSERT INTO pstock VALUES('','','{$pet[4]}','','230000')"); $db->query("INSERT INTO pstock VALUES('','','{$pet[5]}','','230000')"); $db->query("INSERT INTO pstock VALUES('','','{$pet[6]}','','230000')"); $db->query("INSERT INTO pstock VALUES('','','{$pet[7]}','','230000')"); $db->query("INSERT INTO pstock VALUES('','','{$pet[8]}','','230000')"); $db->query("INSERT INTO pstock VALUES('','','{$pet[9]}','','230000')"); $db->query("INSERT INTO pstock VALUES('','','{$pet[10]}','','230000')"); $db->query("INSERT INTO pstock VALUES('','','{$pet[11]}','','230000')"); $db->query("INSERT INTO pstock VALUES('','','{$pet[12]}','','230000')"); $db->query("INSERT INTO pstock VALUES('','','{$pet[13]}','','230000')"); $db->query("INSERT INTO pstock VALUES('','','{$pet[14]}','','230000')"); $db->query("INSERT INTO pstock VALUES('','','{$pet[15]}','','230000')"); $db->query("INSERT INTO pstock VALUES('','','{$pet[16]}','','230000')"); $db->query("INSERT INTO pstock VALUES('','','{$pet[17]}','','230000')"); $db->query("INSERT INTO pstock VALUES('','','{$pet[18]}','','230000')"); $db->query("INSERT INTO pstock VALUES('','','{$pet[19]}','','230000')"); $db->query("INSERT INTO pstock VALUES('','','{$pet[20]}','','230000')"); $db->query("INSERT INTO pstock VALUES('','','{$pet[21]}','','230000')"); $db->query("INSERT INTO pstock VALUES('','','{$pet[22]}','','230000')"); $db->query("INSERT INTO pstock VALUES('','','{$pet[23]}','','230000')"); $db->query("INSERT INTO pstock VALUES('','','{$pet[24]}','','230000')"); $db->query("INSERT INTO pstock VALUES('','','{$pet[25]}','','230000')"); ?>
-
i had the same problem Mystical you have probably just got the house prices wrong just replace it with this: \${$r['hPRICE']}
-
no it didnt work before
-
used that code this is the error Fatal error: Call to undefined method database::fetch_array() in /home/damagedc/public_html/petshopcron.php on line 6
-
ok i will just use it like that and the reason why i change it is because thats just how i learned to convert by replacing the mysql and array but if it works the same might as well not change
-
thats what i thought u had to do keep it as array but i then got this error Warning: array_rand() [function.array-rand]: First argument has to be an array in /home/damagedc/public_html/petshopcron.php on line 10 Warning: array_rand() [function.array-rand]: First argument has to be an array in /home/damagedc/public_html/petshopcron.php on line 11 and it goes on for all the arrays
-
Tried some more conversion but this time on a petshopcron heres v1: while($r=mysql_fetch_array($er)) { $petid[$r['itmid']]++; } $pet[0]=array_rand($petid, 1); $pet[1]=array_rand($petid, 1); Converted v2 while($r=$db->fetch_row($er)) { $petid[$r['itmid']]++; } $pet[0]=row_rand($petid, 1); $pet[1]=row_rand($petid, 1); Heres the error i get: Fatal error: Call to undefined function row_rand() in /home/damagedc/public_html/petshopcron.php on line 10
-
thanks equinox
-
should be somewhere about here function cmarket_index() { global $ir,$c,$userid,$h; print " Viewing all listings... <table width=100% border=6> <tr style='background:black'> <th>Seller</th> <th>Car</th> <th>Acceleration Level</th> <th>Handling Level</th> <th>Speed Level</th> <th>Shield Level</th> <th>Price</th> <th>Links</th> </tr>"; $q=$db->query("SELECT cm.*, u.*,ct.* FROM carmarket cm LEFT JOIN users u ON u.userid=cm.cmADDER LEFT JOIN cars_types ct ON ct.carID=cm.cmCAR ORDER BY cmPRICE ASC",$c); while($r=$db->fetch_rows($q)) { if($r['cmADDER'] == $userid) { $link = "[url='carmarket.php?action=remove&ID={$r[']Remove[/url]"; } else { $link = "[url='carmarket.php?action=buy&ID={$r[']Buy[/url]"; } print "\n<tr> <td>[url='viewuser.php?u={$r[']{$r['username']}[/url] [{$r['userid']}]</td> <td>{$r['carNAME']}</td> <td>{$r['cmACC']}</td> <td>{$r['cmHAN']}</td> <td>{$r['cmSPD']}</td> <td>{$r['cmSHD']} <td>\$".number_format($r['cmPRICE'])."</td> <td>[$link]</td> </tr>"; } print "</table>"; }
-
when converting some v1 files cause im practicing came into this error for car market Fatal error: Call to a member function query() on a non-object in /home/damagedc/public_html/carmarket.php on line 31 Also with the converting of v1 to v2 seems really easy to do but sometimes those arrays can get annoying cause sometimes you need them and sometimes you dont
-
ok thanks
-
great thanks illusions but one problem when you have radioplayer.php on it stays on the bootom of the screen but you cant move the page up and down cause the scroller goes:S
-
i dont really want a tab/window id rather have it as a box that can be moved like others i have seen fromn other games u can resize them and move as you like if you could do that with iframe that would be great
-
mygunwars I tried your radio but it never loads up so u cant play it :S
-
This is my first mod and its very simple but as a game owner I got annoyed that all these radio mods being posted were not working so heres my one. Save this as radio.php <?php include "globals.php"; print <<<EOF Welcome To {$set['game_name']} Radio! Radio is powered by [url]www.soundstreamradio.com[/url] <object id="MediaPlayer1" width=180 height=50 classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" standby="Loading Microsoft? Windows? Media Player components..." type="application/x-oleobject" align="middle"> <param name="FileName" value="http://listen.soundstreamradio.com:8000/"> <param name="AutoStart" value="False"> <param name="ShowStatusBar" value="True"> <param name="DefaultFrame" value="mainFrame"> <embed type="application/x-mplayer2" pluginspage = "http://www.microsoft.com/Windows/MediaPlayer/" src="http://listen.soundstreamradio.com:8000/" align="middle" width=176 height=144 defaultframe="rightFrame" showstatusbar=true> </embed> </object> [url="index.php"]Back Home[/url] EOF; $h->endpage(); ?> If any body can make improvements to this basic windows media player version feel free to post it would be good if you could show how to make it moveable and to stay on the screen rather than having to stay on the page. Other than that it works fine and if you do want a different radio station just edit the url of the radio station.
-
Job not giving stats or crediting users
LegendFTW replied to Shakeynath's topic in Modification Support
I have the same problem can anyone help? <?php $jobquery=1; include "globals.php"; $_GET['interview'] = abs((int) $_GET['interview']); if(!$ir['job']) { if(!$_GET['interview']) { print " You do not yet have a job. A list of jobs is available below. "; $q=$db->query("SELECT * FROM jobs"); while($r=$db->fetch_row($q)) { print "> <font color=blue>{$r['jNAME']}</font> - <font color=green>{$r['jDESC']}</font> - [url='job.php?interview={$r[']<font color=red>Go to interview</font>[/url] "; } } else { $q=$db->query("SELECT j.*,jr.* FROM jobs j LEFT JOIN jobranks jr ON j.jFIRST = jr.jrID WHERE j.jID={$_GET['interview']}"); $r=$db->fetch_row($q); print "{$r['jOWNER']}: So {$ir['username']}, you were looking for a job with us? {$ir['username']}: Yes please! "; if($ir['strength'] >= $r['jrSTRN'] && $ir['labour'] >= $r['jrLABOURN'] && $ir['IQ'] >= $r['jrIQN']) { $db->query("UPDATE users SET job={$_GET['interview']},jobrank={$r['jrID']} WHERE userid=$userid;"); print "{$r['jOWNER']}: Okay {$ir['username']}, we're good to go, see you tomorrow. {$ir['username']}: Thanks! [url='job.php']:)[/url]"; } else { print "{$r['jOWNER']}: Sorry {$ir['username']}, you're not far enough in the game to work in this job. You'll need:"; if($ir['strength'] < $r['jrSTRN']) { $s=$r['jrSTRN']-$ir['strength']; print " $s more strength, "; } if($ir['labour'] < $r['jrLABOURN']) { $s=$r['jrLABOURN']-$ir['labour']; print " $s more labour, "; } if($ir['IQ'] < $r['jrIQN']) { $s=$r['jrIQN']-$ir['IQ']; print " $s more IQ, "; } print "before you'll be able to work here! [url='index.php']:'([/url]"; } } } else { switch($_GET['action']) { case 'quit': quit_job(); break; case 'promote': job_promote(); break; default: job_index(); break; } } function job_index() { global $db, $ir,$c,$userid,$h; print "<h3>Your Job</h3> You currently work in the {$ir['jNAME']}! You receive \${$ir['jrPAY']} and {$ir['jrPOINTS']} Job Points each day at 5pm! You also receive {$ir['jrIQG']} IQ, {$ir['jrSTRG']} strength, and {$ir['jrLABOURG']} labour! <table width=50% cellspacing=1 class='table'><tr><td>Strength: {$ir['strength']}</td><td>IQ: {$ir['IQ']}</td></tr><tr><td>Labour: {$ir['labour']}</td><td>Job Rank: {$ir['jrNAME']}</td></tr></table> [b]Job Ranks[/b] <table width=75% cellspacing=1 class='table'><tr style='background:gray'><th>Title</th><th>Pay</th><th>Strength Reqd</th><th>IQ Reqd</th><th>Labour Reqd</th></tr>"; $q=$db->query("SELECT * FROM jobranks WHERE jrJOB={$ir['job']} ORDER BY jrPAY ASC;"); while($r=$db->fetch_row($q)) { print "<tr><td>{$r['jrNAME']}</td><td>\${$r['jrPAY']}</td><td>{$r['jrSTRN']}</td><td>{$r['jrIQN']}</td><td>{$r['jrLABOURN']}</td></tr>"; } $js=$db->query("SELECT * FROM jobspecials WHERE jsJOB={$ir['job']} ORDER BY jsID ASC;",$c); print "[b]Specials unlocked:[/b] <form action='specials.php' method='post'> <table width=80% cellspacing=1 class='table'> <tr> <th><font color=red>Reward</font></th> <th><font color=red>Cost</font></th> <th><font color=red>Take</font></th></tr>"; if($db->num_rows($js) == 0) { print "<tr class='row$current_row'><td colspan=3>This Job has no Speacials</td></tr>"; $current_row = 1 - $current_row; } while($sp=$db->fetch_row($js)) { print "<tr class='row$current_row'><td><font color=black>{$sp['jsNAME']}</td><td><font color=#FF0000>-{$sp['jsCOST']} Job Points</font></td><td><center><input type='radio' name='ID' value='{$sp['jsID']}' /></td></tr>"; $current_row = 1 - $current_row; } print "<tr> <td colspan=3><div align=center><input type='submit' value='Purchase'></div></td> </tr></table> [url='job.php?action=promote']> Try To Get Promoted[/url] [url='job.php?action=quit']> Quit[/url] </form>"; } function job_promote() { global $db,$ir,$c,$userid,$h; $q=$db->query("SELECT * FROM jobranks WHERE jrPAY > {$ir['jrPAY']} AND jrSTRN <= {$ir['strength']} AND jrLABOURN <= {$ir['labour']} AND jrIQN <= {$ir['IQ']} AND jrJOB = {$ir['job']} ORDER BY jrPAY DESC LIMIT 1"); if($db->num_rows($q) == 0) { print "Sorry, you cannot be promoted at this time. [url='job.php']> Back[/url]"; } else { $r=$db->fetch_row($q); $db->query("UPDATE users SET jobrank={$r['jrID']} WHERE userid=$userid"); print "Congrats, you have been promoted to {$r['jrNAME']} [url='job.php']> Back[/url]"; } } function quit_job() { global $db,$ir,$c,$userid,$h; $db->query("UPDATE users SET job=0,jobrank=0 WHERE userid=$userid"); print "You have quit your job! [url='job.php']> Back[/url]"; } $h->endpage(); ?> Here is the cron hour: <?php include "config.php"; global $_CONFIG; if($_GET['code'] != $_CONFIG['code']) { die(""); } define("MONO_ON", 1); require "class/class_db_{$_CONFIG['driver']}.php"; $db=new database; $db->configure($_CONFIG['hostname'], $_CONFIG['username'], $_CONFIG['password'], $_CONFIG['database'], $_CONFIG['persistent']); $db->connect(); $c=$db->connection_id; $set=array(); $settq=$db->query("SELECT * FROM settings"); while($r=$db->fetch_row($settq)) { $set[$r['conf_name']]=$r['conf_value']; } $db->query("UPDATE users SET smoking=smoking-2 WHERE smoking > 0"); $db->query("UPDATE gangs SET gangCHOURS=gangCHOURS-1 WHERE gangCRIME>0"); $q=$db->query("SELECT g.*,oc.* FROM gangs g LEFT JOIN orgcrimes oc ON g.gangCRIME=oc.ocID WHERE g.gangCRIME > 0 AND g.gangCHOURS = 0"); while($r=$db->fetch_row($q)) { $suc=rand(0,1); if($suc) { $log=$r['ocSTARTTEXT'].$r['ocSUCCTEXT']; $muny=(int) (rand($r['ocMINMONEY'],$r['ocMAXMONEY'])); $log=str_replace(array("{muny}","'"),array($muny,"''"),$log); $db->query("UPDATE gangs SET gangMONEY=gangMONEY+$muny,gangCRIME=0 WHERE gangID={$r['gangID']}"); $db->query("INSERT INTO oclogs VALUES ('',{$r['ocID']},{$r['gangID']}, '$log', 'success', $muny, '{$r['ocNAME']}', unix_timestamp())"); $i=$db->insert_id(); $qm=$db->query("SELECT * FROM users WHERE gang={$r['gangID']}"); while($rm=$db->fetch_row($qm)) { event_add($rm['userid'],"Your Gang's Organised Crime Succeeded. Go [url='oclog.php?ID=$i']here[/url] to view the details.",$c); } } else { $log=$r['ocSTARTTEXT'].$r['ocFAILTEXT']; $muny=0; $log=str_replace(array("{muny}","'"),array($muny,"''"),$log); $db->query("UPDATE gangs SET gangCRIME=0 WHERE gangID={$r['gangID']}"); $db->query("INSERT INTO oclogs VALUES ('',{$r['ocID']},{$r['gangID']}, '$log', 'failure', $muny, '{$r['ocNAME']}', unix_timestamp())"); $i=$db->insert_id(); $qm=$db->query("SELECT * FROM users WHERE gang={$r['gangID']}"); while($rm=$db->fetch_row($qm)) { event_add($rm['userid'],"Your Gang's Organised Crime Failed. Go [url='oclog.php?ID=$i']here[/url] to view the details.",$c); } } if(date('G')==17) { $db->query("UPDATE users u LEFT JOIN userstats us ON u.userid=us.userid LEFT JOIN jobs j ON j.jID=u.job LEFT JOIN jobranks jr ON u.jobrank=jr.jrID SET u.money=u.money+jr.jrPAY, u.jobpoints=u.jobpoints+jr.jrPOINTS, u.exp=u.exp+(jr.jrPAY/20) WHERE u.job > 0 AND u.jobrank > 0"); $db->query("UPDATE userstats us LEFT JOIN users u ON u.userid=us.userid LEFT JOIN jobs j ON j.jID=u.job LEFT JOIN jobranks jr ON u.jobrank=jr.jrID SET us.strength=(us.strength+1)+jr.jrSTRG-1,us.labour=(us.labour+1)+jr.jrLABOURG-1,us.IQ=(us.IQ+1)+jr.jrIQG-1 WHERE u.job > 0 AND u.jobrank > 0"); } if($set['validate_period'] == 60 && $set['validate_on']) { $db->query("UPDATE users SET verified=0"); } } $stock=$db->query("SELECT * FROM stock",$c); while($st=$db->fetch_row($stock)) { $rand1=(int) rand(1,2); $rand2=(int) rand(1,25); if($rand1 == 1) { $db->query("UPDATE stock SET stCOST=stCOST+$rand2,stPERC='$rand2' WHERE stID={$st['stID']}",$c); } else { $db->query("UPDATE stock SET stCOST=stCOST-$rand2,stPERC='-$rand2' WHERE stID={$st['stID']}",$c); } } $db->query("UPDATE stock SET stCOST=0 WHERE stCOST<0",$c); $db->query("DELETE FROM stock WHERE stCOST=0",$c); ?> -
mccode-v1 Travel to User Location button on profiles
LegendFTW replied to Cyanide's topic in Free Modifications
Not sure how to do this but would u have to make a if function to stop it from showing the button if you are already in the location cause obviously i dont want this appearing if you are already in the location. -
[mccode v2] Very simple travel time mod.
LegendFTW replied to shaved92bravada's topic in Free Modifications
stupid me missed that thanks lucky3809