Jump to content
MakeWebGames

jaymo

Members
  • Posts

    77
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by jaymo

  1. Is there anywhere I can go for free Game graphics like weapons, armour, sprites etc? Something especially for browser games or something like that? Anyone know any sites?? Thanks
  2. its easier, just one click.
  3. thanks, much better.
  4. I think ive messed my code up now. I changed the levels but Ive done something, when new users register they start at like level 29...Its ssoo confusing. Maybe Ill try again another time. Thanks for your help guys ;)
  5. Basically Ive been at it for days now trying to figure out how to fix the experience, the max level anyone can get upto is around level 70 and the exp is like in the millions. Maybe if anyone is familiar with the script more and they could comment on parts of the functions?? I would like it atleast like max level of 500 or something, maybe I'm asking for too much, but perhaps a little guidence? Thanks so much. Here is the code for the experience. function experience($L) { $a=0; $end=0; for($x=2; $x<$L; $x++) { $a += floor($x+1500*pow(2, ($x/7))); } return floor($a/2); } function Get_The_Level($exp) { $a=0; $end =0; for($x=2; ($end==0 && $x<100); $x++) { $a += floor($x+1500*pow(4, ($x/7))); if ($exp >= floor($a/4)){ } else { return $x; $end=1; } } } function Get_Max_Exp($L){ $end=0; if ($exp == 0){ return 457; $end =1; } for($L=1;($L<100 && $end==0);$L++) { $exp = experience($L); //echo $exp; if ($exp >= $user_class->exp){ return $exp; $end=1; } } }   Just baffles me 0.0
  6. Description: This will add tables around the cities and show each city population in a column. 1. Replace the whole of bus.php with this   <? include 'header.php'; if ($_GET['go'] != "") { $error = ($user_class->jail > 0) ? "You can't get on a bus if you are in jail." : $error; $error = ($user_class->hospital > 0) ? "You can't get on a bus if you are in the hospital." : $error; $error = ($_GET['go'] == $user_class->city) ? "You are already there." : $error; $result = mysql_query("SELECT * FROM `cities` WHERE `id`='".$_GET['go']."'"); $worked = mysql_fetch_array($result); $error = ($worked['name'] == "") ? "That city doesn't exist." : $error; $error = ($user_class->level < $worked['levelreq']) ? "You are not a high enough level to go there." : $error; $error = ($user_class->money < 3000) ? "You can't afford a bus ticket." : $error; if (!isset($error)){ $newmoney = $user_class->money - 3000; $result = mysql_query("UPDATE `grpgusers` SET `city` = '".$_GET['go']."', `money` = '".$newmoney."' WHERE `id` = '".$user_class->id."'"); $user_class = new User($_SESSION[' ']); echo Message("You successfully paid $3,000 and arrived at your destination."); } else { echo Message($error); } } ?> <tr><td class="contenthead">Bus Station</td></tr> <tr><td class="contentcontent">Tired of <?= $user_class->cityname ?>? For $3,000 you can get a bus ticket to anywhere you want to go. <table width="100%" border="0" cellspacing="0" cellpadding="3" cellpadding="3"> <tr> <td><strong>City</strong></td> <td><strong>Level</strong></td> <td><strong>Population</strong></td> <td><strong>Action</strong></td> </tr> <?php $result = mysql_query("SELECT * FROM `cities` ORDER BY `levelreq` ASC"); //get population while($line = mysql_fetch_array($result, MYSQL_ASSOC)) { $pop = mysql_query("SELECT * FROM `grpgusers` WHERE `city`='".$line['id']."'") or trigger_error(mysql_error(),E_USER_ERROR); $totalpop = mysql_num_rows($pop); echo "<tr> <td>".$line['name']."</td> <td>".$line['levelreq']."</td> <td>".$totalpop."</td> <td class=profilebuttons width=90px><a href='bus.php?go=".$line['id']."'>Buy Ticket</a></td> "; } echo '</td></tr>'; include 'footer.php'; ?>
  7. ok, I didn't know how thats why I didn't use them sorry
  8. Description: The ability to ban users from their profile. 1. Create a file names 'banuser.php' 2. Insert into 'banuser.php' <?php include 'header.php'; if ($user_class->admin == 0) { echo Message("Error. You are not an admin."); include 'footer.php'; die(); } if (isset($_GET['id'])) { $_GET['id'] = (int)$_GET['id']; $userid = $_GET['id']; echo Message("You banned a user. It was a success."); $result = mysql_query("INSERT INTO `bans` (`id`) VALUES ('".$userid."')"); $result2 = mysql_query("UPDATE `grpgusers` SET `ban` = '1' WHERE `id`='".$userid."'"); } include 'footer.php'; ?>   3. Next open classes.php and find the last of the admin blocks. (Mine will look different to yours) if ($this->admin == 3) { $this->type = "FM"; $whichfont = "#BA55D3"; }   4. Underneath this replace EVERYTHING with this. if ($this->ban == 1){ $this->formattedname .= "B: <a title='Banned' href='profiles.php?id=".$this->id."'><font color = '".$whichfont."'><s>".$this->username."</s></a></font>"; }elseif ($this->rmdays > 0){ $this->formattedname .= "<b><a title='Respected Mobster [".$this->rmdays." RM Days Left]' href='profiles.php?id=".$this->id."'><font color = '".$whichfont."'>".$this->username."</a></font></b>"; }else { $this->formattedname .= "<a title='Mobster' href='profiles.php?id=".$this->id."'><font color = '".$whichfont."'>".$this->username."</a></font>"; } } if (time() - $this->lastactive < 300) { $this->formattedonline= "<font style='color:green;padding:2px;font-weight:bold;'>[online]</font>"; } } } /* $result2 = mysql_query("SELECT * FROM `gangs` WHERE `id`='$gang'"); $worked2 = mysql_fetch_array($result2); $gangname = $worked2['name']; $gangleader = $worked2['leader']; */ ?>   5. stay in classes.php and insert. $this->ban = $worked['ban']; in the user class.   6. Create a new field in grpgusers called ban and set it as an interger.   7. Next and open profiles.php and find, <? if ($user_class->id != $profile_class->id){ ?> under that block you will see another php tag section which looks like this, <? }?> 6. Underneath that closing curly brace insert the following. <? if ($user_class->admin > 0 && $user_class->id != $profile_class->id){ ?> <tr><td class="contenthead">Staff Actions</td></tr> <tr><td class="contentcontent"> <table width='100%' cellpadding="4" cellspacing="0"> <t> <td width='25%' align='center' class="profilebuttons"><a href='banuser.php?id=<? echo $profile_class->id ?>'>Ban User</a></td> <td width='25%' align='center' class="profilebuttons"><a href='sendwarning.php?id=<? echo $profile_class->id ?>'>Send Warning</a></td> </tr> </table><? }?> 7. That should be all, if any problems let me know thanks. I'm not the best at PHP and this took me a while to figure out. Sorry if its a bit messy.
  9. Description: This is a mod that allows your users to purchase point packs rather than going into the points market. 1. Make a file called 'pointdealer.php' 2. Add into 'pointdealer.php' <?php include 'header.php'; if(isset($_GET['buy'])){ if($_GET['buy'] > 3){ echo Message("That point pack doesn't exist."); include 'footer.php'; die(); } if($_GET['buy'] == '1'){ //take costs $cost = 1000000; if($user_class->money < $cost){ echo Message("Not enough money"); include 'footer.php'; die(); }else{ $newmoney = $user_class->money - $cost; $take = "UPDATE grpgusers SET money='".$newmoney."' WHERE id='".$user_class->id."'"; mysql_query($take); //give pts $newpoints = $user_class->points + 100; $give = "UPDATE grpgusers SET points='".$newpoints."' WHERE id='".$user_class->id."'"; mysql_query($give); echo Message("You bought the 100 points pack. <a href=pointdealer.php>back</a>"); } } if($_GET['buy'] == '2'){ //take costs $cost = 7200000; if($user_class->money < $cost){ echo Message("Not enough money"); include 'footer.php'; die(); }else{ $newmoney = $user_class->money - $cost; $take = "UPDATE grpgusers SET money='".$newmoney."' WHERE id='".$user_class->id."'"; mysql_query($take); //give pts $newpoints = $user_class->points + 750; $give = "UPDATE grpgusers SET points='".$newpoints."' WHERE id='".$user_class->id."'"; mysql_query($give); echo Message("You bought the 750 points pack. <a href=pointdealer.php>back</a>"); } } if($_GET['buy'] == '3'){ //take costs $cost = 9500000; if($user_class->money < $cost){ echo Message("Not enough money"); include 'footer.php'; die(); }else{ $newmoney = $user_class->money - $cost; $take = "UPDATE grpgusers SET money='".$newmoney."' WHERE id='".$user_class->id."'"; mysql_query($take); //give pts $newpoints = $user_class->points + 1000; $give = "UPDATE grpgusers SET points='".$newpoints."' WHERE id='".$user_class->id."'"; mysql_query($give); echo Message("You bought the 1000 points pack. <a href=pointdealer.php>back</a>"); } } } ?> <tr><td class="contenthead">Point Dealer</td></tr> <tr><td class="contentcontent">Here you can purchase point packs if you are low on points.<br /><br><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><strong>Points</strong></td> <td><strong>Price</strong></td> <td><strong>Action</strong></td> </tr> <tr> <td>100</td> <td>$1,000,000</td> <td><a href="pointdealer.php?buy=1">Buy</a></td> </tr> <tr> <td>750</td> <td>$7,200,000</td> <td><a href="pointdealer.php?buy=2">Buy</a></td> </tr> <tr> <td>1,000</td> <td>$9,500,000</td> <td><a href="pointdealer.php?buy=3">Buy</a></td> </tr> </table> </td></tr> <?php include 'footer.php'; ?>   3. Don't forget to add a link to your file via the city. Thats it. Hope you enjoyed my first mod.
  10. oh and thanks very much acer240. Really appreciate this mod.
  11. I know m8, I'm sorry. I'm currently making my own mods for this engine and when I do I'm post them and help out a bit more. ;)
  12. anyone tried this? thanks
  13. thanks, :)
  14. I can't get GRPG to work on my wamp server, It shows the code and doesn't work at all, ive tried looking at the code and nothing seems to stop it from working. I just wanted to make some mods on my localhost and it doesn't work. Thanks
  15. If anyone could make a possibly free script where you can apply for a gang rather than being invited? Thanks.
  16. can't get this to work...for some reason when up or down is clicked it just comes up with a white page.
  17. is this free m8?
  18. oh yeah, thanks :)
  19. Well I'm not very good at php and am learning at the moment, but what I wanted to know is how to display if someone is in hospital on their profile or in jail. So if they aren't in hospital it will say "Not in Hospital" etc and when they are it will say "12 Minutes Left" or whatever. Thanks whoever can help
  20. I can't get this to work, I need a bit more guidance on where to put these codes.
  21. Anyone know of a download or someone who could make a simple rate up or down script?
  22. is this for macs only? I can't find any rar or zip files.
  23. I was wondering if anyone could make a simple news post page where admins can post some news and the latest posts will all show on 1 page and people who haven't viewed the news can get a little reminder on their home page or something? What do you think?
  24. I used to use the grpg but found many bugs and glitches. I'm going to create a new game with it but before I start there has been 1 thing bugging me for a while. The money shows up as say $5000 and I want it to say $5,000. Is there a simple way to change it? If anyone could help, I also think you may be able to edit it in classes.php   <?php function Get_ID($username){ $result = mysql_query("SELECT * FROM `grpgusers` WHERE `username` = '".$username."'"); $worked = mysql_fetch_array($result); return $worked['id']; } function mrefresh($url, $time="1"){ echo '<meta http-equiv="refresh" content="'.$time.';url='.$url.'">'; } function car_popup($text, $id) { return "[url='#']".$text."[/url]"; } function item_popup($text, $id) { return "[url='#']".$text."[/url]"; } function prettynum($num,$dollar="0") { // Basic send a number or string to this and it will add commas. If you want a dollar sign added to the // front and it is a number add a 1 for the 2nd variable. // Example prettynum(123452838,1) will return $123,452,838 take out the ,1 and it looses the dollar sign. $out=strrev( (string)preg_replace( '/(\d{3})(?=\d)(?!\d*\.)/', '$1,' , strrev( $num ) ) ); if ($dollar && is_numeric($num)){ $out= "$".$out; } return $out; } function Check_Item($itemid, $userid){ $result = mysql_query("SELECT * FROM `inventory` WHERE `userid`='$userid' AND `itemid`='$itemid'"); $worked = mysql_fetch_array($result); if($worked['quantity'] > 0){ return $worked['quantity']; } else { return 0; } } function Check_Land($city, $userid){ $result = mysql_query("SELECT * FROM `land` WHERE `userid`='".$userid."' AND `city`='".$city."'"); $worked = mysql_fetch_array($result); if($worked['quantity'] > 0){ return $worked['quantity']; } else { return 0; } } //userid companyid howmany function Give_Share($stock, $userid, $quantity="1"){ $result = mysql_query("SELECT * FROM `shares` WHERE `userid`='".$userid."' AND `companyid`='".$stock."'"); $worked = mysql_fetch_array($result); $itemexist = mysql_num_rows($result); if($itemexist == 0){ $result= mysql_query("INSERT INTO `shares` (`companyid`, `userid`, `amount`)"."VALUES ('$stock', '$userid', '$quantity')"); } else { $quantity = $quantity + $worked['amount']; $result = mysql_query("UPDATE `shares` SET `amount` = '".$quantity."' WHERE `userid`='$userid' AND `companyid`='$stock'"); } } function Take_Share($stock, $userid, $quantity="1"){ $result = mysql_query("SELECT * FROM `shares` WHERE `userid`='".$userid."' AND `companyid`='".$stock."'"); $worked = mysql_fetch_array($result); $itemexist = mysql_num_rows($result); if($itemexist != 0){ $quantity = $worked['amount'] - $quantity; if($quantity > 0){ $result = mysql_query("UPDATE `shares` SET `amount` = '".$quantity."' WHERE `userid`='$userid' AND `companyid`='$stock'"); } else { $result = mysql_query("DELETE FROM `shares` WHERE `userid`='$userid' AND `companyid`='$stock'"); } } } function Check_Share($stock, $userid){ $result = mysql_query("SELECT * FROM `shares` WHERE `userid`='".$userid."' AND `companyid`='".$stock."'"); $worked = mysql_fetch_array($result); if($worked['amount'] > 0){ return $worked['amount']; } else { return 0; } } function Give_Land($city, $userid, $quantity="1"){ $result = mysql_query("SELECT * FROM `land` WHERE `userid`='".$userid."' AND `city`='".$city."'"); $worked = mysql_fetch_array($result); $itemexist = mysql_num_rows($result); if($itemexist == 0){ $result= mysql_query("INSERT INTO `land` (`city`, `userid`, `amount`)"."VALUES ('$city', '$userid', '$quantity')"); } else { $quantity = $quantity + $worked['amount']; $result = mysql_query("UPDATE `land` SET `amount` = '".$quantity."' WHERE `userid`='$userid' AND `city`='$city'"); } } function Take_Land($city, $userid, $quantity="1"){ $result = mysql_query("SELECT * FROM `land` WHERE `userid`='".$userid."' AND `city`='".$city."'"); $worked = mysql_fetch_array($result); $itemexist = mysql_num_rows($result); if($itemexist != 0){ $quantity = $worked['amount'] - $quantity; if($quantity > 0){ $$result = mysql_query("UPDATE `land` SET `amount` = '".$quantity."' WHERE `userid`='$userid' AND `city`='$city'"); } else { $result = mysql_query("DELETE FROM `land` WHERE `userid`='$userid' AND `city`='$city'"); } } } function Give_Item($itemid, $userid, $quantity="1"){ $result = mysql_query("SELECT * FROM `inventory` WHERE `userid`='$userid' AND `itemid`='$itemid'"); $worked = mysql_fetch_array($result); $itemexist = mysql_num_rows($result); if($itemexist == 0){ $result= mysql_query("INSERT INTO `inventory` (`itemid`, `userid`, `quantity`)"."VALUES ('$itemid', '$userid', '$quantity')"); } else { $quantity = $quantity + $worked['quantity']; $result = mysql_query("UPDATE `inventory` SET `quantity` = '".$quantity."' WHERE `userid`='$userid' AND `itemid`='$itemid'"); } } function Take_Item($itemid, $userid, $quantity="1"){ $result = mysql_query("SELECT * FROM `inventory` WHERE `userid`='$userid' AND `itemid`='$itemid'"); $worked = mysql_fetch_array($result); $itemexist = mysql_num_rows($result); if($itemexist != 0){ $quantity = $worked['quantity'] - $quantity; if($quantity > 0){ $result = mysql_query("UPDATE `inventory` SET `quantity` = '".$quantity."' WHERE `userid`='$userid' AND `itemid`='$itemid'"); } else { $result = mysql_query("DELETE FROM `inventory` WHERE `userid`='$userid' AND `itemid`='$itemid'"); } } } function Message($text){ return '<tr><td class="contenthead">.: Important Message</td></tr> <tr><td class="contentcontent">'.$text.'</td></tr>'; } function Send_Event ($id, $text){ $timesent = time(); $result= mysql_query("INSERT INTO `events` (`to`, `timesent`, `text`)". "VALUES ('$id', '$timesent', '$text')"); } function Is_User_Banned ($id) { $result = mysql_query("SELECT * FROM `bans` WHERE `id`='$id'"); return mysql_num_rows($result); } function Why_Is_User_Banned ($id) { $result = mysql_query("SELECT * FROM `bans` WHERE `id`='$id'"); $worked = mysql_fetch_array($result); return $worked['reason']; } function Radio_Status () { $result = mysql_query("SELECT * FROM `serverconfig`"); $worked = mysql_fetch_array($result); return $worked['radio']; } function howlongago($ts) { $ts=time()-$ts; if ($ts<1) // <1 second return " NOW"; elseif ($ts==1) // <1 second return $ts." second"; elseif ($ts<60) // <1 minute return $ts." seconds"; elseif ($ts<120) // 1 minute return "1 minute"; elseif ($ts<60*60) // <1 hour return floor($ts/60)." minutes"; elseif ($ts<60*60*2) // <2 hour return "1 hour"; elseif ($ts<60*60*24) // <24 hours = 1 day return floor($ts/(60*60))." hours"; elseif ($ts<60*60*24*2) // <2 days return "1 day"; elseif ($ts<(60*60*24*7)) // <7 days = 1 week return floor($ts/(60*60*24))." days"; elseif ($ts<60*60*24*30.5) // <30.5 days ~ 1 month return floor($ts/(60*60*24*7))." weeks"; elseif ($ts<60*60*24*365) // <365 days = 1 year return floor($ts/(60*60*24*30.5))." months"; else // more than 1 year return floor($ts/(60*60*24*365))." years"; }; function howlongtil($ts) { $ts=$ts - time(); if ($ts<1) // <1 second return " NOW"; elseif ($ts==1) // <1 second return $ts." second"; elseif ($ts<60) // <1 minute return $ts." seconds"; elseif ($ts<120) // 1 minute return "1 minute"; elseif ($ts<60*60) // <1 hour return floor($ts/60)." minutes"; elseif ($ts<60*60*2) // <2 hour return "1 hour"; elseif ($ts<60*60*24) // <24 hours = 1 day return floor($ts/(60*60))." hours"; elseif ($ts<60*60*24*2) // <2 days return "1 day"; elseif ($ts<(60*60*24*7)) // <7 days = 1 week return floor($ts/(60*60*24))." days"; elseif ($ts<60*60*24*30.5) // <30.5 days ~ 1 month return floor($ts/(60*60*24*7))." weeks"; elseif ($ts<60*60*24*365) // <365 days = 1 year return floor($ts/(60*60*24*30.5))." months"; else // more than 1 year return floor($ts/(60*60*24*365))." years"; }; //level 2 - 500 //level 3 - 1500 //level 4 - 3500 //level 5 - 6000 function experience($L) { $a=0; $end=0; for($x=1; $x<$L; $x++) { $a += floor($x+1500*pow(4, ($x/7))); } return floor($a/4); } function Get_The_Level($exp) { $a=0; $end =0; for($x=1; ($end==0 && $x<100); $x++) { $a += floor($x+1500*pow(4, ($x/7))); if ($exp >= floor($a/4)){ } else { return $x; $end=1; } } } function Get_Max_Exp($L){ $end=0; if ($exp == 0){ return 457; $end =1; } for($L=1;($L<100 && $end==0);$L++) { $exp = experience($L); //echo $exp; if ($exp >= $user_class->exp){ return $exp; $end=1; } } } class User_Stats { function User_Stats($wutever){ $result = mysql_query("SELECT * FROM `grpgusers` ORDER BY `username` ASC"); $result3 = mysql_query("SELECT * FROM `grpgusers` ORDER BY `username` ASC"); while($line = mysql_fetch_array($result, MYSQL_ASSOC)) { $secondsago = time()-$line['lastactive']; if ($secondsago<=300) { $this->playersloggedin++; } } while($line3 = mysql_fetch_array($result3, MYSQL_ASSOC)) { $secondsago = time()-$line3['lastactive']; if ($secondsago<=86400) { $this->playersonlineinlastday++; } } $result2 = mysql_query("SELECT * FROM `grpgusers`"); $this->playerstotal = mysql_num_rows($result2); } } class Gang{ function Gang($id) { $result = mysql_query("SELECT * FROM `gangs` WHERE `id`='$id'"); $worked = mysql_fetch_array($result); $gangcheck = mysql_query("SELECT * FROM `grpgusers` WHERE `gang`='".$id."'"); $this->id = $worked['id']; $this->members = mysql_num_rows($gangcheck); $this->name = $worked['name']; $this->formattedname = "[url='viewgang.php?id=".$worked[']".$worked['name']."[/url]"; $this->description = $worked['description']; $this->leader = $worked['leader']; $this->tag = $worked['tag']; $this->exp = $worked['exp']; $this->level = Get_The_Level($this->exp); $this->vault = $worked['vault']; $gangcheck = mysql_query("SELECT * FROM `grpgusers` WHERE `gang`='".$line['id']."'"); $members = mysql_num_rows($gangcheck); } } class User { function User($id) { $result = mysql_query("SELECT * FROM `grpgusers` WHERE `id`='$id'"); $worked = mysql_fetch_array($result); $result2 = mysql_query("SELECT * FROM `gangs` WHERE `id`='".$worked['gang']."'"); $worked2 = mysql_fetch_array($result2); $result3 = mysql_query("SELECT * FROM `cities` WHERE `id`='".$worked['city']."'"); $worked3 = mysql_fetch_array($result3); $result4 = mysql_query("SELECT * FROM `houses` WHERE `id`='".$worked['house']."'"); $worked4 = mysql_fetch_array($result4); $result5 = mysql_query("SELECT * FROM `inventory` WHERE `userid` = '".$id."' ORDER BY `userid` DESC"); $checkcocaine = mysql_query("SELECT * FROM `effects` WHERE `userid`='".$id."' AND `effect`='Cocaine'"); $cocaine = mysql_num_rows($checkcocaine); $speedbonus = ($cocaine > 0) ? (floor($worked['speed'] * .30)) : 0; $this->weaponoffense = 0; $this->weaponname = "fists"; $this->armordefense = 0; if($worked["eqweapon"] != 0){ $result6 = mysql_query("SELECT * FROM `items` WHERE `id`='".$worked['eqweapon']."' LIMIT 1"); $worked6 = mysql_fetch_array($result6); $this->eqweapon = $worked6['id']; $this->weaponoffense = $worked6['offense']; $this->weaponname = $worked6['itemname']; $this->weaponimg = $worked6['image']; } if($worked["eqarmor"] != 0){ $result6 = mysql_query("SELECT * FROM `items` WHERE `id`='".$worked['eqarmor']."' LIMIT 1"); $worked6 = mysql_fetch_array($result6); $this->eqarmor = $worked6['id']; $this->armordefense = $worked6['defense']; $this->armorname = $worked6['itemname']; $this->armorimg = $worked6['image']; } $this->moddedstrength = $worked['strength'] * ($this->weaponoffense * .01 + 1); $this->moddeddefense = $worked['defense'] * ($this->armordefense * .01 + 1); $this->id = $worked['id']; $this->ip = $worked['ip']; $this->style = ($worked['style'] > 0) ? $worked['style'] : "1"; $this->speedbonus = $speedbonus; $this->username = $worked['username']; $this->marijuana = $worked['marijuana']; $this->potseeds = $worked['potseeds']; $this->cocaine = $worked['cocaine']; $this->nodoze = $worked['nodoze']; $this->genericsteroids = $worked['genericsteroids']; $this->hookers = $worked['hookers']; $this->exp = $worked['exp']; $this->level = Get_The_Level($this->exp); $this->maxexp = experience($this->level +1); $this->exppercent = ($this->exp == 0) ? 0 : floor(($this->exp / $this->maxexp) * 100); $this->formattedexp = $this->exp." / ".$this->maxexp." [".$this->exppercent."%]"; $this->money = $worked['money']; $this->bank = $worked['bank']; $this->whichbank = $worked['whichbank']; $this->hp = $worked['hp']; $this->maxhp = $this->level * 50; $this->hppercent = floor(($this->hp / $this->maxhp) * 100); $this->formattedhp = $this->hp." / ".$this->maxhp." [".$this->hppercent."%]"; $this->energy = $worked['energy']; $this->maxenergy = 9 + $this->level; $this->energypercent = floor(($this->energy / $this->maxenergy) * 100); $this->formattedenergy = $this->energy." / ".$this->maxenergy." [".$this->energypercent."%]"; $this->nerve = $worked['nerve']; $this->maxnerve = 4 + $this->level; $this->nervepercent = floor(($this->nerve / $this->maxnerve) * 100); $this->formattednerve = $this->nerve." / ".$this->maxnerve." [".$this->nervepercent."%]"; $this->workexp = $worked['workexp']; $this->strength = $worked['strength']; $this->defense = $worked['defense']; $this->speed = $worked['speed'] + $speedbonus; $this->totalattrib = $this->speed + $this->strength + $this->defense; $this->battlewon = $worked['battlewon']; $this->battlelost = $worked['battlelost']; $this->battletotal = $this->battlewon + $this->battlelost; $this->battlemoney = $worked['battlemoney']; $this->crimesucceeded = $worked['crimesucceeded']; $this->crimefailed = $worked['crimefailed']; $this->crimetotal = $this->crimesucceeded + $this->crimefailed; $this->crimemoney = $worked['crimemoney']; $this->lastactive = $worked['lastactive']; $this->age = howlongago($worked['signuptime']); $this->formattedlastactive = howlongago($this->lastactive) . " ago"; $this->points = $worked['points']; $this->rmdays = $worked['rmdays']; $this->signuptime = $worked['signuptime']; $this->lastactive = $worked['lastactive']; $this->house = $worked['house']; $this->housename = ($worked4['name'] == "") ? "Homeless" : $worked4['name']; $this->houseawake = ($worked4['name']== "") ? 100 : $worked4['awake']; $this->awake = $worked['awake']; $this->maxawake = $this->houseawake; $this->awakepercent = floor(($this->awake / $this->maxawake) * 100); $this->formattedawake = $this->awake." / ".$this->maxawake." [".$this->awakepercent."%]"; $this->email = $worked['email']; $this->house = $worked['house']; $this->admin = $worked['admin']; $this->quote = $worked['quote']; $this->avatar = $worked['avatar']; $this->gang = $worked['gang']; $this->gangname = $worked2['name']; $this->gangleader = $worked2['leader']; $this->gangtag = $worked2['tag']; $this->gangdescription = $worked2['description']; $this->formattedgang = "[url='viewgang.php?id=".$this->gang."']".$this->gangname."[/url]"; $this->city = $worked['city']; $this->cityname = $worked3['name']; $this->jail = $worked['jail']; $this->job = $worked['job']; $this->hospital = $worked['hospital']; $this->searchdowntown = $worked['searchdowntown']; if ($this->gang != 0){ $this->formattedname .= "[url='viewgang.php?id=".$this->gang."']formattedname .= ($this->gangleader == $this->username) ? " title='Gang Leader'>[[b]".$this->gangtag."[/b]][/url]" : ">[".$this->gangtag."]</a>"; } if ($this->rmdays != 0){ $this->type = "Respected Mobster"; $whichfont = "green"; } else { $this->type = "Regular Mobster"; } if ($this->admin == 1) { $this->type = "Admin"; $whichfont = "blue"; } if ($this->admin == 2) { $this->type = "Staff"; } if ($this->admin == 3) { $this->type = "Pre ent"; $whichfont = "red"; } if ($this->admin == 4) { $this->type = "Congress"; $whichfont = "red"; } if ($this->rmdays > 0){ $this->formattedname .= "[b]<a title='Respected Mobster [".$this->rmdays." RM Days Left]' href='profiles.php?id=".$this->id."'><font color = '".$whichfont."'>".$this->username."</a></font>[/b]"; } elseif ($this->admin != 0) { $this->formattedname .= "[b][url='profiles.php?id=".$this->id."']<font color = '".$whichfont."'>".$this->username."[/url]</font>[/b]"; } else { $this->formattedname .= "[url='profiles.php?id=".$this->id."']<font color = '".$whichfont."'>".$this->username."[/url]</font>"; } if (time() - $this->lastactive < 300) { $this->formattedonline= "<font style='color:green;padding:2px;font-weight:bold;'>[online]</font>"; } else { $this->formattedonline= "<font style='color:red;padding:2px;font-weight:bold;'>[offline]</font>"; } } } /* $result2 = mysql_query("SELECT * FROM `gangs` WHERE `id`='$gang'"); $worked2 = mysql_fetch_array($result2); $gangname = $worked2['name']; $gangleader = $worked2['leader']; */ ?>
×
×
  • Create New...