Jump to content
MakeWebGames

CraigF

Members
  • Posts

    597
  • Joined

  • Last visited

    Never

Everything posted by CraigF

  1. Re: Sell Your Gang VR1 Works perfect, nice one
  2. CraigF

    PHP Question

    Re: PHP Question   lmao! Yeah, Where I am now, I now use a good laptop instead of a old computer and I sit on my bed and not a uncomfortable chair that does my back in because I sit on it till early hours in the morning! :P
  3. CraigF

    PHP Question

    Re: PHP Question   hahahaha :P
  4. CraigF

    PHP Question

    Re: PHP Question I personally learnt PHP by opening a game, coding for it, looking at code (such as mccodes and what other people posted), It is much easier to learn by looking at a code if you know what the code does and can see it which is why opening a game and coding for it was great for me, I then developed my php by learning C# at college which helped me out alot because I learnt other statements etc which are actually the same as php :)
  5. Re: [TGM] Federal Jail Reporting System [TGM]   Get a life kid, I have seen Cronus on these forums since I can remember and as you can see I have been on these forum a long time, I have never seen someone unhappy about his service and he seems a pretty decent guy. Don't just flame for the sake of it fool
  6. Re: exp bar goes over 100%? I havent looked at v1 codes for a while so I couldn't help there my friend, I would need to know the formular etc
  7. Re: exp bar goes over 100%? an if statement which checks if the user exp is more than 100% and if it is you add 1 to their level and reset the exp :)
  8. Re: [v1][mccodes] Gang Decline Message haha thanks, as you can tell I copied and edited my Welcome Message =] Thanks
  9. Okay, I haven't coded PHP for a while but this should work fine (-crosses fingers-) I was reading over my old posts and came across someone asking for a Gang Decline Message on my "Gang Welcome Message" mod. (http://criminalexistence.com/ceforums/i ... pic=5246.0) So here it is: Basicly, When someones application is declined, the decline message that the gang PRESIDENT edits, so enjoy! Find in yourgang.php: case "desc": gang_staff_desc(); break; add under: case "dmsg": gang_staff_dmsg(); break; then find: [url='yourgang.php?action=staff&act2=massmailer']Mass Mail Gang[/url] add after [url='yourgang.php?action=staff&act2=wmsg']Decline Message[/url] then find: event_add($appdata['appUSER'],"Your application to join the {$gangdata['gangNAME']} gang was declined",$c); replace with event_add($appdata['appUSER'],"{$gangdata['gangDMSG']}",$c); then find function gang_staff_desc() { global $ir,$c,$userid,$gangdata; if($gangdata['gangPRESIDENT'] == $userid || $userid==1) { if(isset($_POST['subm'])) { $_POST['vp']=str_replace(array("<", ">", "\n"), array("<", ">", " "), $_POST['vp']); mysql_query("UPDATE gangs SET gangDESC='{$_POST['vp']}' WHERE gangID={$gangdata['gangID']}",$c); print "Gang description changed! [url='yourgang.php?action=staff']> Back[/url]"; } else { print "Current Description: {$gangdata['gangDESC']} <form action='yourgang.php?action=staff&act2=desc' method='post'> Enter the new description. <input type='hidden' name='subm' value='submit' /> Desc: <textarea name='vp' cols='40' rows='7'></textarea> <input type='submit' value='Change' /></form>"; } } } add under: function gang_staff_dmsg() { global $ir,$c,$userid,$gangdata; if($gangdata['gangPRESIDENT'] == $userid || $userid==1) { if(isset($_POST['subm'])) { $_POST['vp']=str_replace(array("<", ">", "\n"), array("<", ">", " "), $_POST['vp']); mysql_query("UPDATE gangs SET gangDMSG='{$_POST['vp']}' WHERE gangID={$gangdata['gangID']}",$c); print "Gang Decline Message Changed! [url='yourgang.php?action=staff']> Back[/url]"; } else { print "Current Decline Message: {$gangdata['gangDMSG']} <form action='yourgang.php?action=staff&act2=dmsg' method='post'> Enter the new message. <input type='hidden' name='subm' value='submit' /> Desc: <textarea name='vp' cols='40' rows='7'></textarea> <input type='submit' value='Change' /></form>"; } } } then in creategang.php find: mysql_query("INSERT INTO gangs VALUES('','$name','$desc','','',0,0,100,$userid,$userid,5,0,0,'')",$c); and replace with: mysql_query("INSERT INTO gangs VALUES('','$name','$desc','','','','',0,0,100,$userid,$userid,5,0,0,'')",$c); Do this SQL ALTER TABLE `gangs` ADD `gangDMSG` TEXT NOT NULL AFTER `gangDESC` If you use this +1 would be great (or +1 anyway :P) as Some losers thought its cool to put -1 so I don't want anyone getting the wrong impression of me from that karma stuff Thank you, Craig (If it doesn't work I'll edit it if you can tell me whats wrong or even give me the fix but it should be fine I hope)
  10. Re: [mccode] Buy A House With Level Requirements ! You just need to use a mysql code to edit the database and add a collum for levelrequire and then edit the estate.php to only allow/show houses that are for that persons level, I don't have my old codes due to computer crash :( otherwise I would do this for you. I think I might be able to find my codes somewhere on the net from previous websites uploaded or something.
  11. Re: +10 for who ever can fix this Woah woah, was just my opinion.   Shut up little boy, noone likes a kissass. and MrGi, I was messing about so don't get so defensive. Lighten up a bit.
  12. Re: +10 for who ever can fix this   You just wanted them so you can add this mod to your game, obviously! haha
  13. Re: [v1][FREE] Gang Welcome Message Woah, I'm still getting + rep? Thanks guys, appreciated, this is old, I don't even code for a game or anything anymore, I really feel like making another game as my coding has improved so so much and I know that I can make a great game but I don't know if its worth it yet. Are text games still used!? xx
  14. Re: V1 Index.php hahaha ok :)
  15. Re: V1 Index.php they are like the same
  16. Re: [v1] Banner Selector i was making them for triton gaming so i decided to post this one here
  17. Re: [v1] Banner Selector i think you want random banners, i have also put that on the forums so look around for it lol
  18. Re: [v1] Banner Selector everyone selects their own banner from a list of your banners
  19. Re: HOUSE TAX!!!! haha thats alright man
  20. Re: HOUSE TAX!!!!   My point exactly.   I dont do Email Validation codes. And a thankyou would be nice for taking my time to do that code for you man
  21. Re: HOUSE TAX!!!! Well people wont like an event every day man, just leave it.
  22. Re: HOUSE TAX!!!!   Thats more like it. thankyou! I havent coded much for a while, so i dont think i can do that lol. cant you live with it? EDIT: <?php include "mysql.php"; global $c; include "global_func.php"; //House Tax Update $uq=mysql_query("SELECT * FROM users"); $Row=0; while($r=mysql_fetch_array($uq)) { $will = $r['maxwill']; $hq=mysql_query("SELECT * FROM houses WHERE hWILL='{$will}'"); if(mysql_num_rows($hq) == 0) { } $r2=mysql_fetch_array($hq); $ymny=$r['money']+$r['bankmoney']; if($r['bankmoney'] < $r2['hTAX'] AND $r['money'] < $r2['hTAX']) { $money=$r['money']; event_add($r['userid'],"You failed to pay the house tax, so you have lost your house.",$c); mysql_query("UPDATE users SET money=money+{$r2['hPRICE']}, maxwill=100, willmax=100, will=100 WHERE userid={$r['userid']}"); } } if($r['bankmoney'] > $r2['hTAX']) { mysql_query("UPDATE users SET bankmoney=bankmoney-'{$r2['hTAX']}' WHERE userid='{$r['userid']}'"); event_add($r['userid'],"We have taken the house tax from your bank.",$c); } else if($r['money'] > $r2['hTAX']) { mysql_query("UPDATE users SET money=money-'{$r2['hTAX']}' WHERE userid='{$r['userid']}'"); event_add($r['userid'],"We have taken the house tax from your money.",$c); } $Rows++; } ?> Totally there were <?php print($Rows); ?> rows which were executed.   try that, if it doesnt work then tell me the error
  23. Re: HOUSE TAX!!!! no, its adding the money from the hand into the bank and then taking it from the bank. So tax is 5000, in hand they have 3000 and 2000 in bank, it puts the 3000 in the bank and takes it away with the 2000 origionaly in the bank. or if tax is 5000, hand has 6000, bank 2000, it still banks all the hand money and then takes 5000 from the bank. this is the only way i could do it lol also, i dont see any sorry for your rude post
  24. Its simple but does the trick, not tested but there you go! prefrences.php FIND Add under case 'banner': banner_change(); break; case 'banner2': do_banner_change(); break; FIND Add under [url='preferences.php?action=banner']Title Banner Change[/url] Then FIND: Add under function banner_change() { global $ir,$c,$userid,$h; print "Title Banner Change New Title Banner: {$ir['banner']} [b]Current Title Banner:[/b]{$ir['banner']}"; print "</pre> <table width="50%" border="1">[b]Banner Number[/b][b]Banner[/b]1[img=/banners/1.jpg]2[img=/banners/2.jpg]3[img=/banners/3.jpg]4[img=/banners/4.jpg]5[img=/banners/5.jpg]</table>";<br>}<br><br>function do_signature_change()<br>{<br>global $ir,$c,$userid,$h;<br>if($_POST['banner'] == "")<br>{<br>print "You did not enter a banner.<br><br>> [url='preferences.php?action=banner']Back[/url]";<br>}<br>else<br>{<br>mysql_query("UPDATE users SET banner='{$_POST['banner']}' WHERE userid=$userid",$c);<br>print "Title banner changed!";<br>}<br header.php FIND Replace [img=/banners/{$ir[] SQL ALTER TABLE `users` ADD `banner` INT( 11 ) NOT NULL DEFAULT '1'; Now make a folder called banner in your cpanel and put your banners in there called 1.jpg, 2.jpg, 3.jpg, 4.jpg, 5.jpg.
  25. This makes it so every day money is taken from users banks for house tax. you set the tax when you create the house. If a user doesnt have money in their bank then it takes it from the hand, if they dont have it in their hand they lose their house. Run this cron every day: <?php include "mysql.php"; global $c; include "global_func.php"; //House Tax Update $uq=mysql_query("SELECT * FROM users"); $Row=0; while($r=mysql_fetch_array($uq)) { $will = $r['maxwill']; $hq=mysql_query("SELECT * FROM houses WHERE hWILL='{$will}'"); if(mysql_num_rows($hq) == 0) { } $r2=mysql_fetch_array($hq); $ymny=$r['money']+$r['bankmoney']; if($r['bankmoney'] < $r2['hTAX'] AND $r['money'] < $r2['hTAX']) { $money=$r['money']; event_add($r['userid'],"You failed to pay the house tax, so you have lost your house.",$c); mysql_query("UPDATE users SET money=money+{$r2['hPRICE']}, maxwill=100, willmax=100, will=100 WHERE userid={$r['userid']}"); } } if($r['bankmoney'] > $r2['hTAX']) { mysql_query("UPDATE users SET bankmoney=bankmoney-'{$r2['hTAX']}' WHERE userid='{$r['userid']}'"); event_add($r['userid'],"We have taken the house tax from your bank.",$c); } else if($r['money'] > $r2['hTAX']) { mysql_query("UPDATE users SET money=money-'{$r2['hTAX']}' WHERE userid='{$r['userid']}'"); event_add($r['userid'],"We have taken the house tax from your money.",$c); } $Rows++; } ?> Totally there were <?php print($Rows); ?> rows which were executed.   Find: case 'newuser': new_user_form(); break; case 'newusersub': new_user_submit(); break;   Add after: case 'newhouse': new_house(); break; case 'newhousesub': new_house_sub(); break;   Find: $h->endpage(); ?>   Add before: function new_house() { global $ir,$c,$h,$userid; print "Create New House This will create a new house. House Name: House Price: House Will: House Tax: "; } function new_house_sub() { global $ir,$c,$h,$userid; mysql_query("INSERT INTO houses VALUES ('', '{$_POST['hNAME']}', '{$_POST['hPRICE']}', '{$_POST['hWILL']}'), '{$_POST['hTAX']}');", $c); print "House Created"; }   And a link. [[url='admin.php?action=newhouse']Create New House[/url]]   SQL: ALTER TABLE `users` ADD `hTAX` int(11) NOT NULL default '1000';   Not tested as i dont have a game anymore but should work :)
×
×
  • Create New...