Jump to content
MakeWebGames

Recommended Posts

Posted

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,

Posted

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!

Posted

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!

Posted

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?

Posted

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!

Posted

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

Posted

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!");}

Posted

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

Posted

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

Posted

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

Posted

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

Posted

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

Posted

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

Posted

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...

Posted

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'>";}

}

Posted

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

Posted

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...