Jump to content
MakeWebGames

SMOKEY_TEK

Members
  • Posts

    126
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by SMOKEY_TEK

  1. No Problem, Glad that was the only problem :)
  2. I would look for a chat that the user doesn't need to register for the chat, just pull their username off from the database 8)
  3. SMOKEY_TEK

    ranked

    This works for me..   <?php include (DIRNAME(__FILE__) . '/header.php'); ?> <tr><td class='contenthead'>Hall Of Fame</td></tr> <tr><td class='contentcontent'> <div style='text-align:center;'> [url='halloffame.php?view=exp']Level[/url] | [url='halloffame.php?view=strength']Strength[/url] | [url='halloffame.php?view=defense']Defense[/url] | [url='halloffame.php?view=speed']Speed[/url] </div> <tr><td class='contentcontent'> <table width='100%'> <tr> <td align='center'>Rank</td> <td align='center'>Mobster</td> <td align='center'>Level</td> <td align='center'>Money</td> <td align='center'>Gang</td> <td align='center'>Online</td> </tr> <?php $view = ($_GET['view'] != "") ? $_GET['view'] : 'exp'; $view = ($_GET['view'] != "") ? $_GET['view'] : 'strength'; $view = ($_GET['view'] != "") ? $_GET['view'] : 'defense'; $view = ($_GET['view'] != "") ? $_GET['view'] : 'speed'; $result = mysql_query("SELECT * FROM `grpgusers` ORDER BY `".$view."` DESC LIMIT 50"); $rank = 0; while($line = mysql_fetch_array($result, MYSQL_ASSOC)) { $rank++; $user_hall = new User($line['id']); echo " <tr> <td>".$rank."</td> <td>".$user_hall->formattedname."</td> <td>".$user_hall->level."</td> <td>$ ".$user_hall->money."</td> <td>".$user_hall->formattedgang."</td> <td>".$user_hall->formattedonline."</td> </tr> </td></tr>"; } include (DIRNAME(__FILE__) . '/footer.php'); ?>
  4. <tr> <td width='15%'>Send To:</td> <td width='85%'><input type='text' name='to' value='<?php echo $_GET['to'] ?>' size='20' maxlength='75'> [username] </tr>   Should be:   <tr> <td width='15%'><h4>Send To</h4></td> <td width='85%'><input type='text' name='to' size='20' maxlength='75' value='<?php echo $_GET['to'] . $from_user_class->id; ?>'></td> </tr>   I'm not sure on your file you use the username as the Send To or the user's id # so you will have to change "$from_user_class->id;" to "$from_user_class->username;" I use the user's id # on my file. Let me know if this fixes your problem, cause it works for me and our files are almost the same.
  5. I'm not positive this is any good, if you want to make it any better please do so. Make a file called "rating.php" and insert the following into it: <?php include (DIRNAME(__FILE__) . '/header.php'); switch(isset($_GET['action'])) { case 'uprating' : up_rating(); break; case 'downrating' : down_rating(); break; } function up_rating() { if (isset($_GET['id'] != "")){ $rating_class = new User(isset($_GET['id'])); if($rating_class->id == $user_class->id) { echo Message("You can't rate yourself."); } else { $result = mysql_query("SELECT * FROM `users` WHERE `id` = '".$rating_class->id."'"); while ($row = mysql_fetch_array($result)) { $ratings = $row['ratings']; } $result = mysql_query("UPDATE `users` SET `ratings` = '".$ratings."'+1 WHERE `id` = '".$rating_class->id."'"); echo Message("You gave a +1 rating to this player."); } } } function down_rating() { if (isset($_GET['id'] != "")){ $rating_class = new User(isset($_GET['id'])); if($rating_class->id == $user_class->id) { echo Message("You can't rate yourself."); } else { $result = mysql_query("SELECT * FROM `users` WHERE `id` = '".$rating_class->id."'"); while ($row = mysql_fetch_array($result)) { $ratings = $row['ratings']; } $result = mysql_query("UPDATE `users` SET `ratings` = '".$ratings."'-1 WHERE `id` = '".$rating_class->id."'"); echo Message("You gave a -1 rating to this player."); } } } ?> Add the following to your "profiles.php" file: [url='rating.php?id=<? echo $profile_class->id ?>&action=uprating'][img=/images/up-icon.png][/url] <?php echo $profile_class->ratings; ?> [url='rating.php?id=<? echo $profile_class->id ?>&action=downrating'][img=/images/down-icon.png][/url] Add the following to your "classes.php" file: $this->ratings = $worked['ratings']; Sql : [mysql]ALTER TABLE `grpgusers` ADD `ratings` INT( 11 ) NOT NULL DEFAULT '0';[/mysql] Save the two images to your "images" folder if you have one, if not change the image source.
  6. Hmm.. I thought you already had smilies on your little chat thing?
  7. I mean, like after they pay for like a Respected Mobster it will automatically make them that after the payment is accepted..
  8. Could anyone make like a donate page, like when a player purchases something it automatically puts it on their account? Not really sure on how to code this.. Best Regards, SMOKEY_TEK
  9. I'm assuming this is where to edit to make it days instead of week(s), month(s), year(s) 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"; };
  10. Are right! Thanks mate
  11. Does anyone know how to make Age: into days instead of like saying week... For example: 14 days old it wouldn't say 2 weeks, it would say 14 Days ? The bit of code is in classes.php, but I'm not sure how to modify it to change it.. Please help me (: Thank You.
  12. When do you think it will be ready?
  13. Anybody know how we would decrypt the sha1 hash if a user forgets their password and they use "forgot.php" ?
  14. I was wondering if anybody who has messed around with the "GRPG" script, if so would you know how to md5 the passwords when a someone registers an account. I tried doing this: $password = md5($_POST["newpass"]); $password2 = md5($_POST["newpassagain"]);   It does work, but when I log in, the font size is HUGE, and I have to click "Home" again for the font size to go back to normal size... Any solutions on how I could fix this problem???? Please help me or if you have any other ways to md5 passwords... Thank you, SMOKEY_TEK
  15. Nevermind, I figured it out.. lol And I apologize for double posting
  16. I know I am asking for a lot of help, but I am just stuck on a situation.. Ok I have coded in a mailban, shoutban, and banned from game. But I want it to automatically remove that ban when their days are up.. The way I coded it into my game was like this ... In classes.php I added $this->reason = $worked['reason']; $this->days = $worked['days']; $this->mailban = $worked['mailban']; $this->banned = $worked['banned']; $this->shoutban = $worked['shoutban'];   SQL [mysql] ALTER TABLE `grpgusers` ADD `reason` text NOT NULL, `days` int(20) NOT NULL default="0", `mailban` int(5) NOT NULL default="0", `shoutban` int(5) NOT NULL default="0", `banned` int(5) NOT NULL default="0", [/mysql] And I added in pms.php if($user_class->mailban == 1) { echo ' <tr><td class="contenthead">Mailbox</td></tr> <tr><td class="contentcontent"> <b style="font-size:18px"><center>You have been mail banned for <span style="color:#FF0000;">'; ?> <? echo $user_class->days; ?> </span> days.[/b] [b]Reason:[/b] <? echo $user_class->reason; ?></center> <? die(); }   In shoutbox.php I did the same thing as in pms.php I have coded in rollover.php to remove 1 day at day update, but I am stuck at when the player is done with their ban it will remove the ban automatically ... Any solutions on how I could do this, or if you have a better way to do all of this... ? Please help if you could....
  17. Thanks Jordan and Acer for helping me get this to work.. Cheers!
  18. About this part in dailyreward.php echo ' <tr><td class="contenthead">Daily Reward</td></tr> <tr><td class="contentcontent"> <center>Thanks for playing today. Here take 25 points and $2,500 bucks!</center>'; die (); } else { echo ' <tr><td class="contenthead">Daily Reward</td></tr> <tr><td class="contentcontent"> <center>You have already recieved your daily grease, come back tomorrow.</center>';   I have my script to where it doesn't use echo Message(" Message Here "); so I just coded it to make it say inside the table (Don't know if I'm making sense) so if your game uses the echo Message (" "); part just change the first code I mentioned to this echo Message(" <center>Thanks for playing today. Here take 25 points and $2,500 bucks!</center>"); die (); } else { echo Message(" <center>You have already recieved your daily grease, come back tomorrow.</center>");
  19. Try this... Create dailyreward.php <?php include_once(DIRNAME(__FILE__) . '/header.php'); if (isset($_GET['claim'])){ if($user_class->dailyreward == 1) { $newpointstwo = $user_class->dailyreward - 1; $resulttwo = mysql_query("UPDATE `grpgusers` SET `dailyreward`='".$newpointstwo."' WHERE `id`='".$_SESSION['id']."'"); $newpoints = $user_class->points + 25; $result = mysql_query("UPDATE `grpgusers` SET `points`='".$newpoints."' WHERE `id`='".$_SESSION['id']."'"); $newpointsthree = $user_class->money + 2500; $resultthree = mysql_query("UPDATE `grpgusers` SET `money`='".$newpointsthree."' WHERE `id`='".$_SESSION['id']."'"); echo ' <tr><td class="contenthead">Daily Reward</td></tr> <tr><td class="contentcontent"> <center>Thanks for playing today. Here take 25 points and $2,500 bucks!</center>'; die (); } else { echo ' <tr><td class="contenthead">Daily Reward</td></tr> <tr><td class="contentcontent"> <center>You have already recieved your daily grease, come back tomorrow.</center>'; die (); } } ?> <tr><td class="contenthead">Daily Reward</td></tr> <tr><td class="contentcontent"> <table width="100%"> <tr> <td>Click [url='dailyreward.php?claim']here[/url] to claim your daily reward.</td> </tr> </table>   Find this in rollover.php $result2 = mysql_query("UPDATE `grpgusers` SET `money` = '".$newmoney."', `rmdays` = '".$newrmdays."', `bank` = '".$newbank."', `searchdowntown` = '50' WHERE `username` = '".$username."'"); and add , `dailyreward`= '1' after `searchdown`= '50' Save rollover.php Open up classes.php and find $this->searchdowntown = $worked['searchdowntown']; and add $this->dailyreward = $worked['dailyreward']; below it, so it should look like this $this->searchdowntown = $worked['searchdowntown']; $this->dailyreward = $worked['dailyreward'];   Save classes.php SQL [mysql]ALTER TABLE `grpgusers` ADD `dailyreward` int(5) NOT NULL default="1",[/mysql] And add [url='dailyreward.php']Daily Reward[/url] where ever you would want the link to be...
  20. I would love to see a forum built in as well, if anyone can do that that would be awesome... Thanks!
  21. This is what I did in my Cron Jobs via Cpanel... And do what?
  22. I don't think it runs at all... I test it out one day by doing "Search Downtown" and the next day I checked to see if I'm able to do "Search Downtown" but it says I already have done it...
  23. Hello Make Web Games Community, I am in need of a little help with a few things, hopefully someone can or will help me... Okay, I am wondering how do I get my rollover.php to actually work, I put in my Cron Job and it doesn't update, my Cpanel is with JUSTHOST.COM .. If you know how I can get it to work please let me know.. And how do I make the "Money" and "Points" to show like "$15,000"/"15,000 Points" instead of "$15000"/"15000 Points" ? Any help is appreciated, Thank You! Sincerely, SMOKEY_TEK
  24. I downloaded this bbcode parser - http://sourceforge.net/projects/nbbc/files/nbbc/1.4.3/nbbc-1.4.3.tar.gz/download It's called "NBBC: The New BBCode Parser". Here is the webpage on what it's about - http://nbbc.sourceforge.net/   Good Luck! 8)
  25. I put {$set['game_currency']} {$set['game_energy']} etc on where they should go. and I get nothing of the new names... Any solutions?
×
×
  • Create New...