plintu Posted August 11, 2009 Posted August 11, 2009 Hope you guys like this one, it involves a little bit of work but it is a fun little mod and a way for your users to spend their money or you can change it to to crystals if you would like, it might take a couple postings so please don't post until I put it all down. you are going to have to customize the code a little for each page. this mod lets your users hire a sniper they can have someone killed for a price and they can select what page the other user will die on when they visit that page! on top of each page that you want to add to the fun you have to put: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. for each page you have to change the location number and what it says in the even_add write down the number that you give each location, Quote
plintu Posted August 11, 2009 Author Posted August 11, 2009 Re: Hire a sniper! sql's You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. then: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. now create hitman.php: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. notice the option values in my example here that is also the location number that I put on each page! you have to give that location value to those pages! Quote
plintu Posted August 11, 2009 Author Posted August 11, 2009 Re: Hire a sniper! create a file called "redscreen.php": You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. go to: http://plintu.com/sniped.gif right click and copy the blinking image and put that in your images folder! Well that is it I hope you guys like it! This also allows the users to place multiple hits on people in multiple locations, they can get sniped when they visit the gym then they can get sniped when they visit home page or what ever! the hitman.php page is a little plain you can spice it up by adding an image of a sniper or whatever, all it is, is just the form to hire the sniper! Quote
gideon prewett Posted August 11, 2009 Posted August 11, 2009 Re: Hire a sniper! this looks like a good adition to ce and also a good adaption to the normal boring hitman mods u find out there i havent looked at it properly yet but +1 for posting somthing uniqe Quote
weewooz Posted August 11, 2009 Posted August 11, 2009 Re: Hire a sniper! explain in abit more detail bout this location numner you mean diffo number for each diffo page you add it or are we going on the location number of the city id your in here? Quote
plintu Posted August 11, 2009 Author Posted August 11, 2009 Re: Hire a sniper! yes, you need to give each different location a new number so on my index page I gave it a number one so in the index page it should say" if($rows['location']=='1'){ " then in my inventory: if($rows['location']=='2'){ then in my garage: if($rows['location']=='3'){ and so on then on hitman.php you give it those same values: <option selected value='1'>Home Page</option> <option value='2'>Inventory</option> <option value='3'>Garage</option> the location number in this mod has nothing to do with the mccodes city location number! also where it says" You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. make sure this location number is the same as the other one you put on that page! so if it is index page it would be 1 if it was inventory page it would be 2 etc also I just updated this file so that in the event add it tells the user who put the hit on them! Quote
weewooz Posted August 11, 2009 Posted August 11, 2009 Re: Hire a sniper! ok ty well scanning through the code looks great something diffo to the other boaring hitman mods ill give it a while see what it runs like ty mate keep up the good work Quote
plintu Posted August 11, 2009 Author Posted August 11, 2009 Re: Hire a sniper! I forgot one thing! I just updated it! but if you haven't yet just under include globals add this: if($ir['money']<5000000){ die("You do not have enough money to be here. You need at least 5 mill!");} Quote
weewooz Posted August 11, 2009 Posted August 11, 2009 Re: Hire a sniper! ok ty but maybe update the first code so users dont have to put bit by bit togther mate easyer that way but still looks good im trying this now but the code looks ok Quote
weewooz Posted August 11, 2009 Posted August 11, 2009 Re: Hire a sniper! also the exp gained in this is just 500% right not 500 in exp which mean upgrade by 5 levels? Quote
plintu Posted August 11, 2009 Author Posted August 11, 2009 Re: Hire a sniper! well in my game 500 exp isn't 5 levels so you guys might have to change that to a lower number I forgot about regular mccodes levels so you can lower those numbers :D Quote
weewooz Posted August 11, 2009 Posted August 11, 2009 Re: Hire a sniper! so whats 500 exp in your game what would you gaain in exp just wanna dont want to change the code alot as its your work but also wanna know what you get Quote
weewooz Posted August 11, 2009 Posted August 11, 2009 Re: Hire a sniper! ok just tested having this does take you up by 5 levels so be warned you will need lower this if your using vrs 2 standed and no changes to the exp if your game Quote
weewooz Posted August 11, 2009 Posted August 11, 2009 Re: Hire a sniper! also you have changed ya game alot hence this error QUERY ERROR: Unknown column 'stamina' in 'field list' Query was UPDATE users SET hospital = '10', hp='0', sniped=sniped-1, hospreason='sniped', stamina=stamina/2, energy=energy/2 WHERE userid = 2 thats the sniped person. people wont have the stamina in there users table mate so alot of people most are guna get errors Quote
weewooz Posted August 11, 2009 Posted August 11, 2009 Re: Hire a sniper! stamina been what in normal mccodes 2 datbase Quote
Cod Phoenix Posted August 11, 2009 Posted August 11, 2009 Re: Hire a sniper! You should use array in this case. Also adding the code to ever page would be a pain in the ass. Other that good work. Quote
weewooz Posted August 11, 2009 Posted August 11, 2009 Re: Hire a sniper! i know the array would work in some cases but trying to help him out here so he knows what errors are coming out here its his scipt and good one at that so i want to help him Quote
plintu Posted August 11, 2009 Author Posted August 11, 2009 Re: Hire a sniper! well I am at level 10 in my game and need 2428 Exp to level. but it keeps increasing with each level, so I just added the 2428 exp to go to level 11 and now I need 3801 exp to level! so you might need to judge what amount of exp you want to give the users of your game for doing it! if you want to do a percent then up somewhere under include globals.php add: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. (this would be for 10 percent) then change: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. to: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. and change: You also just gained 500 exp for taking... to: You also just gained $need exp for taking... Quote
weewooz Posted August 11, 2009 Posted August 11, 2009 Re: Hire a sniper! ok as he as stanmia if your using normal mccodes vr2 with will add this to every page you want to have fun on if($ir['sniped']>'0'){ $result=mysql_query("select * from sniper WHERE userid=$userid && location='1'"); $rows=mysql_fetch_array($result); if($rows['location']=='1'){ event_add($ir['userid'],"A sniper was hired to take you out, by {$rows['by']}! He got you the second you visited your home page!", $c); $db->query("UPDATE users SET hospital = '10', hp='0', sniped=sniped-1, hospreason='sniped', will=will/2, energy=energy/2 WHERE userid = $userid"); $db->query("DELETE FROM sniper WHERE userid = $userid && location ='1'"); print"<meta http-equiv='refresh' content='2;url=hospital.php'>";} } Quote
weewooz Posted August 11, 2009 Posted August 11, 2009 Re: Hire a sniper! hope you dint me posting that plintu just people using will on mccodes it will keep erroring out mate nice work keep it up still testing this mod tho :) so i posted that for people using will on there game Quote
plintu Posted August 11, 2009 Author Posted August 11, 2009 Re: Hire a sniper! that is cool I forgot about that part when I make the mod in my game I have to change it up for everyone here and sometimes I forget :D Quote
weewooz Posted August 11, 2009 Posted August 11, 2009 Re: Hire a sniper! no problem nice mod well done if catch anything else or any bugs am ok post fixed parts of it as im going through it now mate 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.