Dayo Posted May 23, 2011 Share Posted May 23, 2011 Gangster Legends V1.0.0 Right i have started development on Gangster legends v1.0.0, the V1.0 release will be aimed at doing the folowing. Adding the needed features ie staff panel Updating the HTML Geting rid of the limited features (ie the crimes/locations) Updating the backend script Current Features (V0.75) Crimes Grand Theft Auto Smuggling Black Market Casinos Gangs Bank & Money Transfer Mailbox Friend List Traveling Credit Shop + Credit Auction Forum Referal System Prison + Breakout Probably more :) It is secure to my knoladge I have started development on this but should take a while (like 2-3 months) but if there are any feature requests just post below and if you would like to contribute any modifications i can add just post below and PM me the mod. Later when my site is up and running you will be able to download the script at http://www.glscript.net as well as modifications. We will also provide a simple support system too. (and maby a more advanced paid service too). Demo: http://www.glscript.net/demo/ Quote Link to comment Share on other sites More sharing options...
Dayo Posted May 23, 2011 Author Share Posted May 23, 2011 Done so far Added a few features (bank and property information (free mods by me and jamiee)) Updated the HTML in login/register/forgot password/screenshots Started work on the locations (so you can add/remove locations) Quote Link to comment Share on other sites More sharing options...
DreamCoder Posted May 23, 2011 Share Posted May 23, 2011 Good luck dayo nice to see someone trying to bring updates for GL script :) - Travis Quote Link to comment Share on other sites More sharing options...
Dayo Posted May 25, 2011 Author Share Posted May 25, 2011 (edited) Crimes.php Update crimes.php/_crimes.php code cleaned up (was very fugly/hard to read) (i shrinked the _crimes.php file by 98 Lines (48% smaller!) (you can thurthermore reduce the file by removing the unused line breaks to around 70 lines!)) You can edit aspects of the crime from config.php that include Crime Name Crime success text Crime payout (min/max) Crime Exp (min/max) Crime jail time Crime time (time between you can comit one and another) Edited May 25, 2011 by Dayo Quote Link to comment Share on other sites More sharing options...
Dayo Posted May 25, 2011 Author Share Posted May 25, 2011 Bug Fixes - In the Auto Theft it wouldent let you steal a car and came up with an error saying you couldent steal from a staff member ... this is now fixed - Fixed a small bug in the crimes where after you reached 75% it wouldent let you do the 1st crime If you find any more please tell me via sending a help desk report or emailing me @ [email protected] thanks, Dayo Quote Link to comment Share on other sites More sharing options...
Dominion Posted May 26, 2011 Share Posted May 26, 2011 A few suggestions – 1) Folder stricter e.g. __filname are just includes right? Why not have an includes folder? (General for always included and then a sub folder for those you include now and then). Include all the “always included” with one file making mod creation easier. 2) Hard to read in places download something like netbeans, and use it’s “format” function. Would be quick(ish) and make it a lot easier to understand. Quote Link to comment Share on other sites More sharing options...
Dayo Posted May 26, 2011 Author Share Posted May 26, 2011 1) yea that will be done within the next update 2) Im going throgh file by file and recoding most of it as some of it is just usless here is an example :) Before: if($_POST['crime'] == "1" ){ if (rand(0,100) <= $crime_information[0]) { echo "You were successful in pickpocketing somebody. You received $ ".$payout.",- from the crime"; $suc = "yes"; } else { if (rand(0,3) == "1" ) { echo "You failed to commit the crime."; } else { $jail = "yes"; echo "You failed to commit the crime and the cops caught you."; }// if random jail. }// if random crime. }// crime 1 if($_POST['crime'] == "2" ){ if (rand(0,100) <= $crime_information[1]) { echo "You were successful in robbing a gas station.<br />You received $ ".$payout.",- from the crime"; $suc = "yes"; } else { if (rand(0,3) == "1" ) { echo "You failed to commit the crime."; } else { $jail = "yes"; echo "You failed to commit the crime and the cops caught you."; }// if random jail. }// if random crime. }// crime 2 if($_POST['crime'] == "3" ){ if (rand(0,100) <= $crime_information[2]) { echo "You were successful in robbing a general store. You received $ ".$payout.",- from the crime"; $suc = "yes"; } else { if (rand(0,3) == "1" ) { echo "You failed to commit the crime."; } else { $jail = "yes"; echo "You failed to commit the crime and the cops caught you."; }// if random jail. }// if random crime. }// crime 3 if($_POST['crime'] == "4" ){ if (rand(0,100) <= $crime_information[3]) { echo "You were successful in robbing a federal bank. You received $ ".$payout.",- from the crime"; $suc = "yes"; } else { if (rand(0,3) == "1" ) { echo "You failed to commit the crime."; } else { $jail = "yes"; echo "You failed to commit the crime and the cops caught you."; }// if random jail. }// if random crime. }// crime 4 if($_POST['crime'] == "5" ){ if (rand(0,100) <= $crime_information[4]) { echo "You were successful in robbing a casino. You received $ ".$payout.",- from the crime"; $suc = "yes"; } else { if (rand(0,3) == "1" ) { echo "You failed to commit the crime."; } else { $jail = "yes"; echo "You failed to commit the crime and the cops caught you."; }// if random jail. }// if random crime. }// crime 5 After: if (in_array($_POST['crime'], array(1, 2, 3, 4, 5, 6))) { if (rand(0, 100) <=$crime_information[($_POST['crime']-1)]) { $suc="yes"; echo str_replace('{money}', $payout, $crime_success_text[$_POST['crime']]); } else if (rand(1, 3)==1) { $jail="yes"; echo "You failed to commit the crime and the cops caught you."; } else { echo "You failed to commit the crime."; } } Quote Link to comment Share on other sites More sharing options...
Kieran-R Posted May 26, 2011 Share Posted May 26, 2011 1) yea that will be done within the next update 2) Im going throgh file by file and recoding most of it as some of it is just usless here is an example :) Before: if($_POST['crime'] == "1" ){ if (rand(0,100) <= $crime_information[0]) { echo "You were successful in pickpocketing somebody. You received $ ".$payout.",- from the crime"; $suc = "yes"; } else { if (rand(0,3) == "1" ) { echo "You failed to commit the crime."; } else { $jail = "yes"; echo "You failed to commit the crime and the cops caught you."; }// if random jail. }// if random crime. }// crime 1 if($_POST['crime'] == "2" ){ if (rand(0,100) <= $crime_information[1]) { echo "You were successful in robbing a gas station.<br />You received $ ".$payout.",- from the crime"; $suc = "yes"; } else { if (rand(0,3) == "1" ) { echo "You failed to commit the crime."; } else { $jail = "yes"; echo "You failed to commit the crime and the cops caught you."; }// if random jail. }// if random crime. }// crime 2 if($_POST['crime'] == "3" ){ if (rand(0,100) <= $crime_information[2]) { echo "You were successful in robbing a general store. You received $ ".$payout.",- from the crime"; $suc = "yes"; } else { if (rand(0,3) == "1" ) { echo "You failed to commit the crime."; } else { $jail = "yes"; echo "You failed to commit the crime and the cops caught you."; }// if random jail. }// if random crime. }// crime 3 if($_POST['crime'] == "4" ){ if (rand(0,100) <= $crime_information[3]) { echo "You were successful in robbing a federal bank. You received $ ".$payout.",- from the crime"; $suc = "yes"; } else { if (rand(0,3) == "1" ) { echo "You failed to commit the crime."; } else { $jail = "yes"; echo "You failed to commit the crime and the cops caught you."; }// if random jail. }// if random crime. }// crime 4 if($_POST['crime'] == "5" ){ if (rand(0,100) <= $crime_information[4]) { echo "You were successful in robbing a casino. You received $ ".$payout.",- from the crime"; $suc = "yes"; } else { if (rand(0,3) == "1" ) { echo "You failed to commit the crime."; } else { $jail = "yes"; echo "You failed to commit the crime and the cops caught you."; }// if random jail. }// if random crime. }// crime 5 After: if (in_array($_POST['crime'], array(1, 2, 3, 4, 5, 6))) { if (rand(0, 100) <=$crime_information[($_POST['crime']-1)]) { $suc="yes"; echo str_replace('{money}', $payout, $crime_success_text[$_POST['crime']]); } else if (rand(1, 3)==1) { $jail="yes"; echo "You failed to commit the crime and the cops caught you."; } else { echo "You failed to commit the crime."; } } Can I suggest you layout out your code like this: if (bla == bla) { do this code if (bla == bla) { do this code } else { bla bla } } It may turn out to be more lines of code, but it's definitely more readable, and easy to understand. Quote Link to comment Share on other sites More sharing options...
Dayo Posted May 26, 2011 Author Share Posted May 26, 2011 what space it out a bit with tabs? Quote Link to comment Share on other sites More sharing options...
Dominion Posted May 26, 2011 Share Posted May 26, 2011 As i suggested before use an IDE that tabs for you. <?php if (in_array($_POST['crime'], array(1, 2, 3, 4, 5, 6))) { if (rand(0, 100) <= $crime_information[($_POST['crime'] - 1)]) { $suc = "yes"; echo str_replace('{money}', $payout, $crime_success_text[$_POST['crime']]); } else if (rand(1, 3) == 1) { $jail = "yes"; echo "You failed to commit the crime and the cops caught you."; } else { echo "You failed to commit the crime."; } } ?> ^ done by netbeans for me. On a positive note, well done. Looking very nice considering the file difference there. :) Quote Link to comment Share on other sites More sharing options...
Kieran-R Posted May 26, 2011 Share Posted May 26, 2011 what space it out a bit with tabs? If you would like to put it that way then yes. Having your code spaced out to make it easier to understand can't hurt. :) Quote Link to comment Share on other sites More sharing options...
Dayo Posted May 26, 2011 Author Share Posted May 26, 2011 yea ill go throgh it all before i release it ;) Quote Link to comment Share on other sites More sharing options...
Dayo Posted June 13, 2011 Author Share Posted June 13, 2011 0.8.1 has been released visit glscript.net > updates for information You can now subscribe to GLScript.net, just visit our website and enter your email address Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.