ID:175891
 
Some Made Me This Code (I'll Not Say Who) But I Want The Character To Pick Up Ammo And Be Able To Shoot It At Other Characters And Cause Some Damage. Heres The Code

Thanks In Regards

mob/var
bullets=10

mob/verb
Attack()
if(src.bullets<=0)
src<<"You have No bullets"
return
if(src.bullets>=1)
src.bullets-=1
missile(/obj/Bullet,src,src.dir)

obj/Bullet
icon='bullet.dmi'

obj/Ammo
icon='bullet.dmi'
icon_state="Ammo"
var/bullets=10
verb/Ammo()
set src in oview(1)
if(usr.bullets<=0)
src<<"This bullet container is full!"
else
src<<"You pick up the Bullets from the crate!"
src.bullets+=usr.bullets
return