Jump to content
MakeWebGames

HUSTLE HARD

Members
  • Posts

    25
  • Joined

  • Last visited

Everything posted by HUSTLE HARD

  1. Hi i am trying to add a small icon inside my svg radial progress bar..however simply adding in a img tag breaks the design. <svg height="50" width="50" class="progress blue noselect" data-progress="'.$brperc.'" viewbox="0 0 80 80"> <path class="track" d="M5,40a35,35 0 1,0 70,0a35,35 0 1,0 -70,0" /> <path class="fill" d="M5,40a35,35 0 1,0 70,0a35,35 0 1,0 -70,0" /> <text class="value" style="font-size:16px;" x="50%" y="55%">0%</text> </svg> var forEach = function (array, callback, scope) { for (var i = 0; i < array.length; i++) { callback.call(scope, i, array[i]); } }; window.onload = function(){ var max = -219.99078369140625; forEach(document.querySelectorAll('.progress'), function (index, value) { percent = value.getAttribute('data-progress'); value.querySelector('.fill').setAttribute('style', 'stroke-dashoffset: ' + ((100 - percent) / 100) * max); value.querySelector('.value').innerHTML = percent + '%'; }); } I want the end result like below..
  2. I need some help, my content seems to be in place how ever when is zoom in/out it moves out of place tried all these css trick position, wrap and width fix didnt work.   body { background: #1d0202 url("images/header_body.jpg") no-repeat top center; margin:0 auto; padding:0; font:13px/16px "Lucida Grande", Arial, Sans-serif; color:#fff; } .wrap { width: 750px; } .row { width: 200px; margin: 0 auto; } #container { //margin:0 auto; position: absolute; top: 30%; left:30%; width: 800px; margin-left: auto ; margin-right: auto ; }   <body> <div id="container" class="wrap"> <table width='100%' border='0' align='center' cellspacing='0'> <form action="authenticate.php" class="gen-form" method="post"> <input class="text-input" id="username" name="username" tabindex="1" type="text" onclick="this.value='';" onfocus="this.select()" onblur="this.value=!this.value?'Username...':this.value;" value="Username..." /> <input class="text-input" id="password" name="password" tabindex="1" type="password" onclick="this.value='';" onfocus="this.select()" onblur="this.value=!this.value?'Password...':this.value;" value="Password..." /> <input type="submit" class="button" value="" tabindex="3"> </form> <div class="content_body"> Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. </div> <div class="register_button_padding"> <input type="submit" class="register_button" value="" tabindex="3"> </div> </div> </body> </html>
  3. this is my html and css can you tell me where am wrong and help me correct it the left content is okay but the main content the right one im having troubling keep the text within the box.   THE CSS
  4. this is my html and css can you tell me where am wrong and help me correct it the left content is okay but the main content the right one im having troubling keep the text within the box.   THE CSS
  5. I have shops with over 100's of items, just wanted to reduce the amount of scrolling by involving pages, each page displays a limit of 10. I use mccodes v.2 Can someone help me out please?
  6. ok i figured out the formula...dont worry thanks anyways
  7. Anyone will to help me?
  8. Ok this formual thing really gets confusing, so i want to make it simple when making a crime instead creating some long formula, then playing around with it i want it like a percentage format, out of 100 you enter the percentage of success for that crime. instead of this ((WILL*0.8)/2.5)+(LEVEL/4) i want it in simple form like in figures (10%, 20%,30%) etc.. the edit would be needed in the docrime.php in this section but i dont know what to do can someone help? $ec="\$sucrate=".str_replace(array("LEVEL","CRIMEXP","EXP","WILL","IQ"), array($ir['level'], $ir['crimexp'], $ir['exp'], $ir['will'], $ir['IQ']),$r['crimePERCFORM']).";"; eval($ec); $ir['brave']-=$r['crimeBRAVE']; mysql_query("UPDATE users SET brave={$ir['brave']} WHERE userid=$userid",$c); $db->query("UPDATE users SET crimes=crimes+1 WHERE userid={$ir['userid']}"); if(rand(1,100) <= $sucrate) { echo" <font style=color:white;>{$r['crimeSTEXT']}</font>"; echo' <font style=color:white;><b><u>Cash gained: </u></b></font><font style=color:limegreen;>$'.number_format($r['crimeSUCCESSMUNY']).'</font>'; echo" <br /> <center> <img src='images/crime/success.png' alt='SUCCESS'> <br /> <a href='docrime.php?c={$_GET['c']}'><input type=submit value=Redo></a> <a href='crime.php'><input type=submit value=Back></a> </center>"; $ir['money']+=$r['crimeSUCCESSMUNY']; $ir['crystals']+=$r['crimeSUCCESSCRYS']; $ir['exp']+=(int) ($r['crimeSUCCESSMUNY']/8); mysql_query("UPDATE users SET money={$ir['money']}, crystals={$ir['crystals']}, exp={$ir['exp']},crimexp=crimexp+{$r['crimeXP']} WHERE userid=$userid",$c); $db->query("UPDATE users SET crimespassed=crimespassed+1 WHERE userid={$ir['userid']}"); if($r['crimeSUCCESSITEM']) { item_add($userid, $r['crimeSUCCESSITEM'], 1); } }
  9. that doesnt help i can make a popup box to but it needs to display the content of the php file docrimes.php
  10. What i was thinking of doing is having a crime page a normal one, such as the basic mccodes v2 one but when you have chosen your crime you press do i want a popup box appearing showing results with a progress bar till your next level. Can someone help me create this, how would i start it off?
  11. its nothing to do with session, basically due to my register form being on my login.php and all the php checks and stuff on a separate file it is not picking up what is being typed into the captcha input
  12. Im having a problem with my popup ajax register, on my login.php i have the html code for the captha is implemented in, once submitted my ajax register checks all the information in a sperate file which is ajax_register.php how ever the captcha does not function properly i also tried adding in method post and get did not work it wont pick up what being typed into the input for the captcha. This is the html form in the login.php   <form action="ajax_register.php" method="post" id="registerForm"> <br /> <table width="100%" cellspacing="1"> <tr> Username<br /> <input name="username" id="username" onkeyup="CheckUsername(this.value);" type="text"/><br /> Password<br /> <input id="pw1" name="password" onkeyup="CheckPasswords(this.value);PasswordMatch();" type="password" /><br /> Confirm Password<br /> <td><input name="cpassword" id="pw2" onkeyup="PasswordMatch();" type="password" /><br /> Email<br /> <input id="email" name="email" onkeyup="CheckEmail(this.value);" type="email" /><br /> Gender<br /> <select name="gender" id="gender" type="dropdown"> <option value="Male">Male</option> <option value="Female">Female</option> </select><br /><br /> <?php if($set['regcap_on']) { echo "<img src='captcha_verify.php'/><br /> <input name='code' type='text' />"; } ?> </td> </tr> </table><br /> <div align="center"> <input type="submit" name="submit" value="Done" class="regbutton"> </div> <br /> <div id="callback" style="text-align: center;margin: 0 auto;color: black;background: #FFD9C8; border: 1px solid #F0BAA2;padding: 10px;opacity: 0.7;color:##232D30;width:80%;display: none; "> </div> <br /> </form>   this is my ajax_register.php <?php include "config.php"; global $_CONFIG; 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; require "global_func.php"; $set=array(); $settq=$db->query("SELECT * FROM settings"); while($r=$db->fetch_row($settq)) { $set[$r['conf_name']]=$r['conf_value']; } $extract = explode('&',$_POST['data']); foreach($extract as $e) { $data = explode('=',$e); $form[$data[0]] = urldecode($data[1]); } $username = ( isset($form['username'])&&preg_match("/^[a-z0-9_]+([\\s]{1}[a-z0-9_]|[a-z0-9_])+$/i", $form['username'])&&((strlen($form['username'])<32)&&(strlen($form['username'])>=3)) )?$form['username']:''; if($username && $form['password'] && $form['cpassword'] && $form['email'] && $form['gender']) { if($set['regcap_on']) { if(md5($_POST['code']) != $_SESSION['key']) die("You've failed the captcha test, please try again!"); } if(!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $form['email'])) { die("Sorry, this email is invalid <br />".$form['email']); } $sm=100; if($form['promo'] == "Your Promo Code Here") { $sm+=100; } $q=$db->query("SELECT * FROM users WHERE username='{$username}' OR login_name='{$username}'"); $q2=$db->query("SELECT * FROM users WHERE email='{$form['email']}'"); if($db->num_rows($q)) { echo "Username already in use. Choose another."; } else if($db->num_rows($q2)) { echo "E-Mail already in use. Choose another."; } else if($form['password'] != $form['cpassword']) { echo "The passwords did not match, please try again!"; } else { $form['ref'] = abs((int) $form['ref']); $IP = $db->escape($_SERVER['REMOTE_ADDR']); $q=$db->query("SELECT * FROM users WHERE lastip='$IP' AND userid={$form['ref']}"); if($db->num_rows($q)) { die("No creating referral multies. Bad dog."); } if($form['ref']) { $q=$db->query("SELECT * FROM users WHERE userid={$form['ref']}"); $r=$db->fetch_row($q); } $db->query("INSERT INTO users (username, login_name, userpass, level, money, crystals, donatordays, user_level, energy, maxenergy, will, maxwill, brave, maxbrave, hp, maxhp, location, gender, signedup, email, bankmoney, lastip, lastip_signup) VALUES( '{$username}', '{$username}', md5('{$form['password']}'), 1, $sm, 0, 0, 1, 12, 12, 100, 100, 5, 5, 100, 100, 1, '{$form['gender']}', unix_timestamp(), '{$form['email']}', -1, '$IP', '$IP')"); $i=$db->insert_id(); $db->query("INSERT INTO userstats VALUES($i, 10, 10, 10, 10, 10)"); if($form['ref']) { require "global_func.php"; $db->query("UPDATE users SET crystals=crystals+5 WHERE userid={$form['ref']}"); event_add($form['ref'],"For refering $username to the game, you have earned yourself 5 crystals!",$c); $db->query("INSERT INTO referals VALUES('', {$form['ref']}, $i, unix_timestamp(),'{$r['lastip']}','$IP')"); } echo "Congratulations! You have signed up, enjoy the game."; } } else { echo 'You must fill in all fields'; } ?>
  13. Would anyone want to help?
  14. Im really confused when i train at the gym for example i use 1 energy. At current my energy would be 12/12 after training it would be 17/12 which breaks the bar design making the bar so long..can not figure it out can someone direct/help me. After certain amount of minutes it would reduce by its self and come back to 12/12. This is in the header which defines the bars.. $enperc=(int) ($ir['energy']/$ir['maxenergy']*100); $wiperc=(int) ($ir['will']/$ir['maxwill']*100); $experc=(int) ( $ir['exp']/$ir['exp_needed']*100); $brperc=(int) ($ir['brave']/$ir['maxbrave']*100); $hpperc=(int) ($ir['hp']/$ir['maxhp']*100); $enopp=100-$enperc; $wiopp=100-$wiperc; $exopp=100-$experc; $bropp=100-$brperc; $hpopp=100-$hpperc;   this is the formula in my gym which gains the stats.   if($_POST['stat'] && $_POST['amnt']) { $stat=$statnames[$_POST['stat']]; if(!$stat) { die("<font style=color:red;><b>This skill/stat can not be trained.</font></b><br />"); } if($_POST['amnt'] > $ir['energy']) { print("<font style=color:red;><b>You do not have enough energy to train that much.</font></b><br />"); } else { $gain=0; for($i=0; $i<$_POST['amnt']; $i++) { $gain+=rand(1,3)/rand(800,1000)*rand(800,1000)*(($ir['will']+20)/150); $ir['will']-=rand(1,3); if($ir['will'] < 0) { $ir['will']=0; } } if($ir['jail']) { $gain/=2; } $db->query("UPDATE `userstats` SET `{$stat}` = `{$stat}` + $gain WHERE `userid` = $userid"); $db->query("UPDATE `users` SET `will` = {$ir['will']}, energy = energy - {$_POST['amnt']} WHERE `userid` = $userid"); $inc=$ir[$stat]+$gain; $inc2=$ir['energy']-$_POST['amnt']; if($stat=="strength") { echo " <font style=color:limegreen;>You place some weights on both sides of the barbell and start to pumping!<br /> You have gained {$gain} strength by doing {$_POST['amnt']} reps.<br /> You now have {$inc} strength and {$inc2} energy left.</font><br /> "; }
  15. I didnt understand what you said can you show me an example basically i would want to see what item is equipped in the slots, for weapon it would be the weapon power + strength giving a total weapon damage... same with the rest armour power + guard
  16. fixed the error was a spelling mistake ['equip_armour']]['itmid'] it was meant to be ['equip_armor']]['itmid'] that how Mccodes spelt armour.
  17. I wanted to display in my inventory the stats or each primary wep, secondary wep and armour so users know what the stats of their items are when equipped I dont know where to start can someone help me? MC V2 btw...
  18. i updated that bit still did not work, im thinking it either the script is unable to pull out the correct item id to display the image
  19. it does exist, for some reason its not displaying..
  20. what does that meanm? you mean .png .jpeg? my image is in the item folder so would it be something like this <img src="items/'.$equip[$ir['equip_armour']]['itmid'].'.png"> ^^ i tried it did not work
  21. Okay for some reason my equipped item does not display, how ever if unequipepd it will display... can some one help me please..   <?php include_once "globals.php"; $q=$db->query("SELECT * FROM items WHERE itmid IN({$ir['equip_primary']}, {$ir['equip_secondary']}, {$ir['equip_armor']})"); echo" <div class='equipped'> "; while($r=$db->fetch_row($q)) { $equip[$r['itmid']]=$r; } echo "<br /><div class='primary'>"; if($equip[$ir['equip_primary']]['itmid']) { print' <img src="'.$equip[$ir['equip_primary']]['itmname'].'"> <br /><a href="unequip.php?type=equip_primary">Unequip Item</a>'; } else { echo "No primary weapon!"; } echo"</div>"; echo "<div class='armour'>"; if($equip[$ir['equip_armor']]['itmid']) { print' <img src="'.$equip[$ir['equip_armour']]['itmid'].'"> <a href="unequip.php?type=equip_armor">Unequip Item</a>'; } else { echo "No Armour!"; } echo"</div>"; echo "<div class='secondary'>"; if($equip[$ir['equip_secondary']]['itmid']) { print' <img src="'.$equip[$ir['equip_secondary']]['itmname'].'"> <br /> <a href="unequip.php?type=equip_secondary">Unequip Item</a>'; } else { echo "No Secondary weapon!"; } echo"</div></div>"; echo " <h3>My Inventory</h3> <a href='merge.php'>>Merge your inventory!</a><br><br />"; $inv=$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_userid={$userid} ORDER BY i.itmtype ASC, i.itmname ASC"); if ($db->num_rows($inv) == 0) { echo "<b>You have no items!</b> "; } else { echo "<b>Your items are listed below.</b><br /> <style type='text/css'> #h { background-color:#333; } #table{ background-color:#444; } </style> <table width=95% class=table border='0' cellspacing='1'> <tr> <td id='table'><font style=color:white;><b>Item</b></font></td> <td id='table'><font style=color:white;><b>Sell Value</b></font></td> <td id='table'><font style=color:white;><b>Total Sell Value</b></font></td> <td id='table'><font style=color:white;><b>Links</b></font></td> </tr>"; $lt=""; while($i=$db->fetch_row($inv)) { $usershop=$db->query("select * from usershops where userid=$userid"); if(mysql_num_rows($usershop)!=0) { $addtoshop="[<a href='addtoshop.php?ID={$i['inv_id']}'>Put in Shop</a>]"; } if($lt!=$i['itmtypename']) { $lt=$i['itmtypename']; echo "\n<tr><td colspan=4 id='h'><font style=color:white;><b>{$lt}</b></font></td></tr>"; } echo '<tr><td><img src="'.$i['itmname'].'">'; if ($i['inv_qty'] > 1) { echo " x{$i['inv_qty']}"; } echo "</td><td> \$ ".number_format($i['itmsellprice'])."</td><td>"; echo "$".number_format($i['itmsellprice']*$i['inv_qty']); echo "</td><td>[<a href='iteminfo.php?ID={$i['itmid']}'>Info</a>] [<a href='itemsend.php?ID={$i['inv_id']}'>Send</a>] [<a href='itemsell.php?ID={$i['inv_id']}'>Sell</a>] [<a href='imadd.php?ID={$i['inv_id']}'>Add To Market</a>]"; if($i['itmtype'] == 9) { print " [<a href='dogattack.php?ID={$i['inv_id']}'>Dog attack</a>]"; } if($i['itmid']=='3') { print " [<a href='russianroulette.php'>Play First Blood</a>]"; } print"$addtoshop"; if($i['effect1_on'] || $i['effect2_on'] || $i['effect3_on']) { echo " [<a href='itemuse.php?ID={$i['inv_id']}'>Use</a>]"; } if($i['weapon']) { echo " [<a href='equip_weapon.php?ID={$i['inv_id']}'>Equip as Weapon</a>]"; } if($i['armor']) { echo " [<a href='equip_armor.php?ID={$i['inv_id']}'>Equip as Armor</a>]"; } echo "</td></tr>"; } echo "</table>"; } $h->endpage(); ?>
  22. I am looking for someone to create me a tutorial feature, when users signup they have to go through this tutorial to enter the game life, much like the torn system where there is a check list and you go through each, after each task is complete you get a little amount of cash. There will be around 6 tasks in the tutorial, 1.Items and what they help you do 2. Housing what it helps you in 3. explaining some features 4.explaining the stat bars and stats 5.Explaining how to play the game and how to earn money and such 6.main goal of the game such as being most respected etc..and how you can get there. I want the tutorial to be like a popout, so when you login in the screen will go a bit dark and the tutorial will pop up in a slow fade motion, also i want a option where you can skip it and be shown later on the next login. Please PM me with the price..
×
×
  • Create New...