
Haunted Dawg
Members-
Posts
2,933 -
Joined
-
Last visited
Never -
Days Won
1
Content Type
Profiles
Forums
Events
Everything posted by Haunted Dawg
-
Re: 3 Word Game to have another
-
Re: Free 2 - Icons Why not just make it a global func and allow them to put where ever they want? like function show_emos($global) { global $global; echo 'blah blah'; } Then to display: echo show_emos($ir); Would be much easier.
-
Re: Free 2 - Icons Add this code in global_func.php function display_icons( $u, $i = array() ) { if ($n = $u['new_announcements']) { $t = sprintf("%u New Announcement%s", $n, $n == 1 ? "" : "s"); $i[] = sprintf("[img=icons/announcements.png]", $t, $t); } if ($y = $u['new_mail']) { $t = sprintf("%u New Mail%s", $y, $y == 1 ? "" : "s"); $i[] = sprintf("[img=icons/mail.png]", $t, $t); } if ($n = $u['new_events']) { $t = sprintf("%u New Event%s", $n, $n == 1 ? "" : "s"); $i[] = sprintf("[img=icons/events.png]", $t, $t); } if ($a = max($u['bankmoney'], 0) + max($u['cybermoney'], 0)) { $fa = "$" . number_format($a) . " Banked"; $i[] = sprintf("[img=icons/bank.png]", $fa, $fa); } if ($z = $u['jobrank']) { $rs = mysql_query(sprintf("SELECT CONCAT(\"Working as \", `jrNAME`, \" in \", `jDESC`) FROM `jobranks` LEFT JOIN `jobs` ON `jrJOB` = `jID` WHERE (`jrID` = %u)", $z)); $row = mysql_fetch_array($rs); mysql_free_result($rs); $i[] = sprintf("[img=icons/working.png]", $row[0], $row[0]); } if (($p = $u['course']) && $u['cdays']) { $rs = mysql_query(sprintf("SELECT CONCAT(\"Studying \", `crName`) FROM `courses` WHERE (`crID` = %u)", $p)); $row = mysql_fetch_row($rs); mysql_free_result($rs); $i[] = sprintf("[img=icons/studying.png]", $row[0], $row[0]); } if (count($i)) echo "<div id='icons'>" . implode("", $i) . "</div><hr />"; } Add this code where you want to display it: echo $this->display_icons($ir); Then by adding this to your header.php <style> tags: #icons { text-align:center; } #icons img { padding:0 2px; } And your done.
-
Re: 3 Word Game and she went
-
Re: Lottery [v1 and v2] I copied your one and edited it. I accidently put richard instead of robert. My mistake.
-
Re: 3 Word Game for the dead
-
Re: Guess the next poster Nope spudinski
-
Re: Lottery [v1 and v2] Here is a cleaner code :) <?php /******************************************* * Lottery V2 * Mod created by unknown - edited by robert & kyle * Free mod not for resale. * Copy right 2008 ********************************************/ include "globals.php"; if($ir['money'] < 1000) { echo 'Unfortunatly it costs '.money_formatter(1000).' to enter to be able to play.'; header("Refresh: 3; url=index.php"); exit; } if($_POST['bet']) { if($_POST['bet'] > $ir['money']) { echo 'Unfortunatly you do not have enough money to play. [url="index.php"]Go Home[/url]'; $h->endpage(); exit; } $_POST['bet'] = abs(@intval($_POST['bet'])); $rand = (int) rand(1,5); $rand2 = (int) rand(1,5); $money = $_POST['bet']*1; if($_POST['bet'] < 0) { echo 'Shame on you! why do you have to cheat?!'; $h->endpage(); exit; } else if($rand == $rand2) { echo '<font color="green">Congratulations! You just won '.money_formatter($money).'. Come back soon.</font>'; mysql_query("UPDATE users SET money=money+$money WHERE userid=$userid",$c); header("Refresh: 3; url=lottery.php"); exit; } else { echo '<font color="red">Bad luck! You just lost '.money_formatter($money).'.</font>'; mysql_query("UPDATE users SET money=money-$money WHERE userid=$userid") or die(mysql_error()); header("Refresh: 3; url=lottery.php"); exit; } } else { echo ' <table width="80%" class="table" border="1" cellspacing="0"> <tr> <th><font color="#FFFFFF">Lottery</th> </tr> </table> Welcome to the '.$set['game_name'].' Lottery! Want to have a chance of winning the lottery? You will win by the level you are at and your bet You can bet as high as '.money_formatter(1000).' <form action="lottery.php" method="post"> Bet :<input type="text" name="bet" value="0"> <input type="submit' value="Bet!"> </form>'; } $h->endpage(); ?>
-
Re: [v2] Family's [$30] Yes this is still $30.
-
Re: [Free] Maths Challenge Iso a nice mod but you should take the timer up to 30 thats what they normaly do in a class or some thing. I worked out a sum that came up to "517610006" and i never had enough time to put it in.
-
[FREE] Total time logged in [v1 + v2]
Haunted Dawg replied to Haunted Dawg's topic in Free Modifications
Re: [FREE] Total time logged in [v1 + v2] All these posts in just one day. sheesh i am very sad to see this. BUT! let me tell you this: I went to my server and asked is it fine to run this cron per minute he says even with a database with over 50k members it will run perfect and why? because its only selecting A FEW! If you put this on torncity it will the run the same updating 300 queries is not that much when normaly a five minute cron is updating a hole database for christ sakes! so please next time go look around befor you people post such rubish! -
[FREE] Total time logged in [v1 + v2]
Haunted Dawg replied to Haunted Dawg's topic in Free Modifications
Re: [FREE] Total time logged in [v1 + v2] Good thinking will. I never thought of that :lol: A larger game i guess you could just do the same? its only updating people who are active in the last 3 minutes :) -
[FREE] Total time logged in [v1 + v2]
Haunted Dawg replied to Haunted Dawg's topic in Free Modifications
Re: [FREE] Total time logged in [v1 + v2] Glad you like :-) -
Re: online/offline/total users Meh i do it my way you do it your way OK?!
-
Ok i was looking around ce for some thing to keep my members active. I noticed Total time loggedin. Add this to where you want to display: $ttl = $ir['total_time_loggedin']; $day = floor($ttl/60/24); $hour = floor($ttl/60) % 24; $minute = $ttl % 60; if($day == 1) { $dt = "1 Day "; } else if($day > 1) { $dt = $day ." Days "; } else if($day == 0) { $dt = ""; } if($hour == 1) { $ht = "1 Hour "; } else if($hour > 1) { $ht = $hour ." Hours "; } else if($hour == 0) { $ht = ""; } if($minute == 1) { $mt = "1 Minute"; } else if($minute > 1) { $mt = $minute ." Minutes"; } else if($minute == 0) { $mt = ""; } //got idea from another person on ce. To display it: [b][url="?ttl"]TTL[/url]:[/b] '.$dt . $ht. $mt.' You might need to edit my code since my source is quite different :) Now for the minute cron: $g = mysql_query("SELECT * FROM users WHERE laston>unix_timestamp()-3*60") or die(mysql_error()); while($for = mysql_fetch_assoc($g)) { mysql_query("UPDATE users SET total_time_loggedin=total_time_loggedin+1 WHERE userid='{$for['userid']}'") or die(mysql_error()); } Now for those who dont understand TTL in your game add this to header: if(isset($_GET['ttl'])) { echo '<script language="javascript">alert("TTL = Total time logged in");</script>'; } Now for the final part SQL: ALTER TABLE users ADD total_time_loggedin BIGINT(11) NOT NULL DEFAULT '0'; Enjoy.
-
Re: online/offline/total users Yes but still ok you could also use: $online = mysql_num_rows(mysql_query("SELECT COUNT(userid) FROM users")); echo '[b]Users Online:[/b] '.$online;
-
Re: [$20] Hide & Seek Im on your game atm and i find it very nice :lol:. But if i aint one of those "trusted" people then i would make it myself and not resell it. And why? because i have respect for you tho u dont:
-
Re: [$20] Hide & Seek Huh? Where does it say it selects a random PHP page? A user will have the option to hide / search somewhere in the game while playing hide and seek. This could be anywhere they choose, i guess they choose random places, But I'm guessing your referring to SQL selecting a random page for them from your remark, No. You could say the "users" select a random spot on a page. :-P Trusted users, will find out who they are, when if they wish to purchase this modification and contact me i will either Accept or Deny them. :wink: I think you took that wrong. When they select a page to hide in, do they put in the page name like index.php or does it show all the pages using a while function conecting to all php pages? That was basicly the question :lol:.
-
Re: [$20] Hide & Seek So it basicly selects a random page from your php pages? COOL. Seeing you say you will only sell to trusted users... who might they be?
-
Re: online/offline/total users Im sure thats quite alot of queries. I use this: $online = mysql_num_rows(mysql_query("SELECT * FROM users WHERE laston>unix_timestamp()-15*60")); $total = mysql_num_rows(mysql_query("SELECT * FROM users"); $offline = $total-$online; echo '[b]Users Online:[/b] '.$online.' [b]Users Offline:[/b] '.$offline.' [b]Total Users:[/b] '.$total;
-
Re: 3 Word Game came to the
-
Re: Guess the next poster Yup spudinski Edit: i had putten nope first but then saw that he did say killah.
-
[mccode] Marrgiage with Shared House [$10.00]
Haunted Dawg replied to Danny's topic in Paid Modifications
Re: [v1/v2] Marrgiage with Shared House[v1/v2] www.stonerentertainment.com He put nyna's search up and at the bottom he removed the open source Nyna with Open source Stoner Entertainment Lol Edited to corrected my URL -
Re: [REVIEW] www.finalkillah.com Thanks for the review. I have removed the installer.php. I have removed the rating. The hirekiller.php is now as assassinator.php as i recoded my own. I find my site very easy to read the text. My members love the theme it suits the name of the game. There is no suit for "final" but for "killah", "killah" would in other words mean blood all over the place right? thats why i went with a red background with red splats. The text on the banner, i might be getting a new banner made. Thanks for the review :)
-
Re: Guess the next poster Nope, Spudinski