Guest Posted July 6, 2013 Posted July 6, 2013 Hello, Idea taken from spikereloaded said: i agree, thats why ours doesn't have a major advantage over non donators. Defiantly tricky to get a good balance. back on topic, how about a new crimes system, either graphically or more features eg. rough indicator of whether a player would be likely to succeed or not or something similar. They seem a bit plain as they are. This is my first publicly released modification, pretty simple, it adds crime chances on the crimes page Also adds a title to the images with the written chance %. I know it's dead simple but hey, looks good on the page imo. So now how to do it. criminal.php (Around line 30) Find the query $q2 Replace You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. With You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. criminal.php (Around line 44) Find the table Replace You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. With You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. criminal.php (Around line 46) Find the foreach loop ($crimes as $v) Replace You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. With You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Enjoy :) Quote
Guest Posted July 6, 2013 Posted July 6, 2013 Looks sweet mate, good job! :) No problem, sorry it's such a small mod I was browsing and someone wanted it. Quote
Script47 Posted July 6, 2013 Posted July 6, 2013 No problem, sorry it's such a small mod I was browsing and someone wanted it. Small but quality, would be useful for beginners in games. Quote
spikereloaded Posted July 7, 2013 Posted July 7, 2013 Cheers Ian, just what i wanted, although looking at the code I should have tried a little harder myself to work it out haha. Just an idea aswell, for the percent bars, it may be necessary to set their Max width to 100. Otherwise you may get some extremely long bars depending on your crime success formula's. That was an issue I had but was solved by assigning the images a class and specifying the max width in the css. Thanks again Ian Quote
Guest Posted July 7, 2013 Posted July 7, 2013 Cheers Ian, just what i wanted, although looking at the code I should have tried a little harder myself to work it out haha. Just an idea aswell, for the percent bars, it may be necessary to set their Max width to 100. Otherwise you may get some extremely long bars depending on your crime success formula's. That was an issue I had but was solved by assigning the images a class and specifying the max width in the css. Thanks again Ian I thought as it was a percentage out of 100 so the max width from both bars in total would be 100% Quote
spikereloaded Posted July 8, 2013 Posted July 8, 2013 I suppose this may be the case for most people, but our crime formulas have been changed quite a bit and at the moment some of them are coming out with success rates of over 100%. Not ideal but something we'll look into! Just thought setting a max width would just be a fail safe incase formulas were changed. Quote
Guest Posted July 8, 2013 Posted July 8, 2013 Hmm over 100%? That is surely wrong in itself? I'll whack a max width on it when I get home. Cheers for the report. Quote
KyleMassacre Posted July 8, 2013 Posted July 8, 2013 why not just try: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
SRB Posted July 8, 2013 Posted July 8, 2013 why not just try: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Because that would be the wrong variable to check, since it will be negative if $chance if above 100. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
KyleMassacre Posted July 8, 2013 Posted July 8, 2013 Because that would be the wrong variable to check, since it will be negative if $chance if above 100. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. That makes sense. Oops:o Quote
Raven1992 Posted July 14, 2013 Posted July 14, 2013 does it come with the sql or is useing the same sql as defult on criminal.php Quote
jcvenom Posted July 14, 2013 Posted July 14, 2013 hey I Hello, Idea taken from This is my first publicly released modification, pretty simple, it adds crime chances on the crimes page Also adds a title to the images with the written chance %. I know it's dead simple but hey, looks good on the page imo. So now how to do it. criminal.php (Around line 30) Find the query $q2 Replace You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. With You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. criminal.php (Around line 44) Find the table Replace You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. With You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. criminal.php (Around line 46) Find the foreach loop ($crimes as $v) Replace You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. With You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Enjoy :) Nice mid but that bar doesn't look right Quote
KyleMassacre Posted July 14, 2013 Posted July 14, 2013 if your talking about the title tag it should be fine. I know it looks like the little bar is showing 50% but it was probably just the position on the mouse Quote
Dragon Blade Posted July 14, 2013 Posted July 14, 2013 Great addon Ian! I like it! I actually love it! And Guest, thanks for the other bit! That helped to! Quote
spikereloaded Posted July 14, 2013 Posted July 14, 2013 Because that would be the wrong variable to check, since it will be negative if $chance if above 100. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Nice one...simple and not sure why I didnt think of it before! Quote
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.