
endo
Members-
Posts
116 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by endo
-
Re: [mccodes] Hospital Time lol which bit did richards or mine lol either way if anyone is interested in the time going down to seconds just post in here and ill see if i can do it lol
-
Re: [mccodes] Hospital Time for it too display seconds as well you would need a unix_timestamp(); to be the time they are sent to jail/hospital then in seconds the time they are in there for. then have in header.php include "hospyjailthingy.php"; and in that file you would need something like $realese_time=($time_they_went_in+$how_long_there_in_there_for); select users hosptime if they are in hosp and put the hosp time to zero when they should be released and in jail.php you would need $timeleftin=($time_they_went_in - unix_timestamp()); $totaltimeleft=($how_long_there_in_there_for - $timeleftin); and the $totaltimeleft is how long in seconds they would be in there for using a little maths you all can finish this off i think if there is any holes in my logic let me know :D
-
Re: Ajax Chat my edition since when was one proud to be a noob? anyway i digest i dont really see a problem with the code if you set the permissions correctly it should work fine all in all a pretty good piece of code. :mrgreen:
-
Re: [Free V2] Lottery yes ace i have made it run in cronjobs checked everything and i dont even know why its not crediting lmao oh well maybe ill give this up as a bad job lol but ill keep trying for now in the meanwhile if anyone comes up with a fix do post it up here :mrgreen:
-
Re: Script For Header Very good killah im just going through it and trying to see if i can adapt it to tell the users what the user they are looking at is doing when they visit that users profile. lol bit tricky but if i make any headway ill let you know.
-
Re: [Free V2] Lottery looks like it should work i see a few mistakes i made now thanks war_hero :evil: still not working i ahve checked the codes and the sql it works fine but the cron still doesnt work
-
Re: [Free V2] Lottery sorry about the slow reply yes i got it setup in my cron and i keep going over it and it just doesnt credit lol but hey heres the code lol from what i can see it should work or am i wrong it doesnt even add the event lol <?php include "config.php"; global $_CONFIG; if($_GET['code'] != $_CONFIG['code']) { die(""); } 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; include "globals.php"; $sql = $db->query("SELECT * FROM lottery"); $rows = $db->num_rows($sql); $row = $db->fetch_row($sql); $winner = rand(1,$rows); $winnerq = sprintf("SELECT userid FROM lottery WHERE id = %d",$winner); $winnerq1 = $db->query($winnerq); $user = $db->fetch_row($winnerq1); $credit = sprintf("UPDATE users SET money = money + %d WHERE userid = (%u)",$row['jackpot'],$user['userid']); $db->query($credit); event_add($user['userid'],"You won the weekly lottery and were credited £{$row['jackpot']}",$c); $db->query("UPDATE users SET lottery = 0"); $db->query("TRUNCATE TABLE lottery"); ?>
-
Re: [Free V2] Lottery am i the only one with problems with the weekly cron i still cant get the bloody thing to run
-
Re: Most of my Mods for V2 thank you 03laceys you made my point in a lot less lines :mrgreen: and i agree get them down
-
Re: Most of my Mods for V2 You're actual core skill only counts for part of your place in this community exterminator even simple pieces of code can help the lowliest n00b begin to understand what they are doing. Therefore you shouldn't say we shouldn't be unhappy at you're leaving as you have most likely provided many people with there starting points as php coders. I wouldn't know half as much as i do now if it wasn't for most of the people (Extermination™ ,Nyna,MagicTallGuy,Richard but to name a few) so yes the community at large should be sorrowful at youre leaving as you have more than likely have provided people with a lot of help without the comparative to other people as reading an MTG script is hard to understand as a newbie so who knows i for one am sad too see a decent coder leave.
-
Re: [V2]Ranks Mod!!!![V2] dont see any problems in it at first glance but hey its late lol i suppose you could make this a global func but im crap with em lol but ill give it a go and see what i come up with ill post it on here if i have any luck.
-
Re: Usersonline [V2] well i know he aint this guy because this guy is cool lmao VOTE PEDRO
-
Re: Ammo [V2] woah lol nice rich looks good and feels good too lol keep em up
-
Re: Ammo [V2] yeah thats done without much effort once ive finished what im doing i will post you roughly that
-
Re: Ammo [V2] no probz tipz :D
-
Re: Ammo [V2] simple make it $db->query("UPDATE users SET money=money-10,ammo=ammo+6 WHERE userid=$userid",$c);
-
Re: Ammo [V2] :-D no problems you had it all fine you just needed to define the random amounts :D
-
Re: Ammo [V2] should be (ignore the <?php and ?> thats just for the color coding to work) <?php $ammo=rand(1,5); /// removes random amount of bullets 1-5 $db->query("UPDATE users SET ammo=-$ammo WHERE $userid=userid"); ?>
-
Re: Usersonline [V2] it is very good a few changes for me here and there but i like it :-D
-
Re: Crimes (Players Can Go To Hospital) [V2] hmm good mod but id add in in docrime.php so that if the hosptime is above 0 add in the 3rd chance of failing a crime not 100% sure on how to do this but im workin on it :D something like this may work though Ok tested this several times over and this does work as far as i can see. any problems just post em up. if ($r[crimeHOSPTIME] > 0) { if(rand(1, 2) == 1) { print "<font color=orange>{$r['crimeFTEXT']}</font>"; } else { print "<font color=red>{$r['crimeHTEXT']} Paramedic Brady: You're gonna have a nice visit to hospital for {$r[crimeHOSPTIME]} minutes.</font>"; $db->query("UPDATE `users` SET `hospital` = '$r[crimeHOSPTIME]', `jail_reason` = '$r[crimeHREASON]' WHERE `userid` = '$userid'"); } } } else if(rand(1, 2) == 1) { print "<font color=orange>{$r['crimeFTEXT']}</font>"; } else { print "<font color=red>{$r['crimeJTEXT']} Office Brady: Youre gonna have a nice visit to jail for {$r[crimeJAILTIME]} minutes.</font>"; $db->query("UPDATE `users` SET `jail` = '$r[crimeJAILTIME]', `jail_reason` = '$r[crimeJREASON]' WHERE `userid` = '$userid'"); } }
-
Re: strang ' marks appearing I was wrong to get in a stress over this sorry to anyone i offended was very early in the morning and i needed sleep but now its early in the morning again lol but reading over this i see how juvenile i acted i am sorry for any childish posts i made around the same time as this one and sorry again to anyone who i offended. Sorry.
-
Re: learning mysql_real_escape_string just need to verify. MTG how would you use htmlentities() / htmlspecialchars() and where?? :D
-
Re: learning mysql_real_escape_string just need to verify. thanks Floydian I think the moderators or whoever has the ability to make this into a proper topic to do so as it is very helpful to gamers and lots of people as for help in this unfortunately i do not know any mods/admins unless nyna is one and im not sure if she is but hey if anyone can will they please do so. Thanks all members who have helped here.
-
Re: Help with crimeXP on McCode v2 please the exp given out is actually the crimes cash divided by 8
-
Re: learning mysql_real_escape_string just need to verify. Thanks Isomerizer i did look through the link you gave me but your example and nynas make more sense lol im not sure why bu they just do thanks again.