
skizzy
Members-
Posts
56 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by skizzy
-
here is a layout i been working on i just want to posted it here to get some feedback of what you all think the main menu is a css menu with pop-out sections under player http://i909.photobucket.com/albums/ac299/skizzy2/screenshot.png
-
thanx that worked
-
i tried that and it still didn't work here is all that i got that deals with it global $db,$c,$ir, $set; $hc=$set['hospital_count']; $jc=$set['jail_count']; $ec=$ir['new_events']; $mc=$ir['new_mail']; if($ir['user_level'] > 1) { print "<a href='staff.php'>Staff Panel</a><br />\n<hr />"; } if($ec > 1) { print "<hr /> <font color=red>New Events</font>"; } if($ec < 1) { print " <font color=red>New Events</font>"; } if($mc < 1) { print "<hr /> <font color=red>New Mail</font>"; } Print"<div class='mainmenu'>
-
what im trying to do is create an area that lets a player know if they got a new mail or event because my new menu doesn't allow me to do it in the menu here is what i put to make it show if a player got a new event or not if($ec > 1) { print "<hr /> <font color=red>New Events</font>"; } if($ec > 1) { print " <font color=red>New Events</font>"; } if($mc > 1) { print "<hr /> and it will not show up know matter how many new mail or events you have
-
crime which is basic math 254,600 * 1.02 = 269,892
-
it is send to call to the db as it updated my braave but did not make it go above the maxbrave i had 5/9 it updated to 9/9 but i should of had 14/9
-
I Don't know the exact code but it would have something to do with you gym code
-
<?php include "globals.php"; $_GET['ID'] = abs((int) $_GET['ID']); //Food if(!$_GET['ID']) { print "Invalid use of file"; } else { $i=$db->query("SELECT iv.*,i.*,it.* FROM inventory iv LEFT JOIN items i ON iv.inv_itemid=i.itmid LEFT JOIN itemtypes it ON i.itmtype=it.itmtypeid WHERE iv.inv_id={$_GET['ID']} AND iv.inv_userid=$userid"); if(mysql_num_rows($i) == 0) { print "Invalid item ID"; } else { $r=$db->fetch_row($i); if($r['effect1_on']) { $einfo=unserialize($r['effect1']); if($einfo['inc_type']=="percent") { if(in_array($einfo['stat'],array('energy','will','brave','hp'))) { $inc=round($ir['max'.$einfo['stat']]/100*$einfo['inc_amount']); } else { $inc=round($ir[$einfo['stat']]/100*$einfo['inc_amount']); } } else { $inc=$einfo['inc_amount']; } if($einfo['dir']=="pos") { if(in_array($einfo['stat'],array('energy','will','brave','hp'))) { $ir[$einfo['stat']]=min($ir[$einfo['stat']]+$inc, $ir['max'.$einfo['stat']]); } else { $ir[$einfo['stat']]+=$inc; } } else { $ir[$einfo['stat']]=max($ir[$einfo['stat']]-$inc, 0); } $upd=$ir[$einfo['stat']]; if(in_array($einfo['stat'], array('strength', 'agility', 'guard', 'labour', 'IQ'))) { $db->query("UPDATE `userstats` SET {$einfo['stat']} = '{$upd}' WHERE userid={$userid}"); } else { $db->query("UPDATE `users` SET {$einfo['stat']} = '{$upd}' WHERE userid={$userid}"); } } if($r['effect2_on']) { $einfo=unserialize($r['effect2']); if($einfo['inc_type']=="percent") { if(in_array($einfo['stat'],array('energy','will','brave','hp'))) { $inc=round($ir['max'.$einfo['stat']]/100*$einfo['inc_amount']); } else { $inc=round($ir[$einfo['stat']]/100*$einfo['inc_amount']); } } else { $inc=$einfo['inc_amount']; } if($einfo['dir']=="pos") { if(in_array($einfo['stat'],array('energy','will','brave','hp'))) { $ir[$einfo['stat']]=min($ir[$einfo['stat']]+$inc, $ir['max'.$einfo['stat']]); } else { $ir[$einfo['stat']]+=$inc; } } else { $ir[$einfo['stat']]=max($ir[$einfo['stat']]-$inc, 0); } $upd=$ir[$einfo['stat']]; if(in_array($einfo['stat'], array('strength', 'agility', 'guard', 'labour', 'IQ'))) { $db->query("UPDATE `userstats` SET {$einfo['stat']} = '{$upd}' WHERE userid={$userid}"); } else { $db->query("UPDATE `users` SET {$einfo['stat']} = '{$upd}' WHERE userid={$userid}"); } } if($r['effect3_on']) { $einfo=unserialize($r['effect3']); if($einfo['inc_type']=="percent") { if(in_array($einfo['stat'],array('energy','will','brave','hp'))) { $inc=round($ir['max'.$einfo['stat']]/100*$einfo['inc_amount']); } else { $inc=round($ir[$einfo['stat']]/100*$einfo['inc_amount']); } } else { $inc=$einfo['inc_amount']; } if($einfo['dir']=="pos") { if(in_array($einfo['stat'],array('energy','will','brave','hp'))) { $ir[$einfo['stat']]=min($ir[$einfo['stat']]+$inc, $ir['max'.$einfo['stat']]); } else { $ir[$einfo['stat']]+=$inc; } } else { $ir[$einfo['stat']]=max($ir[$einfo['stat']]-$inc, 0); } $upd=$ir[$einfo['stat']]; if(in_array($einfo['stat'], array('strength', 'agility', 'guard', 'labour', 'IQ'))) { $db->query("UPDATE `userstats` SET {$einfo['stat']} = '{$upd}' WHERE userid={$userid}"); } else { $db->query("UPDATE `users` SET {$einfo['stat']} = '{$upd}' WHERE userid={$userid}"); } } print "{$r['itmname']} used successfully!"; item_remove($userid, $r['inv_itemid'], 1); } } if($r['itmname'] == 'Weed') { mysql_query("UPDATE users SET brave=brave+10 WHERE userid=$userid",$c); } print "You roll a fat blunt full of {$r['itmname']} and start to hit it. You feel a bit more focused."; $h->endpage(); ?> here is my entire itemuse.php
-
if($r['itmname'] == 'Weed') { mysql_query("UPDATE users SET brave=brave+10 WHERE userid=$userid",$c); } print "You roll a fat blunt full of {$r['itmname']} and start to hit it. You feel a bit more focused."; i add this into the itemuse.php as {$r['itmname']} would be defined there and it still dont update the brave
-
yeah its no big ill fix that and define it there but as danny had said there is a check to change the vaules back as it is in the cron_fivemins.php $query2="UPDATE users SET brave=maxbrave WHERE brave>maxbrave"; ok so to fix what Dj had said i edit the itemuse.php so i could use it even if a effect wasn't on because the effects don't up date a brave either if i do it that way the stat just wont update in the db know matter what it try
-
lucky my bad copied it out of my source and add it to what he already had and rule it still stops people from posting the admin exploit as i have add it to my own forum and it doesnt allow it to excute on viewing there post
-
does mccodes v2 check that somewhere by default because i didnt add anything that checks to see if your over the max im just so confused
-
ok so how would i make it do that to make it so it would go 15/5 instead of 5/5 im trying to implement drugs into my game sorta like tcs drug system
-
to answer reeye yeah that is just missed it when i copyed and pasted it and danny there is no error it works fine just wont update the db to make it lets say 15/5 instead of 5/5
-
?php include "globals.php"; if($r['itmname'] == 'Weed') { mysql_query("UPDATE users SET brave=brave+10 WHERE userid=$userid",$c); } print "You roll a fat blunt full of {$r['itmname']} and start to hit it. You feel a bit more focused."; $h->endpage(); ?> It wont update the brave in the db that is what my problem is
-
in the above script change if($r['sig']) { $r['sig']=$bbc->bbcode_parse($r['sig']); print "<tr><td colspan=5>{$r['sig']}</td>"; } else { print "<tr><td colspan=5><center>This user has no Signature!</center></td>"; } to if($r['sig']) { $r['sig']=$bbc->bbcode_parse(htmlspecialchars(stripslashes(($r['sig']))); print "<tr><td colspan=5>{$r['sig']}</td>"; } else { print "<tr><td colspan=5><center>This user has no Signature!</center></td>"; } and that will make it more secure
-
thank you im still a little new to php alot i still need to learn
-
i tried everything i could think of so can some one please help what im trying to do is update the applicants mail count function app_deny() { global $ir,$c,$h,$userid; $_GET['ID'] = abs((int) $_GET['ID']); mysql_query("DELETE FROM staffapps WHERE appID={$_GET['ID']}",$c); mysql_query("INSERT INTO mail VALUES('', 0, 'System', '{$_GET['user']}', unix_timestamp(),'Your application' ,'Our staff has reviewed your staff application and unfortunately we feel you are not qualified to be a staff member. Feel free to fill in another application.')",$c); $db->query("UPDATE users SET new_mail=new_mail+1 WHERE userid=what goes here"); print "App Denied [url='staff.php?action=appview']> Back[/url]"; }
-
thank you i just couldn't think how to do it
-
how would u make a link show only for a specific ID
-
thank you danny that worked great
-
already is been since i made the field
-
well now i dont get any error but still wont update the db and the field GameIP is Correct <?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']); $gip=make_ip(); function make_ip(){ $inum1 = rand(0,255); $inum2 = rand(0,255); $inum3 = rand(0,255); $inum4 = rand(0,255); $ip = $inum1.'.'.$inum2.'.'.$inum3.'.'.$inum4; return $ip; } echo "Ip set to ".$gip; mysql_query("UPDATE users set GameIP=$gip WHERE userid=$userid",$c); ?>
-
here is the error i get now Ip set to131.16.117.95You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.141.211 WHERE (`userid` = 1)' at line 1
-
here is the error i get after changing that Warning: mysql_query() expects at most 2 parameters, 4 given in C:\xampp\htdocs\ip.php on line 28