-
Posts
2,210 -
Joined
-
Last visited
-
Days Won
47
Content Type
Profiles
Forums
Events
Everything posted by sniko
-
# users in hospital/jail and in your location $hc = mysql_fetch_array(mysql_query("SELECT COUNT(`userid`) AS c FROM `users` WHERE `hospital`>0 && `location`={$ir['location']}")); // echo $hc['c']; $jc = mysql_fetch_array(mysql_query("SELECT COUNT(`userid`) AS c FROM `users` WHERE `jail`>0 && `location`={$ir['location']}")); // echo $jc['c']; # users in hospital/jail alone $hc = mysql_fetch_array(mysql_query("SELECT COUNT(`userid`) AS c FROM `users` WHERE `hospital`>0")); // echo $hc['c']; $jc = mysql_fetch_array(mysql_query("SELECT COUNT(`userid`) AS c FROM `users` WHERE `jail`>0 ")); // echo $jc['c']; There are a lot of parameters to put in the where statement to put in the WHERE clause to make your game realistic, but then again, you could have a global count of the game, which wouldn't make it so realistic, but give the users more detail, it depends how you run your game, personally, i try and make my games as realistic as possible, but other people don't as it gives users a "time to get away". Anyway, you can use whatever, some have already been posted in this topic, or you could use the below function. function patient($what, $where, $operation, $clause, $extra) { $count = mysql_fetch_array(mysql_query("SELECT COUNT(`userid`) AS c FROM $what WHERE `$where` $operation $clause $extra")); return $count['c']; } echo "[url='hospital.php']Hospital (".patient('hospital', 'hospital', '>', '0', '&& `location`=1').")[/url] "; There is a lot of ways you can do this, you could even use AJAX,JQUERY (or whatever, im not familiar with those languages) to fetch the result without refreshing the page. -sniko
-
In Roughly 3 Weeks---Looking for A partnership in a large project.
sniko replied to Joshua's topic in General Discussion
Heya, Im just curious, is the project a game? or a social network site? or what? I may be interested if my skills qualify. -sniko [notice]MSN: [email protected][/notice] -
Or.........The meta refresh display picture.....
-
2 thread, 2 posts, seen this image in both of them, PAUL YOU ARE ON A ROLL!! lol *Side Note to Paul: hehe its funny
-
Thanks for the tip Maniak Thanks Zu
-
InfantryX - Free Military Game [Browser Game] Development!
sniko replied to Dave's topic in Game Projects
Wasn't the release date 24th June 2010? -
I only used a tutorial to draw the gun, But i then edited it Fireworks by myself
-
Hey, I wondered how to digilize and draw so i did. I drew the basic gun and then editied it on Fireworks (probably on the best, but it did the job) Link: http://img203.imageshack.us/img203/3161/allguns.png Please post your comments, Thanks -sniko
-
Urm, sure i do..... *-)
-
Looking good, but don't do it with all crimes, maybe add in staff panel the waiting time for each crime, so its different. Also, with whiles i prefer doing while([whatever]) : //content endwhile; as it is easier to debug and read and you can clearly see its ending the while
-
A way ive thought of is; Detect a sudden increase in user related stuff, for example, money/crystals etc. Then once detected, it adds it to a log and sends an event to the admin and other staff members and fetches their current URL and Referred URL of the user with the sudden increase (which will also be added to the log) using $_SERVER['REQUEST_URI'] AND $_SERVER['HTTP_REFERER']. This will notify the staff members and give them chance to investigate the sudden increase. -sniko
-
once ive moved house, im learning how to draw and digilize etc etc so once ive done that, ill hit you up on MSN to notify you.
-
Soon, once i get my new laptop, and have moved house, i am going to create a bundle of designs, so go with mccodes, so ill post a notice and a poll of what designs everyone wants.
-
1. Log into your cPanel 2. Click "PhpMyAdmin" 3. Click the SQL Tab 4. Paste all sql's in the text box 5. Click "Go" 6. Go back to cPanel 7. Click "Legacy File Manager" 8. Create a new file 9. Paste the code according to the file name 10. Follow any instructions 11. Test 11 (a) . If the code doesnt work, post the error in the forums, under the relavent topic/thread 11 (b). If the code does work, post a thank you note or provide a demo
-
I used to play a few text based games, and overall, i preferred games with a "middle" economy, with some people rich and some poor, but the rich ones worked for their money
-
So am i, Look at the code, find out where it has the code to display when you are in the shop
-
[mccodes v2] Find random items while playing the game...
sniko replied to MDK666's topic in Free Modifications
$bla = rand(1,10000) { if($bla <= 2) { //find item } else { } -
Thats easily done, follow these steps. Go to shops.php and find (around line 46) echo "<table width='90%' cellspacing='1' cellpadding='1'> Replace with echo bbCode($shopdata['shopDESCRIPTION']) "<table width='90%' cellspacing='1' cellpadding='1'> Now use the following bbCode function, and put it in global_func.php function bbCode($string) { $bbCode = array("[b]" => '[b]', "[/b]" => '[/b]', "[u]" => '<u>', "[/u]" => '</u>', "[s]" => '<s>', "[/s]" => '</s>' ); return strtr($string, $bb); }
-
I'd like to announce pre-registration for Spiedex. By pre registering to spiedex your character will gain: •A unique medal which will be displayed on your profile •An firearm •A surival kit •More Account features • +MORE Spiedex is still being created and the layout is still having tweaks and adjustments to it, but overall the game will be FREE to play You can pre-register at http://www.spiedex.com Thank you for your interest, sniko
-
Line 84 is print "</table> replace with print "</table> ";
-
<?php $query = mysql_query("SELECT `id`,`president` FROM `gangs` ORDER BY `respect` DESC LIMIT 5"); $rank = 0; while($r = mysql_fetch_array($query)) : $rank++; $mems = mysql_fetch_array(mysql_query("SELECT COUNT(`userid`) AS `u` FROM `users` WHERE `gang`={$r['id']}")); $loc = mysql_fetch_array(mysql_query("SELECT `location` FROM `users` WHERE `userid`={$r['president']}")); $loca = mysql_fetch_array(mysql_query("SELECT `cityname` FROM `cities` WHERE `cityid`={$loc['location']}")); //start Grammar if($rank == 1) { $g = "st"; } if($rank == 2) { $g = "nd"; } if($rank == 3) { $g = "rd"; } if($rank == 4 || $rank == 5) { $g = "th"; } echo "The {$rank}<sup>$g</sup> is in {$loca['cityname']} with ".number_format($mems['u'])." members"; endwhile; ?>
-
I think you've done a good job
-
replase the query with $db->query("INSERT INTO `family_armory` (``,`ItemID`,`Adder`,`RentTime`) VALUES (NULL, {$_GET['itm']}, {$ir['userid']}, {$_POST['days']}") or print (mysql_error()); and paste the error, for further support add me on msn; [email protected] thanks, sniko