Jump to content
MakeWebGames

Ammo


Guest Sniko`

Recommended Posts

Guest Sniko`

okay this may of been coded before im not sure but ive just coded this MOD and im posting it in for free because i have got loads of thing from CE for free and so this is like me paying back all those people who post in free MODS

shall we begin?

ok here it is

 

First create a file called ammoshop.php and paste this code in it:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

 

Next run this SQL

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

 

Now go to attack.php and find:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

 

Under it add

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

 

now open attackwon.php and find:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

under it add

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

 

Now go to viewuser.php and put this in:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

 

And i think thats all if not PM and ill add it... Oh yea i havent found out if you only have a meele weapon you still cant attack but im sure one of you can fix that.

Link to comment
Share on other sites

  • Replies 66
  • Created
  • Last Reply

Top Posters In This Topic

Re: Ammo [V2]

Someone has made this and calling it ammo is kind of dumb since you attack more than once why does only one ammo go? i'd change it now and make it so it so that it is called a bullet mod and take one bullet per shot and obviously add packs of bullets instead of singles and some more additions for this but I am feeling really lazy atm... :-D

Link to comment
Share on other sites

Guest Sniko`

Re: Ammo [V2]

lol thanks for ya reviews....

to make it reduct a random ammount of bullets each time do you put

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

im kinda newbie at this so be kind if it wrong

Link to comment
Share on other sites

Re: Ammo [V2]

I added it to my site and I think you should make a staff thing in the items where you make a item you can buy ammo for that gun and how much.

Also you forgot to tell them to add some stuff:

Add ammoshop.php to explore.php:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

And I also added how much bullets you have in inventory.php

Find:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

And Replace it with

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

Link to comment
Share on other sites

Re: Ammo [V2]

 

lol thanks for ya reviews....

to make it reduct a random ammount of bullets each time do you put

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

im kinda newbie at this so be kind if it wrong

should be (ignore the <?php and ?> thats just for the color coding to work)

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

Link to comment
Share on other sites

Re: Ammo [V2]

i found a little bug in it ;) when you buy 6 bullets and you buy 6 more then you dont get 6 more you only lose the money then i looked trough the scripts

and thinked i just should pu a + before 6 like this

$db->query("UPDATE users SET money=money-10,ammo=+6 WHERE userid=$userid",$c);

instead off

$db->query("UPDATE users SET money=money-10,ammo=6 WHERE userid=$userid",$c);

but that didnt work :S im preddy new in php so any one got a idea to fix that ??

Link to comment
Share on other sites

Re: Ammo [V2]

 

i found a little bug in it ;) when you buy 6 bullets and you buy 6 more then you dont get 6 more you only lose the money then i looked trough the scripts

and thinked i just should pu a + before 6 like this

$db->query("UPDATE users SET money=money-10,ammo=+6 WHERE userid=$userid",$c);

instead off

$db->query("UPDATE users SET money=money-10,ammo=6 WHERE userid=$userid",$c);

but that didnt work :S im preddy new in php so any one got a idea to fix that ??

simple make it

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

Link to comment
Share on other sites

Re: Ammo [V2]

instead of one bullet per fight how about somthing like this

 

you take a shot at (username) you hit (username) causing him/her (damage) <---- -1 bullet

(there attack would be here)

you take a shot at (username) your buller goes flying past them <---- -1 bullet

(there attack would be here)

you take a shot at (username) your buller goes flying past them <---- -1 bullet

(there attack would be here)

 

basicly each hit you do or miss costs a bullet

Link to comment
Share on other sites

Re: Ammo [V2]

This will enable you to buy ammo for each gun.

Try this.

Run SQL:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

Create ammunition.php:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

In inventory.php find:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

In attack.php 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.

 

Also in attack.php find:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

replace with:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

Change the 4's in this to your item type id for guns.

Link to comment
Share on other sites

  • 1 month later...
  • 5 months later...

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