Jump to content
MakeWebGames

p_T_s

Members
  • Posts

    148
  • Joined

  • Last visited

Everything posted by p_T_s

  1. Re: [V2] Robbery lol... nope same thing, you can't buy crew members or commit robbery
  2. Re: [mccode v2] Ranks I cant get the rank to show in the viewuser page... It just says RANK: In the index.php works fine Rank: #1 Absolute beginner Any suggestions?
  3. Re: [V2] Robbery Ok i have got it to work but it dosnt let me buy any crew members or commit crimes? <?php include "globals.php"; $luck = ($ir['level']) / 5; $crew = ($ir['crewmembers']) / $luck; $cashearn = $crew * 3; switch($_GET['action']) { case "buy": buy(); break; case "buycrew": buycrew(); break; case "commit"; commit(); break; default: index(); break; } print "<h3>Robbery</h3> [i]Hook up a robbery to earn some cash.[/i] [b]You currenltly have {$ir['crewmembers']} meaning there is a higher chance you succeed with more cash!"; function index() { global $db, $ir,$c,$userid,$h; print "[url='{$_SERVER[']Buy Crew Members[/url] [url='{$_SERVER[']Commit Robbery[/url] "; } function buy() { global $db, $ir,$c,$userid,$h; print "Buying an extra crew member for $1000 [url='{$_SERVER[']Buy a crew member ($1000)[/url] "; } function buycrew() { global $db, $ir,$c,$userid,$h; print "Buying A Crew Member "; if($ir['money'] < '1000') { print "<font color=red>Error!</font> You dont have enough for the crew member you need 1000 dollars [url='index.php']Back Home[/url] "; } if($ir['money'] > '999') { print "<font color=green>Success!</font> You buy a crew member for 1000 Dollars"; $db->query('UPDATE users SET money = money - 1000 WHERE userid = $userid'); $db->query('UPDATE users SET crewmembers = crewmembers + 1 WHERE userid = $userid'); } } function commit() { global $db, $ir,$c,$userid,$h; print 'Commiting The Robbery '; if($ir['crewmembers'] == '0') { print "<font color=red>Error!</font> You dont have any crew members, This isnt a one man job! [url='index.php']Back Home[/url] "; } if($ir['crewmembers'] > '1') { $chance=rand(1,2); if ($chance == 1); { print "<font color=green>Success!</font> The robbery goes to plan and you earn {$cashearn}!, All your crew members leave you as well!"; $db->query('UPDATE users SET money = money + {$cashearn}, crewmembers = 0 WHERE userid = $userid'); } { print "<font color=green>Fail!</font> The robbery doesnt go to plan all your crew members were shot down by S.W.A.T, only you managed to flee away!"; $db->query('UPDATE users SET crewmembers = 0 WHERE userid = $userid'); } } } $h->endpage(); ?>   At least i tried! lol
  4. Re: [V2] Robbery Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/piratesn/public_html/robbery.php on line 35
  5. Re: [mccode] Mining mod I am trying to add hospital time to mining, i currently have this   function mine_1() { global $ir,$c,$userid,$db;$domain; if($ir['power'] < 10) { print "<center>You need 5 power to mine here your have {$ir['power']}</center>"; die ("</table><tr><td><image src='bottom1.png'></td></tr></table>"); } $db->query("UPDATE users SET power=power-10 WHERE userid=$userid",$c); $rand_gems = rand(0,5); $rand_exp = rand(1,100); $rand_hosp = rand(0,15); echo "<center>You begin mining in the level 1 mine and found $rand_gems crystal(s).</center> "; echo "<center>You tripped and fell in the mine, go to hospital for $rand_hosp minutes.</center> "; $db->query("UPDATE users SET crystals=crystals+'$rand_gems',mine_exp=mine_exp+'$rand_exp',hospital=hospital+'$rand_hosp' WHERE userid=$userid",$c);   It works (as in sending me to hospital) but it is sending me there every time i mine... What do i have to add to make it random?
  6. Re: [V2] Upgraded Brothel I got the same thing except it was on line 64
  7. Re: [V2] Upgraded Brothel Nah it still comes up with the same thing   Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/piratesn/public_html/brothel.php on line 44
  8. Re: [V2] Upgraded Brothel Same here
  9. Re: [mccode v2] Freeze & Reactivate a Users Bank Account Ok, it doesn't save in the edit user but when i do it manually in the database it works?
  10. Re: [mccode v2] Freeze & Reactivate a Users Bank Account   My default is set to 0 and also the sql is as it should be but still it doesnt work :/ has anybody else installed this to see if it works?   I have the same problem as saint had and even with this,   $db->query("INSERT INTO users (username, login_name, userpass, level, money, crystals, donatordays, frozen, user_level, energy, maxenergy, will, maxwill, brave, maxbrave, hp, maxhp, location, gender, signedup, email, bankmoney) VALUES( '{$_POST['username']}', '{$_POST['login_name']}', md5('{$_POST['userpass']}'), $level, $money, $crystals, $frozen, $donator, $ulevel, $energy, $energy, 100, 100, $brave, $brave, $hp, $hp, 1, '{$_POST['gender']}', unix_timestamp(), '{$_POST['email']}', -1)");   Still won't work? heres my bank.php   <?php include "globals.php"; if($ir['frozen']>0) { die("Your Bank Account has Been frozen please contact a member of staff"); } print "<h3>Bank</h3>"; if($ir['bankmoney']>-1) { switch($_GET['action']) { case "deposit": deposit(); break; case "withdraw": withdraw(); break; default: index(); break; } } else { if(isset($_GET['buy'])) { if($ir['money']>49999) { print "Congratulations, you bought a bank account for \$50,000! [url='bank.php']Start using my account[/url]"; $db->query("UPDATE users SET money=money-50000,bankmoney=0 WHERE userid=$userid"); } else { print "You do not have enough money to open an account. [url='explore.php']Back to town...[/url]"; } } else { print "Open a bank account today, just \$50,000! [url='bank.php?buy']> Yes, sign me up![/url]"; } } function index() { global $db, $ir,$c,$userid,$h; print "\n[b]You currently have \${$ir['bankmoney']} in the bank.[/b] At the end of each day, your bank balance will go up by 0%. <table width='75%' cellspacing=1 class='table'> <tr> <td width='50%'>[b]Deposit Money[/b] It will cost you 15% of the money you deposit, rounded up. The maximum fee is \$5,000.<form action='bank.php?action=deposit' method='post'> Amount: <input type='text' name='deposit' value='{$ir['money']}' /> <input type='submit' value='Deposit' /></form></td> <td> [b]Withdraw Money[/b] There is no fee on withdrawals.<form action='bank.php?action=withdraw' method='post'> Amount: <input type='text' name='withdraw' value='{$ir['bankmoney']}' /> <input type='submit' value='Withdraw' /></form></td> </tr> </table>"; } function deposit() { global $db,$ir,$c,$userid,$h; $_POST['deposit']=abs((int) $_POST['deposit']); if($_POST['deposit'] > $ir['money']) { print "You do not have enough money to deposit this amount. [url='explore.php']Back[/url]"; } else { $fee=ceil($_POST['deposit']*15/100); if($fee > 5000) { $fee=5000; } $gain=$_POST['deposit']-$fee; $ir['bankmoney']+=$gain; $db->query("UPDATE users SET bankmoney=bankmoney+$gain, money=money-{$_POST['deposit']} where userid=$userid"); print "You hand over \${$_POST['deposit']} to be deposited, after the fee is taken (\$$fee), \$$gain is added to your account. [b]You now have \${$ir['bankmoney']} in the bank.[/b] [url='bank.php']> Back[/url]"; } } function withdraw() { global $db,$ir,$c,$userid,$h; $_POST['withdraw']=abs((int) $_POST['withdraw']); if($_POST['withdraw'] > $ir['bankmoney']) { print "You do not have enough banked money to withdraw this amount."; } else { $gain=$_POST['withdraw']; $ir['bankmoney']-=$gain; $db->query("UPDATE users SET bankmoney=bankmoney-$gain, money=money+$gain where userid=$userid"); print "You ask to withdraw $gain, the banking lady grudgingly hands it over. [b]You now have \${$ir['bankmoney']} in the bank.[/b] [url='bank.php']> Back[/url]"; } } $h->endpage(); ?>   the sql i ran   ALTER TABLE users ADD frozen INT(11) NOT NULL DEFAULT 0
  11. Re: [mccode v2] SafeHouse I have fixed the problem myself, so for anyone wanting to make it so players can't commit crimes, travel or use the gym, put the following code under include "globals.php"; in your gym.php / travel.php & criminal.php.   if($ir['safehouse'] > 0) { die("You are in a safehouse, how can you travel?"); }   You could put it on any page you don't want your users to access while in the safehouse.
  12. Re: [mccode v2] Enhanced Hall of fame COMPLETED! I get Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in halloffame.php on line 145 It has to do with the bail & busts but i want these in, how do i go about installing them also i would like to install jail breaks.
  13. Re: [mccode v2] SafeHouse I have installed this mod and looks great, but one problem.... When you are in the safehouse, you are still able to travel and Commit Crimes... what am i missing? Cheers, Marzy
  14. Re: [mccode v2] House Images Works 100% :-)
  15. Re: [mccode v2] House Images Thx illusions.... That has fixed it! Images are viewable....
  16. When i try and add a new item or edit an item i get an error. The error below is from trying to edit an item... QUERY ERROR: Column count doesn't match value count at row 1 Query was INSERT INTO items VALUES('12',7,'Bottle of Rum','Gains you brave but loses energy',100,10,1, '1', 'a:4:{s:4:\"stat\";s:5:\"brave\";s:3:\"dir\";s:3:\"pos\";s:8:\"inc_type\";s:6:\"figure\";s:10:\"inc_amount\";i:10;}', '1', 'a:4:{s:4:\"stat\";s:6:\"energy\";s:3:\"dir\";s:3:\"neg\";s:8:\"inc_type\";s:7:\"percent\";s:10:\"inc_amount\";i:50;}', '0', 'a:4:{s:4:\"stat\";s:6:\"energy\";s:3:\"dir\";s:3:\"pos\";s:8:\"inc_type\";s:6:\"figure\";s:10:\"inc_amount\";i:0;}', 0, 0) Can someting shed some light on what could cause this? Cheers.
  17. Re: [mccode v1] Chests I have added this to my streets.... You see a small item on the ground, and decide to pick it up... Congratulations you found 1 key.? (Hint, maybe you need to be at a certain level to use this key?) I have it a level 15 but you don't have to do this. Simply add a new chance to your streets, i just added this under chance 9 and then changed to rest to suit. IE: Chance 10, 11, 12 and so on... if ($chance == 10) { print "You see a small item on the ground, and decide to pick it up... Congratulations you found 1 key. (Hint, maybe you need to be at a certain level to use this key?)"; $db->query("UPDATE `users` SET `keys` = `keys` + '1' WHERE `userid` = '$ir[userid]'"); } Works good and no need to add a day cron.
  18. Re: [mccode v2] House Images Never mind fix the last issue but still cant see images
  19. Re: [mccode v2] House Images Since adding this mod i now get this error when i try add a new house..... QUERY ERROR: Column count doesn't match value count at row 1 Query was INSERT INTO houses VALUES Any ideas?
  20. Re: [mccode v2] House Images I have it installed and looking good except for the image... I cant see the house images, i have uploaded the straight to the hsepics folder that i created because when i goto upload image in the staff admin i get this error - Error: This script requires an action. Any ideas? Thanks
  21. Re: [mccode v2] Club Mod (my version) Another Excellent mod by War_Hero.... You are the man! Keep it up mate!
  22. Re: [mccode v2] My Orginization & My Production When i buy and troop it says... You have purchased 1 bodyguards for $25000. Troop Stats: Balance: Hapiness: / Sacred Hangout: Total Troops: 0 Total troops is 0??? shouldn't it be 1? Then when i click on send then home it does this, QUERY ERROR: Unknown column 'tshapiness' in 'field list' Query was UPDATE users SET tshapiness='3' WHERE userid=1 Same with send them on vacation QUERY ERROR: Unknown column 'tshapiness' in 'field list' Query was UPDATE users SET tshapiness='5' WHERE userid=1
  23. Re: [mccodes V2] Bounty Hunter Game Fantastic Mod!!! Working 100%... Thx War_Hero for all your help.
  24. Re: [mccodes V2] Bounty Hunter Game Sorry that didn't help :-( ... the location was City Center... I really wont it to work, its an excellent mod idea!
  25. Re: [mccodes V2] Bounty Hunter Game It was search party 1, not sure of the location... i will replace the code and let you know. cheers!
×
×
  • Create New...