shaved92bravada Posted December 18, 2008 Share Posted December 18, 2008 I have seen a request for this and I am not sure if its been made or not. So I went ahead and made it anyway. Its pretty simple over all, just thought it would be a nice addition. As always if ya don't like it or the way I did it then ya don't have to use it. If ya like it then you are more than welcome to use it. Everything has been tested except for the create new crime functions. only because I don't need anymore crimes at the moment. I am sure it will work though. If you have any problems feel free to post them here and I will gladly help. I know its not the prettiest of programming but hey I am still learning. The SQL You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. open criminal.php find You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. add this below You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Now for the part that shows it find this You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. replace with this You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. find this You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. replace with this You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Now open docrime.php find You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. replace with this You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. That will take care of not being able to do the crime if you don't have that item. Now for the staff_crimes open staff_crimes.php and replace functions: new_crime_form() , new_crime_submit() , edit_crime_begin() , edit_crime_form() , edit_crime_sub() with whats below. I found it easier just to post it this way rather than each individual edit to the 4 required functions. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote Link to comment Share on other sites More sharing options...
zbirc3 Posted December 18, 2008 Share Posted December 18, 2008 Re: [mccode V2] Item needed to perform crime. +1. Testing on my game now. EDIT: Sorry, it is not working for me. :( Still +1'ed you, though. Quote Link to comment Share on other sites More sharing options...
shaved92bravada Posted December 18, 2008 Author Share Posted December 18, 2008 Re: [mccode V2] Item needed to perform crime. Thanks let me know if there are any bugs or anything wrong. I did this pretty quickly in an effort to get it done and posted. Like I said I tested it on mine all except for the create crime functions and it all seemed to work pretty well. Quote Link to comment Share on other sites More sharing options...
MyGunWars Posted December 18, 2008 Share Posted December 18, 2008 Re: [mccode V2] Item needed to perform crime. On the SQL is theres a 1 is that right ??? Quote Link to comment Share on other sites More sharing options...
shaved92bravada Posted December 18, 2008 Author Share Posted December 18, 2008 Re: [mccode V2] Item needed to perform crime. No it wasn't right tyvm for pointing that out. That was the one for a lil "sumfink" else I am work in lol it is correct now though. Quote Link to comment Share on other sites More sharing options...
shaved92bravada Posted December 19, 2008 Author Share Posted December 19, 2008 Re: [mccode V2] Item needed to perform crime. well I guess that is a good sign lol. Not really any posts about bugs or it not working..... if ya like it and are using it let me know how you like it as I got some more ideas in mind for some simple mods. Quote Link to comment Share on other sites More sharing options...
bob324 Posted December 19, 2008 Share Posted December 19, 2008 Re: [mccode V2] Item needed to perform crime. Nice, ive been meaning to get round to doing this for ages. will give it a go later and let you know. thanks +1 Quote Link to comment Share on other sites More sharing options...
Blackdogg Posted April 22, 2009 Share Posted April 22, 2009 Re: [mccode v2] Item needed to perform crime. Well i know this is an old mod but ive just installed it and id like to show my appreciation for the coder if he is still around Thanks mate i love it Quote Link to comment Share on other sites More sharing options...
ShizzleNizzle Posted April 23, 2009 Share Posted April 23, 2009 Re: [mccode v2] Item needed to perform crime. $q=mysql_query("SELECT * FROM crimes WHERE crimeID={$_GET['c']}",$c); $r=mysql_fetch_array($q); if($ir['brave'] < $r['crimeBRAVE']) { print "You do not have enough Brave to perform this crime."; } else { I've just tried it out. It's just this bit that's bugging me it alway's say's invalid item even when its set to None EDIT:Works when there is an item just not when its set to None :S Any help around lol Quote Link to comment Share on other sites More sharing options...
ShizzleNizzle Posted April 24, 2009 Share Posted April 24, 2009 Re: [mccode v2] Item needed to perform crime. Can anybody help? I'll pay $5 for it. Should'nt be too hard to do should it? Quote Link to comment Share on other sites More sharing options...
Uridium Posted April 24, 2009 Share Posted April 24, 2009 Re: [mccode v2] Item needed to perform crime. Can anybody help? I'll pay $5 for it. Should'nt be too hard to do should it? I dont want paying for the help but whats your website Quote Link to comment Share on other sites More sharing options...
shrek1609 Posted April 24, 2009 Share Posted April 24, 2009 Re: [mccode v2] Item needed to perform crime. $q=mysql_query("SELECT * FROM crimes WHERE crimeID={$_GET['c']}",$c); $r=mysql_fetch_array($q); if($ir['brave'] < $r['crimeBRAVE']) { print "You do not have enough Brave to perform this crime."; } else { I've just tried it out. It's just this bit that's bugging me it alway's say's invalid item even when its set to None EDIT:Works when there is an item just not when its set to None :S Any help around lol typo this bit of code... You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. should be You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. $n=$db->fetch_row($qi); was $n=$db->fetch_row($qn); so it was trying to fetch something that hadn't been declared hence erroring out with saying no item Quote Link to comment Share on other sites More sharing options...
ShizzleNizzle Posted April 24, 2009 Share Posted April 24, 2009 Re: [mccode v2] Item needed to perform crime. Thanks shrek1609! The problem im talking about is that if i want to have a crime that doesnt need an item it wont let me. Note: works fine with an item Ill set it as have "none" in the DB and it says i dont have the required item :S Ive had a stab at this myself but cant figure it out. Quote Link to comment Share on other sites More sharing options...
shrek1609 Posted April 24, 2009 Share Posted April 24, 2009 Re: [mccode v2] Item needed to perform crime. ok not tested this but just from reading through the code appears it will only work if an item is needed for the crime to be done... try this should fix it, as long as you set the crimeITEM as 0 in database when you don't want an item needed for the crime... You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. that should work... :) Quote Link to comment Share on other sites More sharing options...
castle Posted April 25, 2009 Share Posted April 25, 2009 Re: [mccode v2] Item needed to perform crime. syntax error, unexpected '>' docrime.php on line 20 line 20 is: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote Link to comment Share on other sites More sharing options...
tobatz Posted April 25, 2009 Share Posted April 25, 2009 Re: [mccode v2] Item needed to perform crime. try this... if ($r['crimeITEM'] > 0 && $n['inv_itemid'] != $r['crimeITEM']) :wink: Quote Link to comment Share on other sites More sharing options...
Mike09 Posted April 25, 2009 Share Posted April 25, 2009 Re: [mccode v2] Item needed to perform crime. syntax error, unexpected '>' docrime.php on line 20 line 20 is: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. change to You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote Link to comment Share on other sites More sharing options...
Mike09 Posted April 25, 2009 Share Posted April 25, 2009 Re: [mccode v2] Item needed to perform crime. try this... if ($r['crimeITEM'] > 0 && $n['inv_itemid'] != $r['crimeITEM']) :wink: ahh didn't see your post lol Quote Link to comment Share on other sites More sharing options...
castle Posted April 25, 2009 Share Posted April 25, 2009 Re: [mccode v2] Item needed to perform crime. that worked except back to the message you don't have the required item even if you do and your brave can go into the negative Quote Link to comment Share on other sites More sharing options...
Danny696 Posted April 25, 2009 Share Posted April 25, 2009 Re: [mccode v2] Item needed to perform crime. i love this idea keep it up Quote Link to comment Share on other sites More sharing options...
BludClart Posted October 27, 2009 Share Posted October 27, 2009 RE: Re: [mccode v2] Item needed to perform crime. try this... if ($r['crimeITEM'] > 0 && $n['inv_itemid'] != $r['crimeITEM']) :wink: ahh didn't see your post lol This WILL fix it guys ^^ im glad i could help ;) You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote Link to comment Share on other sites More sharing options...
girardz Posted October 28, 2009 Share Posted October 28, 2009 Not a big deal here but the original post had: open criminal.php find You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. you will probably have <td colspan='3' class='c'> you need to change the 3 to a 4 to get it to display right. Quote Link to comment Share on other sites More sharing options...
dj_rive Posted December 4, 2009 Share Posted December 4, 2009 RE: Re: [mccode v2] Item needed to perform crime. The item stays in your inventory after you use it. Seems kid of pointless if you can use a bomb as many times as you want. Quote Link to comment Share on other sites More sharing options...
shaved92bravada Posted December 5, 2009 Author Share Posted December 5, 2009 It wasn't created in order to "use" an item. It was just created to where you would have to have that certain item in your inventory. Script can be altered in order to "use" the item but then someone would have to get that certain item each time they wanted to do that crime. I haven't been around in a while but I am starting work on created or modifying my current mods. Quote Link to comment Share on other sites More sharing options...
dj_rive Posted December 5, 2009 Share Posted December 5, 2009 Its a good mod, and I like the idea, but I'm trying to develop a game thats a little more difficult, so people can't level up so quickly. 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.