
MrGi
Members-
Posts
152 -
Joined
-
Last visited
Never
Content Type
Profiles
Forums
Events
Everything posted by MrGi
-
Re: [V2] Upgraded Brothel Thanks DjKanna.. Apperciate it mate.
-
Re: [mccode] Killing License iv seen your codes, doesnt confuse me a bit.. Sprintf queries etc etc...Iv done my studying :P
-
Re: Mccodes 1 and 2 - Invade house script You put a bracket in the }else{ statement... And it isnt closing anything so it doesnt need to be there..
-
Re: [mccode] Killing License Post people think a sprintf query is hard to work with, thats why i kinda keep them off CE as most people cant figure them out... Lol
-
Re: [mccodes V1-V2]Selling MYOP - Players can make their Own Donor Packs ($75) This seems to be a great mod. I couldnt use it as they really only have one dontion option. Plus That taking thier time to figure out what they want etc etc...Would be a waste and could mean that thye dont want to take the time to do it,Meaning you could loose dontions.. So i think ill just stick with my own DP packs.. Especailly for $75..lol.. But over all mate, good mod..Hope it all works for ya
-
Re: [mccode v2] Fishing Mod Ill help ya out....Just give me a shout though mail on here mate. Iv pretty much took your ideas and almost got what ya wanted lol
-
Re: [mccode] Killing License Well a sprintf query would work also, I was just making things easy lol...sprintf queries are more secure than a regular $db->query...
-
Re: Mccodes 1 and 2 - Invade house script ***********UPDATE************** Still havnt tested, just going by the error you provided. If still having trouble i will fix it completely and test it. <?php session_start(); if (file_exists('globals.php')) { require('. /globals.php'); } include "global_func.php"; require "mysql.php"; if($ir['energy'] < 10) { die("You need at least 10 energy to invade a home. You only have {$ir['energy']} energy. "); } if($ir['jail']) { die("You cannot invade a House while in jail."); } if($ir['hospital']) { die("You cannot invade a House while in hospital."); } if($_GET['ID'] == $userid) { die("You idiot, you own your house!"); } $_GET['ID']=abs((int) $_GET['ID']); $r=$db->fetch_row($db->query("SELECT * FROM users WHERE userid={$_GET['ID']}")); if(!$r['userid']) { die("Sorry, this user does not exist."); } $mult=$r['level']*$r['level']; $chance=min(($ir['crimexp']/$mult)*50+1, 95); if(rand(1,100) < $chance) { $gain=$r['level']*5; print "You successfully invaded {$r['username']} Home, and gained some experience! > [url='jail.php']Back[/url]"; $db->query("UPDATE users SET crimexp=crimexp+{$gain} WHERE userid=$userid"); $db->query("UPDATE users SET jail=0 WHERE userid={$r['userid']}"); event_add($r['userid'], "[url='viewuser.php?u={$ir[']{$ir['username']}[/url] invaded your house! Click [url='invade.php?ID={$userid}']here[/url] To do the same thing to them. ", $c); } else { print "When you were knocking down {$r['username']}'s house you were caught by a police officer and taken to jail. > [url='jail.php']Go to Jail[/url]"; $time=min($mult, 40); $db->query("UPDATE users SET jail=$time, jail_reason='Caught trying to invade the Home of {$r['username']}' WHERE userid=$userid"); event_add($r['userid'], "[url='viewuser.php?u={$ir[']{$ir['username']}[/url] was arrested trying to invade your home.", $c); } print"While Searching Though {$r['username']}'s House, You Found $amnt of cash!"; else { $chance = rand(7,20); if ($chance == 1) }{ $amnt=rand(500,1500); if($ir['money'] > $amnt) } $db->query("UPDATE users SET money=money+ {$amnt } WHERE userid=$userid",$c); $ir['money']+=$amnt; $h->endpage(); ?>
-
[Request][Any Version] No Display Picture Mod
MrGi replied to HITMAN 17's topic in General Discussion
Re: [Request][Any Version] No Display Picture Mod Man, Dont be dissing on a fellow because he couldnt figure out something so simple. People Learn By others also. And You dont have to be the greatest php coder to get respect off anyone. To gain respect you try your best at something great, And if it dont work out people will help you, and that is gaining respect. -
Re: [mccode] Killing License If your updating the users hospital time for V2 the query would look like this.. ("UPDATE users SET hosptime=$hosptime - 1 WHERE hosptime >0 AND userid=$userid");
-
Re: [V2] Upgraded Brothel No Problem Mate, You will get the hang of things. Good First try on it. And Thanks Zero. :) May even be a few more errors im really not to sure, I was just sorting it all out and making it just a tad bit better for others. Once again any errors or mis-functions, Post it up
-
Re: [V2] Upgraded Brothel Sorry, for a double post, wouldnt let me edit my other one. I fixed all the bugs, Edited a few things and Now it works fine. <?php include "globals.php"; $hprice= 50; // Price of your Hoes... $cashphoe= $hprice * 100; print" <h3>Welcome to the Brothel</h3> [i]Sign up today to gain some extra cash![/i] "; print" You Currently Have a Total Of {$ir['thoes']} Hoes. "; switch($GET['action']) { case "cjoin": cjoin(); break; case "leave": leave(); break; case "buy": buy(); break; case "buyhoes": buyhoes(); break; case "buyconfirm": buyconfirm(); break; case "joinb": joinb(); break; default: index(); break; } function index() { global $db, $ir,$c,$userid,$h; print " [url='{$_SERVER[']Join brothel And Buy Hoes[/url] [url='{$_SERVER[']Buy Extra Hoes[/url] [url='{$_SERVER[']Leave and loose all your hoes[/url] "; } function joinb() { global $db, $ir,$c,$userid,$h; print "So, you would like to join the brothel and buy some hoes? It costs [b]FREE[/b] to sign up and \$5000 for each hoe. From each hoe you gain \$100 a day [b]How many hoes would you like to buy? You need 1 To Join![/b] <form action='{$_SERVER['PHP_SELF']}?action=cjoin' method='post'> <input type=text name=hoes> <input type=submit value=submit> </form>"; } function cjoin() { global $db, $ir,$c,$userid,$h; if($ir['money'] < '$hprice') { print "<font color=red>Error!</font> You Dont Have Enough Cash, Sorry! [url='brothel.php']Return to Brothel[/url] "; } elseif($ir['money'] > '$price') print "We have now taken your cash and you have now joined"; $db->query("UPDATE users SET money = money - 5000 WHERE userid = $userid"); $db->query("UPDATE users SET brotheljoin = 1 WHERE userid=$userid"); } function buy() { global $db, $ir,$c,$userid,$h; print "You can only buy one hoe a day, So would you like to buy a hoe today? [url='{$_SERVER[']Buy your hoe ($5000)[/url] "; } function buyhoes() { global $db, $ir,$c,$userid,$h; print "Buying A Hoe "; if($ir['money'] < '2000') { print "<font color=red>Error!</font> You dont have enough for the hoe you need 2000 dollars [url='index.php']Back Home[/url] "; } if($ir['money'] > '1999') { print "<font color=green>Success!</font> You buy a hoe for 2000 Dollars"; $db->query("UPDATE users SET money = money - 2000 WHERE userid = $userid"); $db->query("UPDATE users SET hoesbuy = 1 WHERE userid = $userid"); $db->query("UPDATE `users` SET money = money + totalhoes * 100 WHERE userid = $userid"); } if($ir['hoesbuy'] == 1) { print "<font color=red>Error!</font> You have already bought a hoe today!"; } } function leave() { global $db, $ir,$c,$userid,$h; print "Leaving Brothel "; if($ir['brotheljoin'] == '0') { print "<font color=red>Error!</font> You are not joined in the brothel [url='index.php']Back Home[/url] "; } if($ir['brotheljoin'] == '1') { print "<font color=green>Success!</font> You leave the brothel and you get rid of all your hoes"; $db->query("UPDATE users SET totalhoes = 0 WHERE userid = $userid"); $db->query("UPDATE users SET brotheljoin = 0 WHERE userid = $userid"); } } $h->endpage(); ?>
-
Re: [V2] Upgraded Brothel I think all bugs are sorted, Working fine for me as i know. Here it is, If you find anymore errors let me know and ill fix them. <?php include "globals.php"; $price = 50; //The price of the hoes $cashfh = $price * 100; //The total cash your hoes earn a day and give to you print "<h3>Brothel</h3> [i]Sign up to the brothel with your bought hoes and gain some money each day.[/i] [b]You currenltly have {$ir['totalhoes']} meaning you earn {$cashfh} a day! "; if($ir['totalhoes'] == 1) print" You dont have any hoes yet, so go buy some!"; switch($_GET['action']) { case "joinconfirm": joinconfirm(); break; case "leave": leave(); break; case "buy": buy(); break; case "buyhoes": buyhoes(); break; case "buyconfirm": buyconfirm(); break; case "joinb": joinb(); break; default: index(); break; } function index() { global $db, $ir,$c,$userid,$h; print "[url='{$_SERVER[']Join brothel And Buy Hoes[/url] [url='{$_SERVER[']Buy Extra Hoes[/url] [url='{$_SERVER[']Leave and loose all your hoes[/url] "; } function joinb() { global $db, $ir,$c,$userid,$h; print "So, you would like to join the brothel and buy some hoes? It costs [b]FREE[/b] to sign up and \$5000 for each hoe. From each hoe you gain \$100 a day [b]How many hoes would you like to buy? You need 1 To Join![/b] <form action='{$_SERVER['PHP_SELF']}?action=joinconfirm' method='post'> <input type=text name=hoes> <input type=submit value=submit> </form>"; } function joinconfirm() { global $db, $ir,$c,$userid,$h; if($ir['money'] < '$price') { print "<font color=red>Error!</font> You Dont Have Enough Cash, Sorry! [url='brothel.php']Return to Brothel[/url] "; } if($ir['money'] > '$price') print "We have now taken your cash and you have now joined"; $db->query("UPDATE users SET money = money - 5000 WHERE userid = $userid"); $db->query("UPDATE users SET brotheljoin = 1 WHERE userid=$userid"); } function buy() { global $db, $ir,$c,$userid,$h; print "You can only buy one hoe a day, So would you like to buy a hoe today? [url='{$_SERVER[']Buy your hoe ($5000)[/url] "; } function buyhoes() { global $db, $ir,$c,$userid,$h; print "Buying A Hoe "; if($ir['money'] < '2000') { print "<font color=red>Error!</font> You dont have enough for the hoe you need 2000 dollars [url='index.php']Back Home[/url] "; } if($ir['money'] > '1999') { print "<font color=green>Success!</font> You buy a hoe for 2000 Dollars"; $db->query("UPDATE users SET money = money - 2000 WHERE userid = $userid"); $db->query("UPDATE users SET hoesbuy = 1 WHERE userid = $userid"); $db->query("UPDATE `users` SET money = money + totalhoes * 100 WHERE userid = $userid"); } if($ir['hoesbuy'] == 1) { print "<font color=red>Error!</font> You have already bought a hoe today!"; } } function leave() { global $db, $ir,$c,$userid,$h; print "Leaving Brothel "; if($ir['brotheljoin'] == '0') { print "<font color=red>Error!</font> You are not joined in the brothel [url='index.php']Back Home[/url] "; } if($ir['brotheljoin'] == '1') { print "<font color=green>Success!</font> You leave the brothel and you get rid of all your hoes"; $db->query("UPDATE users SET totalhoes = 0 WHERE userid = $userid"); $db->query("UPDATE users SET brotheljoin = 0 WHERE userid = $userid"); } } $h->endpage(); ?>
-
Re: [mccode] Killing License Some Simple Fixes, For V2 it is : <?php /*----------------------------------------------------- -- sniko` -- killinglicence.php -----------------------------------------------------*/ require "globals.php"; print "<h3>Killing License</h3>"; switch($_GET['action']) { case 'buy': buy(); break; default: index(); break; } function index() { global $db,$ir,$userid; print "[[url='killinglicence.php?action=buy']Buy A Killing License[/url]] [i]Killing Licenses Are So You Can Kill Others![/i]"; } function buy() { global $db,$ir,$userid; print "You Successfully Bought One!"; $db->query("UPDATE users SET hospital=hospital-1 WHERE hospital>0"); $db->query("UPDATE users SET killinglicense=1 WHERE userid=$userid"); } $h->endpage(); ?> And For V1 It is: <?php /*----------------------------------------------------- -- sniko` -- killinglicence.php -----------------------------------------------------*/ session_start(); require "global_func.php"; if($_SESSION['loggedin']==0) { header("Location: login.php");exit; } $userid=$_SESSION['userid']; require "header.php"; $h = new headers; $h->startheaders(); include "mysql.php"; global $c; $is=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid",$c) or die(mysql_error()); $ir=mysql_fetch_array($is); check_level(); $fm=money_formatter($ir['money']); $cm=money_formatter($ir['crystals'],''); $lv=date('F j, Y, g:i a',$ir['laston']); $h->userdata($ir,$lv,$fm,$cm); $h->menuarea(); print "<h3>Killing License</h3>"; switch($_GET['action']) { case 'buy': buy(); break; default: index(); break; } function index() { global $db,$ir,$userid; print "[[url='killinglicence.php?action=buy']Buy A Killing License[/url]] [i]Killing Licenses Are So You Can Kill Others![/i]"; } function buy() { global $db,$ir,$userid; print "You Successfully Bought One!"; $db->query("UPDATE users SET hospital=hospital-1 WHERE hospital>0"); $db->query("UPDATE users SET killinglicense=1 WHERE userid=$userid"); } $h->endpage(); ?> Not Sure on the query: $db->query("UPDATE users SET hospital=hospital-1 WHERE hospital>0"); On what it exactly does, couldnt really figure it out. But It works fine, I tested it.
-
Re: [V2] Upgraded Brothel There was many errors within the code. Sniko, Good job though bud, It was a great first try, and i give props for Zero teaching ya the functions etc etc. One thing, When You had print "We have now taken your cash and you have now joined"; $db->query('UPDATE `users` SET money = money - $price WHERE userid = $userid'); $db->query('UPDATE `users` SET brotheljoin = 1 WHERE userid = $userid')"; You would end your print in 2 spots, first after the Statment and another after the query, I found that on all your querys mate, Just watch out for things like that. Overall GOod work mate, Keep it up ******UPDATE******** Still getting some errors, as there are alot of them and im short on time atm, I will post a full working version when i get time..
-
Re: [V2] Upgraded Brothel Another Updated version, Tested. Works to my knowledge, If any errors found post them up. <?php include "globals.php"; $price = 50; //The price of the hoes $cashfh = $price * 100; //The total cash your hoes earn a day and give to you print "<h3>Brothel</h3> [i]Sign up to the brothel with your bought hoes and gain some money each day.[/i] [b]You currenltly have {$ir['hoes']} Meaning you earn {$cashfh} a day!"; switch($_GET['action']) { case "joinconfirm": joinconfirm(); break; case "leave": leave(); break; case "buy": buy(); break; case "buyhoes": buyhoes(); break; case "buyconfirm": buyconfirm(); break; case "joinb": joinb(); break; default: index(); break; } function index() { global $db, $ir,$c,$userid,$h; print "[url='{$_SERVER[']Join brothel And Buy Hoes[/url] [url='{$_SERVER[']Buy Extra Hoes[/url] [url='{$_SERVER[']Leave and loose all your hoes[/url] "; } function joinb() { global $db, $ir,$c,$userid,$h; print "So, you would like to join the brothel and buy some hoes? It costs [b]FREE[/b] to sign up and \$5000 for each hoe. From each hoe you gain \$100 a day [b]How many hoes would you like to buy? You need 1 To Join![/b] <form action='{$_SERVER['PHP_SELF']}'?action=buyconfirm' method='post'> <input type=text name=hoes> <input type=submit value=submit> </form>"; } function joinconfirm() { global $db, $ir,$c,$userid,$h; print "We have now taken your cash and you have now joined"; $db->query('UPDATE `users` SET money = money - $price WHERE userid = $userid'); $db->query('UPDATE `users` SET brotheljoin = 1 WHERE userid = $userid'); } function buy() { global $db, $ir,$c,$userid,$h; print "You can only buy one hoe a day, So would you like to buy a hoe today? [url='{$_SERVER[']Buy your hoe ($5000)[/url] "; } function buyhoes() { global $db, $ir,$c,$userid,$h; print "Buying A Hoe "; if($ir['money'] < '2000') { print "<font color=red>Error!</font> You dont have enough for the hoe you need 2000 dollars [url='index.php']Back Home[/url] "; } if($ir['money'] > '1999') { print "<font color=green>Success!</font> You buy a hoe for 2000 Dollars"; $db->query('UPDATE users SET money = money - 2000 WHERE userid = $userid'); $db->query('UPDATE users SET hoesbuy = 1 WHERE userid = $userid'); $db->query('UPDATE `users` SET money = money + totalhoes * 100 WHERE userid = $userid'); } if($ir['hoesbuy'] == 1) { print "<font color=red>Error!</font> You have already bought a hoe today!"; } } function leave() { global $db, $ir,$c,$userid,$h; print "Leaving Brothel "; if($ir['brotheljoin'] == '0') { print "<font color=red>Error!</font> You are not joined in the brothel [url='index.php']Back Home[/url] "; } if($ir['brotheljoin'] == '1') { print "<font color=green>Success!</font> You leave the brothel and you get rid of all your hoes"; $db->query('UPDATE users SET totalhoes = 0 WHERE userid = $userid'); $db->query('UPDATE users SET brotheljoin = 0 WHERE userid = $userid'); } } $h->endpage(); ?> Some spelling and function errors in it that i found.. Also use {$_SERVER['PHP_SELF']} instead of .$_SERVER['PHP_SELF'].' because it usally causes errors as the ones you guys are having.
-
Re: Donator and Non-Donator Lottery [V2] ColdK, for your cron mate, if you wish to run it on a daily cron, or weekly, Just add that cron code into cron_day.php or cron_week.php ... That way the one specfic file for the cron isnt sitting in your files taking up space.
-
Re: Multiple Houses Mod This one was made by richard, Not sure if it what you want. http://criminalexistence.com/ceforums/i ... ic=22708.0
-
Re: Can you rate my game please? Well, My impressions of this game is it does need some work done to it. And Yeah, a decent template could be in order, And most people dont have the cash to pay someone,so you have to use what you can find. But Overall i think its a great start to a good game. And whoever codes this game keep it up ;) your doing a great job.
-
Re: [mccode] Supporter Packs If you add this, You get query errors of usersstats everywhere that query is being used.
-
Re: game set up Check Your INbox mate :)
-
Re: [mccode] Supporter Packs Scratch me last post. I tried that query and getting an error also. Give me a few and ill re-code the whole supporter deal.
-
Re: My first Login Its Very Nice, But overall, Your banner picture, Iv seen on to many games already. But as its your first log-in page its a great start for it to become better. Keep it up mate.
-
Re: Log in screen :) Its a decent start for a great log-in page. Without images and a good background though, It really isnt much. But you have to start somewhere, Overall Its a good log-in page for a new guy to create. Good Work Mate.
-
Re: My own Game Engine. Lol, Well I wasnt sure what to call the Securers, But i wanted to kinda get the job info out. And If your not going to post anything but a whole bunch of bullshit, Then get out of my post and screw with someone else. Im here to try and create something and it WONT be an epic fail...So just sit there and either post something worth reading, Or dont post.