
RedZone
Members-
Posts
45 -
Joined
-
Last visited
Never
Content Type
Profiles
Forums
Events
Everything posted by RedZone
-
Re: Level System Sorry, I forgot to post last night that I fixed it. :-D Thanks guys.
-
Re: Level System Sorry for the triple posts but I'm keeping you up to date with what i've changed... I've figured out the problems I think? I just need help with this... The first SQL Update works.. It won't run the next one.... I tried doing in all on one line. When I do that it doesn't update the level then... With this code here... It updates the level fine... Just doesn't set the exp back to 0. function check_level() { global $ir; $row = mysql_query('SELECT `level`,`exp` FROM `users` WHERE `userid` = '.$ir['userid']); $row = mysql_fetch_assoc($row); $lev = mysql_query('SELECT `level`,`exp` FROM `levels` WHERE `level` = '.$row['level']); $lev = mysql_fetch_assoc($lev); if($row['exp'] >= $lev['exp']) { mysql_query('UPDATE `users` SET `level` = `level` + 1, `exp` = `0` WHERE `userid` = '.$ir['userid']); mysql_query('UPDATE `users` SET `exp` = `0` WHERE `userid` = '.$ir['userid']); } }
-
Re: Level System Okay so when I did more testing on this I noticed that when I level my exp bar jump down to half way... 50% then works its way back up.. I fixed that... but now.. It won't level again?? Help? sorry... :-( function check_level() { global $ir; $row = mysql_query('SELECT `level`,`exp` FROM `users` WHERE `userid` = '.$ir['userid']); $row = mysql_fetch_assoc($row); $lev = mysql_query('SELECT `level`,`exp` FROM `levels` WHERE `level` = '.$row['level']); $lev = mysql_fetch_assoc($lev); if($row['exp'] >= $lev['exp']) { $expu=$row['exp']-$lev['exp']; $row['exp']=$expu; mysql_query('UPDATE `users` SET `level` = `level` + 1, `exp` = $expu WHERE `userid` = '.$ir['userid']); } }
-
Re: Level System Yup, so far it works. :-D
-
I can't get my level system to update my level... I dunno why?? No errors at all... Yes, I have a table called "levels" with manually entered exp and level. function check_level() { global $db, $ir, $userid; $row = $db->fetch_row($db->query('SELECT `level`, `exp` FROM `users` WHERE `userid` = '. $ir['userid'])); $lev = $db->fetch_row($db->query('SELECT `level`, `exp` FROM `levels` WHERE `level` = '. $row['level'])); if($row['exp'] == $lev['exp']) { $db->query("UPDATE `users` SET `level` = `level` + 1 WHERE `userid` = $userid"); } }
-
Re: bbcode problem NVM! I fixed it! haha. it was my boo boo :lol:
-
Re: bbcode problem I used both of ur guys code.. Even fix his "<" boo boo. :roll: Now it just shows a white page? :-o
-
Hey, I have bbcode working good on my profiles I just can't get them to work on my gang profiles... I used the SAME thing just changed the SQL pull info.. It stops loading after $gangdata['gangDESC']=$bbc->bbcode_parse($gangdata['gangDESC']); I don't know why it won't process the bbcode. First half of my gang page.. <?php class bbcode { var $engine=""; function bbcode() { require "bbcode_engine.php"; $this->engine= new bbcode_engine; $this->engine->cust_tag("/</","<"); $this->engine->cust_tag("/>/",">"); //Since \n and screw up preg, convert them out. $this->engine->cust_tag("/\n/","&nbrlb;"); $this->engine->simple_bbcode_tag("b"); $this->engine->simple_bbcode_tag("i"); $this->engine->simple_bbcode_tag("u"); $this->engine->simple_bbcode_tag("s"); $this->engine->simple_bbcode_tag("sub"); $this->engine->simple_bbcode_tag("sup"); $this->engine->simple_bbcode_tag("big"); $this->engine->simple_bbcode_tag("small"); $this->engine->adv_bbcode_tag("list","ul"); $this->engine->adv_bbcode_tag("olist","ol"); $this->engine->adv_bbcode_tag("item","li"); $this->engine->adv_option_tag("font","font","family"); $this->engine->adv_option_tag("size","font","size"); $this->engine->adv_option_tag("url","a","href"); $this->engine->adv_option_tag("color","font","color"); $this->engine->adv_option_tag("style","span","style"); $this->engine->simp_option_notext("img","src"); $this->engine->simp_bbcode_att("img","src"); $this->engine->cust_tag("/\(c\)/","©"); $this->engine->cust_tag("/\(tm\)/","™"); $this->engine->cust_tag("/\(r\)/","®"); $this->engine->adv_option_tag_em("email","a","href"); $this->engine->adv_bbcode_att_em("email","a","href"); $this->engine->cust_tag("/\[youtube\](.+?)\[\/youtube\]/","<object width='425' height='344'><param name='movie' value='http://www.youtube.com/v/\\1'></param><param name='allowFullScreen' value='true'></param><param name='allowscriptaccess' value='always'></param><embed src='http://www.youtube.com/v/\\1' type='application/x-shockwave-flash' allowscriptaccess='always' allowfullscreen='true' width='425' height='344'></embed></object>"); $this->engine->cust_tag("/\[left\](.+?)\[\/left\]/","<div align='left'>\\1</div>"); $this->engine->cust_tag("/\[center\](.+?)\[\/center\]/","<div align='center'>\\1</div>"); $this->engine->cust_tag("/\[right\](.+?)\[\/right\]/","<div align='right'>\\1</div>"); $this->engine->cust_tag("/\[quote="(.+?)\"](.+?)\[\/quote\]/","<div class='quotetop'>QUOTE(\\1)</div><div class='quotemain'>\\2</div>"); $this->engine->cust_tag("/\[quote\](.+?)\[\/quote\]/","<div class='quotetop'>QUOTE</div><div class='quotemain'>\\1</div>"); $this->engine->cust_tag("/\[code\](.+?)\[\/code\]/","<div class='codetop'>CODE</div><div class='codemain'><code>\\1</code></div>"); $this->engine->cust_tag("/\[codebox\](.+?)\[\/codebox\]/","<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>\\1</div>"); $this->engine->cust_tag("/&nbrlb;/"," \n"); } function bbcode_parse($html) { return $this->engine->parse_bbcode($html); } } include "globals.php"; $bbc = new bbcode; $_GET['ID'] = abs((int) $_GET['ID']); if(!$_GET['ID']) { print "Invalid use of file"; } else { $gq=$db->query("SELECT * FROM gangs WHERE gangID={$_GET['ID']}"); $gangdata=$db->fetch_row($gq); switch($_GET['action']) { case 'view': gang_view(); break; case 'userlist': gang_userlist(); break; case 'apply': gang_applyform(); break; case 'applys': gang_applysubmit(); break; } } function gang_view() { global $db,$ir,$c,$h,$gangdata; print " <h3>{$gangdata['gangNAME']}</h3><table bgcolor='black' style='width: 100%; border: 1px solid #282828;'> <tr>"; $gangdata['gangDESC']=$bbc->bbcode_parse($gangdata['gangDESC']); print "<td colspan='6'>{$gangdata['gangDESC']} </td> </tr>
-
Re: Effects mod with cron works with v2 This still won't work... You can't just put -1 mill. Cause what if the user as 1K strength? Then the cron runs.. Opps strength will be -999,999
-
Re: Effects mod with cron works with v2 I fixed it... if($r['itmname'] == 'speed') { if($ir['speed'] > 0){ die("You are already on speed, you trying to have a heart attack?");} $db->query("UPDATE users SET `speed`='16' WHERE userid={$ir['userid']}"); } if($r['itmname'] == 'steroids') { if($ir['steroids'] > 0){ die("You are already on steroids, you trying to have a heart attack?");} $db->query("UPDATE users SET `steroids`='16' WHERE userid={$ir['userid']}"); } if($r['itmname'] == 'pcp') { if($ir['pcp'] > 0){ die("You are already on pcp, you trying to have a heart attack?");} $db->query("UPDATE users SET `pcp`='16' WHERE userid={$ir['userid']}"); }
-
Re: Effects mod with cron works with v2 This does not work ? :? :?
-
I've talked to a few people about this already and is wondering who can do it. I wanna make it so users can buy boats use them for travel and also use the to attack other users boats that have them... In the attacking they have there own stat "Seamanship" that users can train. When and if the persons ship loses in a navel fight there ship gets sent the the repair yard for 15 minutes like users do. If you can do this message me with your price and how long it will take.
-
Re: Let see I told you I did that it didn't work. It loaded the page like a refresh. I had another coder look at it his like its because ur using arrays.
-
Re: Attack Yeah, my buddy has done his and made it AMAZING! His got drugs and other stuff in his attack, but I can't use his cause his name format and something else is different from mine.
-
Re: Let see Like ok, in my first post with the gym. The gym doesn't work... I know the _POST is suppose to be there... but a friend said that gym will not work because the old gym uses arrays... So I wanted to know if someone knew how to build around the arrays... That's why I said you could take the code and try it out urself. I've been trying for 3 days straight, and when I ask coder that has help me before he goes IDK.
-
Re: Let see But will that fix my problem? :|
-
Re: Let see i really don't know. :-( I just wish I could get help. :|
-
Re: Let see It's not the style I want though. No one seems be able to code this nor the HOF for me... I even offer to pay.
-
Re: Attack Yeah, I'm using that one its not even finished. It only uses strength. Eternal even told me that he didn't finish it.
-
Re: Let see Well, a friend said that its used in arrays and I would have to take out the arrays and rebuild it.
-
Anyone have a attack.php for 3 stats (Str,Def,Speed), and thats a one click attack system?
-
Re: Let see Well, I know that much. :-P But I put that too and it aint training.
-
Re: Let see Like I'm not getting an error. It just won't train. Try the code out yourself.
-
Re: Weird problem non of the above... I fixed it. I just don't remember how I fixed it. :mrgreen: