Raised This Month: $ Target: $400
 0% 

Adding ammo slots


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-05-2007 , 05:16   Re: Adding ammo slots
Reply With Quote #1

Before to make the plugin i tried to log this message successfuly, so i guess the args can be set.
Code:
L 10/31/2007 - 20:53:42: Log file started (file "cstrike\addons\amxmodx\logs\WeaponList.log") (game "cstrike") (amx "1.8.0.3660")
L 10/31/2007 - 20:53:42: .     weapon_p228
L 10/31/2007 - 20:53:42: PrimaryAmmoID = 9
L 10/31/2007 - 20:53:42: PrimaryAmmoMaxAmount = 52
L 10/31/2007 - 20:53:42: SecondaryAmmoID = -1
L 10/31/2007 - 20:53:42: SecondaryAmmoMaxAmount = -1
L 10/31/2007 - 20:53:42: SlotID = 1
L 10/31/2007 - 20:53:42: NumberInSlot = 3
L 10/31/2007 - 20:53:42: WeaponID = 1
L 10/31/2007 - 20:53:42: Flags = 0
L 10/31/2007 - 20:53:42: 
L 10/31/2007 - 20:53:42: .     weapon_scout
L 10/31/2007 - 20:53:42: PrimaryAmmoID = 2
L 10/31/2007 - 20:53:42: PrimaryAmmoMaxAmount = 90
L 10/31/2007 - 20:53:42: SecondaryAmmoID = -1
L 10/31/2007 - 20:53:42: SecondaryAmmoMaxAmount = -1
L 10/31/2007 - 20:53:42: SlotID = 0
L 10/31/2007 - 20:53:42: NumberInSlot = 9
L 10/31/2007 - 20:53:42: WeaponID = 3
L 10/31/2007 - 20:53:42: Flags = 0
L 10/31/2007 - 20:53:42: 
L 10/31/2007 - 20:53:42: .     weapon_hegrenade
L 10/31/2007 - 20:53:42: PrimaryAmmoID = 12
L 10/31/2007 - 20:53:42: PrimaryAmmoMaxAmount = 1
L 10/31/2007 - 20:53:42: SecondaryAmmoID = -1
L 10/31/2007 - 20:53:42: SecondaryAmmoMaxAmount = -1
L 10/31/2007 - 20:53:42: SlotID = 3
L 10/31/2007 - 20:53:42: NumberInSlot = 1
L 10/31/2007 - 20:53:42: WeaponID = 4
L 10/31/2007 - 20:53:42: Flags = 24
L 10/31/2007 - 20:53:42: 
L 10/31/2007 - 20:53:42: .     weapon_xm1014
L 10/31/2007 - 20:53:42: PrimaryAmmoID = 5
L 10/31/2007 - 20:53:42: PrimaryAmmoMaxAmount = 32
L 10/31/2007 - 20:53:42: SecondaryAmmoID = -1
L 10/31/2007 - 20:53:42: SecondaryAmmoMaxAmount = -1
L 10/31/2007 - 20:53:42: SlotID = 0
L 10/31/2007 - 20:53:42: NumberInSlot = 12
L 10/31/2007 - 20:53:42: WeaponID = 5
L 10/31/2007 - 20:53:42: Flags = 0
L 10/31/2007 - 20:53:42: 
L 10/31/2007 - 20:53:42: .     weapon_c4
L 10/31/2007 - 20:53:42: PrimaryAmmoID = 14
L 10/31/2007 - 20:53:42: PrimaryAmmoMaxAmount = 1
L 10/31/2007 - 20:53:42: SecondaryAmmoID = -1
L 10/31/2007 - 20:53:42: SecondaryAmmoMaxAmount = -1
L 10/31/2007 - 20:53:42: SlotID = 4
L 10/31/2007 - 20:53:42: NumberInSlot = 3
L 10/31/2007 - 20:53:42: WeaponID = 6
L 10/31/2007 - 20:53:42: Flags = 24
L 10/31/2007 - 20:53:42: 
L 10/31/2007 - 20:53:42: .     weapon_mac10
L 10/31/2007 - 20:53:42: PrimaryAmmoID = 6
L 10/31/2007 - 20:53:42: PrimaryAmmoMaxAmount = 100
L 10/31/2007 - 20:53:42: SecondaryAmmoID = -1
L 10/31/2007 - 20:53:42: SecondaryAmmoMaxAmount = -1
L 10/31/2007 - 20:53:42: SlotID = 0
L 10/31/2007 - 20:53:42: NumberInSlot = 13
L 10/31/2007 - 20:53:42: WeaponID = 7
L 10/31/2007 - 20:53:42: Flags = 0
L 10/31/2007 - 20:53:42: 
L 10/31/2007 - 20:53:42: .     weapon_aug
L 10/31/2007 - 20:53:42: PrimaryAmmoID = 4
L 10/31/2007 - 20:53:42: PrimaryAmmoMaxAmount = 90
L 10/31/2007 - 20:53:42: SecondaryAmmoID = -1
L 10/31/2007 - 20:53:42: SecondaryAmmoMaxAmount = -1
L 10/31/2007 - 20:53:42: SlotID = 0
L 10/31/2007 - 20:53:42: NumberInSlot = 14
L 10/31/2007 - 20:53:42: WeaponID = 8
L 10/31/2007 - 20:53:42: Flags = 0
L 10/31/2007 - 20:53:42: 
L 10/31/2007 - 20:53:42: .     weapon_smokegrenade
L 10/31/2007 - 20:53:42: PrimaryAmmoID = 13
L 10/31/2007 - 20:53:42: PrimaryAmmoMaxAmount = 1
L 10/31/2007 - 20:53:42: SecondaryAmmoID = -1
L 10/31/2007 - 20:53:42: SecondaryAmmoMaxAmount = -1
L 10/31/2007 - 20:53:42: SlotID = 3
L 10/31/2007 - 20:53:42: NumberInSlot = 3
L 10/31/2007 - 20:53:42: WeaponID = 9
L 10/31/2007 - 20:53:42: Flags = 24
L 10/31/2007 - 20:53:42: 
L 10/31/2007 - 20:53:42: .     weapon_elite
L 10/31/2007 - 20:53:42: PrimaryAmmoID = 10
L 10/31/2007 - 20:53:42: PrimaryAmmoMaxAmount = 120
L 10/31/2007 - 20:53:42: SecondaryAmmoID = -1
L 10/31/2007 - 20:53:42: SecondaryAmmoMaxAmount = -1
L 10/31/2007 - 20:53:42: SlotID = 1
L 10/31/2007 - 20:53:42: NumberInSlot = 5
L 10/31/2007 - 20:53:42: WeaponID = 10
L 10/31/2007 - 20:53:42: Flags = 0
L 10/31/2007 - 20:53:42: 
L 10/31/2007 - 20:53:42: .     weapon_fiveseven
L 10/31/2007 - 20:53:42: PrimaryAmmoID = 7
L 10/31/2007 - 20:53:42: PrimaryAmmoMaxAmount = 100
L 10/31/2007 - 20:53:42: SecondaryAmmoID = -1
L 10/31/2007 - 20:53:42: SecondaryAmmoMaxAmount = -1
L 10/31/2007 - 20:53:42: SlotID = 1
L 10/31/2007 - 20:53:42: NumberInSlot = 6
L 10/31/2007 - 20:53:42: WeaponID = 11
L 10/31/2007 - 20:53:42: Flags = 0
L 10/31/2007 - 20:53:42: 
L 10/31/2007 - 20:53:42: .     weapon_ump45
L 10/31/2007 - 20:53:42: PrimaryAmmoID = 6
L 10/31/2007 - 20:53:42: PrimaryAmmoMaxAmount = 100
L 10/31/2007 - 20:53:42: SecondaryAmmoID = -1
L 10/31/2007 - 20:53:42: SecondaryAmmoMaxAmount = -1
L 10/31/2007 - 20:53:42: SlotID = 0
L 10/31/2007 - 20:53:42: NumberInSlot = 15
L 10/31/2007 - 20:53:42: WeaponID = 12
L 10/31/2007 - 20:53:42: Flags = 0
L 10/31/2007 - 20:53:42: 
L 10/31/2007 - 20:53:42: .     weapon_sg550
L 10/31/2007 - 20:53:42: PrimaryAmmoID = 4
L 10/31/2007 - 20:53:42: PrimaryAmmoMaxAmount = 90
L 10/31/2007 - 20:53:42: SecondaryAmmoID = -1
L 10/31/2007 - 20:53:42: SecondaryAmmoMaxAmount = -1
L 10/31/2007 - 20:53:42: SlotID = 0
L 10/31/2007 - 20:53:42: NumberInSlot = 16
L 10/31/2007 - 20:53:42: WeaponID = 13
L 10/31/2007 - 20:53:42: Flags = 0
L 10/31/2007 - 20:53:42: 
L 10/31/2007 - 20:53:42: .     weapon_galil
L 10/31/2007 - 20:53:42: PrimaryAmmoID = 4
L 10/31/2007 - 20:53:42: PrimaryAmmoMaxAmount = 90
L 10/31/2007 - 20:53:42: SecondaryAmmoID = -1
L 10/31/2007 - 20:53:42: SecondaryAmmoMaxAmount = -1
L 10/31/2007 - 20:53:42: SlotID = 0
L 10/31/2007 - 20:53:42: NumberInSlot = 17
L 10/31/2007 - 20:53:42: WeaponID = 14
L 10/31/2007 - 20:53:42: Flags = 0
L 10/31/2007 - 20:53:42: 
L 10/31/2007 - 20:53:42: .     weapon_famas
L 10/31/2007 - 20:53:42: PrimaryAmmoID = 4
L 10/31/2007 - 20:53:42: PrimaryAmmoMaxAmount = 90
L 10/31/2007 - 20:53:42: SecondaryAmmoID = -1
L 10/31/2007 - 20:53:42: SecondaryAmmoMaxAmount = -1
L 10/31/2007 - 20:53:42: SlotID = 0
L 10/31/2007 - 20:53:42: NumberInSlot = 18
L 10/31/2007 - 20:53:42: WeaponID = 15
L 10/31/2007 - 20:53:42: Flags = 0
L 10/31/2007 - 20:53:42: 
L 10/31/2007 - 20:53:42: .     weapon_usp
L 10/31/2007 - 20:53:42: PrimaryAmmoID = 6
L 10/31/2007 - 20:53:42: PrimaryAmmoMaxAmount = 100
L 10/31/2007 - 20:53:42: SecondaryAmmoID = -1
L 10/31/2007 - 20:53:42: SecondaryAmmoMaxAmount = -1
L 10/31/2007 - 20:53:42: SlotID = 1
L 10/31/2007 - 20:53:42: NumberInSlot = 4
L 10/31/2007 - 20:53:42: WeaponID = 16
L 10/31/2007 - 20:53:42: Flags = 0
L 10/31/2007 - 20:53:42: 
L 10/31/2007 - 20:53:42: .     weapon_glock18
L 10/31/2007 - 20:53:42: PrimaryAmmoID = 10
L 10/31/2007 - 20:53:42: PrimaryAmmoMaxAmount = 120
L 10/31/2007 - 20:53:42: SecondaryAmmoID = -1
L 10/31/2007 - 20:53:42: SecondaryAmmoMaxAmount = -1
L 10/31/2007 - 20:53:42: SlotID = 1
L 10/31/2007 - 20:53:42: NumberInSlot = 2
L 10/31/2007 - 20:53:42: WeaponID = 17
L 10/31/2007 - 20:53:42: Flags = 0
L 10/31/2007 - 20:53:42: 
L 10/31/2007 - 20:53:42: .     weapon_awp
L 10/31/2007 - 20:53:42: PrimaryAmmoID = 1
L 10/31/2007 - 20:53:42: PrimaryAmmoMaxAmount = 30
L 10/31/2007 - 20:53:42: SecondaryAmmoID = -1
L 10/31/2007 - 20:53:42: SecondaryAmmoMaxAmount = -1
L 10/31/2007 - 20:53:42: SlotID = 0
L 10/31/2007 - 20:53:42: NumberInSlot = 2
L 10/31/2007 - 20:53:42: WeaponID = 18
L 10/31/2007 - 20:53:42: Flags = 0
L 10/31/2007 - 20:53:42: 
L 10/31/2007 - 20:53:42: .     weapon_mp5navy
L 10/31/2007 - 20:53:42: PrimaryAmmoID = 10
L 10/31/2007 - 20:53:42: PrimaryAmmoMaxAmount = 120
L 10/31/2007 - 20:53:42: SecondaryAmmoID = -1
L 10/31/2007 - 20:53:42: SecondaryAmmoMaxAmount = -1
L 10/31/2007 - 20:53:42: SlotID = 0
L 10/31/2007 - 20:53:42: NumberInSlot = 7
L 10/31/2007 - 20:53:42: WeaponID = 19
L 10/31/2007 - 20:53:42: Flags = 0
L 10/31/2007 - 20:53:42: 
L 10/31/2007 - 20:53:42: .     weapon_m249
L 10/31/2007 - 20:53:42: PrimaryAmmoID = 3
L 10/31/2007 - 20:53:42: PrimaryAmmoMaxAmount = 200
L 10/31/2007 - 20:53:42: SecondaryAmmoID = -1
L 10/31/2007 - 20:53:42: SecondaryAmmoMaxAmount = -1
L 10/31/2007 - 20:53:42: SlotID = 0
L 10/31/2007 - 20:53:42: NumberInSlot = 4
L 10/31/2007 - 20:53:42: WeaponID = 20
L 10/31/2007 - 20:53:42: Flags = 0
L 10/31/2007 - 20:53:42: 
L 10/31/2007 - 20:53:42: .     weapon_m3
L 10/31/2007 - 20:53:42: PrimaryAmmoID = 5
L 10/31/2007 - 20:53:42: PrimaryAmmoMaxAmount = 32
L 10/31/2007 - 20:53:42: SecondaryAmmoID = -1
L 10/31/2007 - 20:53:42: SecondaryAmmoMaxAmount = -1
L 10/31/2007 - 20:53:42: SlotID = 0
L 10/31/2007 - 20:53:42: NumberInSlot = 5
L 10/31/2007 - 20:53:42: WeaponID = 21
L 10/31/2007 - 20:53:42: Flags = 0
L 10/31/2007 - 20:53:42: 
L 10/31/2007 - 20:53:42: .     weapon_m4a1
L 10/31/2007 - 20:53:42: PrimaryAmmoID = 4
L 10/31/2007 - 20:53:42: PrimaryAmmoMaxAmount = 90
L 10/31/2007 - 20:53:42: SecondaryAmmoID = -1
L 10/31/2007 - 20:53:42: SecondaryAmmoMaxAmount = -1
L 10/31/2007 - 20:53:42: SlotID = 0
L 10/31/2007 - 20:53:42: NumberInSlot = 6
L 10/31/2007 - 20:53:42: WeaponID = 22
L 10/31/2007 - 20:53:42: Flags = 0
L 10/31/2007 - 20:53:42: 
L 10/31/2007 - 20:53:42: .     weapon_tmp
L 10/31/2007 - 20:53:42: PrimaryAmmoID = 10
L 10/31/2007 - 20:53:42: PrimaryAmmoMaxAmount = 120
L 10/31/2007 - 20:53:42: SecondaryAmmoID = -1
L 10/31/2007 - 20:53:42: SecondaryAmmoMaxAmount = -1
L 10/31/2007 - 20:53:42: SlotID = 0
L 10/31/2007 - 20:53:42: NumberInSlot = 11
L 10/31/2007 - 20:53:42: WeaponID = 23
L 10/31/2007 - 20:53:42: Flags = 0
L 10/31/2007 - 20:53:42: 
L 10/31/2007 - 20:53:42: .     weapon_g3sg1
L 10/31/2007 - 20:53:42: PrimaryAmmoID = 2
L 10/31/2007 - 20:53:42: PrimaryAmmoMaxAmount = 90
L 10/31/2007 - 20:53:42: SecondaryAmmoID = -1
L 10/31/2007 - 20:53:42: SecondaryAmmoMaxAmount = -1
L 10/31/2007 - 20:53:42: SlotID = 0
L 10/31/2007 - 20:53:42: NumberInSlot = 3
L 10/31/2007 - 20:53:42: WeaponID = 24
L 10/31/2007 - 20:53:42: Flags = 0
L 10/31/2007 - 20:53:42: 
L 10/31/2007 - 20:53:42: .     weapon_flashbang
L 10/31/2007 - 20:53:42: PrimaryAmmoID = 11
L 10/31/2007 - 20:53:42: PrimaryAmmoMaxAmount = 2
L 10/31/2007 - 20:53:42: SecondaryAmmoID = -1
L 10/31/2007 - 20:53:42: SecondaryAmmoMaxAmount = -1
L 10/31/2007 - 20:53:42: SlotID = 3
L 10/31/2007 - 20:53:42: NumberInSlot = 2
L 10/31/2007 - 20:53:42: WeaponID = 25
L 10/31/2007 - 20:53:42: Flags = 24
L 10/31/2007 - 20:53:42: 
L 10/31/2007 - 20:53:42: .     weapon_deagle
L 10/31/2007 - 20:53:42: PrimaryAmmoID = 8
L 10/31/2007 - 20:53:42: PrimaryAmmoMaxAmount = 35
L 10/31/2007 - 20:53:42: SecondaryAmmoID = -1
L 10/31/2007 - 20:53:42: SecondaryAmmoMaxAmount = -1
L 10/31/2007 - 20:53:42: SlotID = 1
L 10/31/2007 - 20:53:42: NumberInSlot = 1
L 10/31/2007 - 20:53:42: WeaponID = 26
L 10/31/2007 - 20:53:42: Flags = 0
L 10/31/2007 - 20:53:42: 
L 10/31/2007 - 20:53:42: .     weapon_sg552
L 10/31/2007 - 20:53:42: PrimaryAmmoID = 4
L 10/31/2007 - 20:53:42: PrimaryAmmoMaxAmount = 90
L 10/31/2007 - 20:53:42: SecondaryAmmoID = -1
L 10/31/2007 - 20:53:42: SecondaryAmmoMaxAmount = -1
L 10/31/2007 - 20:53:42: SlotID = 0
L 10/31/2007 - 20:53:42: NumberInSlot = 10
L 10/31/2007 - 20:53:42: WeaponID = 27
L 10/31/2007 - 20:53:42: Flags = 0
L 10/31/2007 - 20:53:42: 
L 10/31/2007 - 20:53:42: .     weapon_ak47
L 10/31/2007 - 20:53:42: PrimaryAmmoID = 2
L 10/31/2007 - 20:53:42: PrimaryAmmoMaxAmount = 90
L 10/31/2007 - 20:53:42: SecondaryAmmoID = -1
L 10/31/2007 - 20:53:42: SecondaryAmmoMaxAmount = -1
L 10/31/2007 - 20:53:42: SlotID = 0
L 10/31/2007 - 20:53:42: NumberInSlot = 1
L 10/31/2007 - 20:53:42: WeaponID = 28
L 10/31/2007 - 20:53:42: Flags = 0
L 10/31/2007 - 20:53:42: 
L 10/31/2007 - 20:53:42: .     weapon_knife
L 10/31/2007 - 20:53:42: PrimaryAmmoID = -1
L 10/31/2007 - 20:53:42: PrimaryAmmoMaxAmount = -1
L 10/31/2007 - 20:53:42: SecondaryAmmoID = -1
L 10/31/2007 - 20:53:42: SecondaryAmmoMaxAmount = -1
L 10/31/2007 - 20:53:42: SlotID = 2
L 10/31/2007 - 20:53:42: NumberInSlot = 1
L 10/31/2007 - 20:53:42: WeaponID = 29
L 10/31/2007 - 20:53:42: Flags = 0
L 10/31/2007 - 20:53:42: 
L 10/31/2007 - 20:53:42: .     weapon_p90
L 10/31/2007 - 20:53:42: PrimaryAmmoID = 7
L 10/31/2007 - 20:53:42: PrimaryAmmoMaxAmount = 100
L 10/31/2007 - 20:53:42: SecondaryAmmoID = -1
L 10/31/2007 - 20:53:42: SecondaryAmmoMaxAmount = -1
L 10/31/2007 - 20:53:42: SlotID = 0
L 10/31/2007 - 20:53:42: NumberInSlot = 8
L 10/31/2007 - 20:53:42: WeaponID = 30
L 10/31/2007 - 20:53:42: Flags = 0
When do you think i should send it ?

Last edited by ConnorMcLeod; 11-05-2007 at 05:18.
ConnorMcLeod is offline
dstopgunner
Senior Member
Join Date: Oct 2007
Old 02-22-2008 , 02:33   Re: Adding ammo slots
Reply With Quote #2

Anyone know How to change weapon ammo / extra ammo?
For example , m3 shotgun ammo originally is 8(ammo)/32(extra ammo)
But change to 20(ammo)/200(extra ammo)?

PS: Im very very... ...very new , sry.

I see that its possible , like this plugin:

http://forums.alliedmods.net/showthread.php?p=132765

---

So do i just make a plugin consisting of

cs_set_weapon_ammo(id,CSW_Glock18,50)

---Dont know is which one for ammo---
cs_set_user_ammo(id,CSW_Glock18,50) ???cs_set_weapon_ammo(id,CSW_Glock18,50) ???
--------------------------------------

cs_set_user_bpammo(id,CSW_GLOCK18,250)

(Gun wil have 50ammo/250extraammo)?
dstopgunner is offline
Wilson [29th ID]
Veteran Member
Join Date: Nov 2005
Location: London
Old 11-05-2007 , 10:10   Re: Adding ammo slots
Reply With Quote #3

Send it right before he gets the weapon.

For testing purposes, so you see how it works, just bind it to a console command then press the command and drop/pick back up the weapon and you should be able to get more ammo for it.
__________________

Day of Defeat AMXX Community

FakeMeta Research . Voice Proximity . Advanced Deploy . Technician
Wilson [29th ID] is offline
Send a message via ICQ to Wilson [29th ID] Send a message via AIM to Wilson [29th ID] Send a message via MSN to Wilson [29th ID] Send a message via Yahoo to Wilson [29th ID]
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-05-2007 , 10:42   Re: Adding ammo slots
Reply With Quote #4

I thought that bpammo had nothing to do with weapons, except when you buy some, because some weapons share the same ammo...
But i will try.
ConnorMcLeod is offline
Friday13
Junior Member
Join Date: Oct 2007
Old 11-09-2007 , 09:47   Re: Adding ammo slots
Reply With Quote #5

connorr, when you will code it?
Friday13 is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-09-2007 , 10:16   Re: Adding ammo slots
Reply With Quote #6

I didn't try yet what Wilson said.
ConnorMcLeod is offline
Friday13
Junior Member
Join Date: Oct 2007
Old 11-10-2007 , 09:48   Re: Adding ammo slots
Reply With Quote #7

Quote:
Originally Posted by connorr View Post
I didn't try yet what Wilson said.
Plz, try. I need working code. Thx.
Friday13 is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 12-19-2007 , 09:28   Re: Adding ammo slots
Reply With Quote #8

Nothing new huh?
hleV is offline
purple_pixie
Veteran Member
Join Date: Jun 2007
Location: Winchester, England
Old 12-19-2007 , 11:37   Re: Adding ammo slots
Reply With Quote #9

I'm getting a constant 0 on all bpammo checks on bots.

Bloody things ...
purple_pixie is offline
Wilson [29th ID]
Veteran Member
Join Date: Nov 2005
Location: London
Old 12-19-2007 , 23:20   Re: Adding ammo slots
Reply With Quote #10

In DoD, there is a 9th argument, the clip ammo.

I just got this message workign perfectly in there and had quite a bit of trouble doing it, so now I know a lot about it. Post up your code and I'll share what I learnt.
__________________

Day of Defeat AMXX Community

FakeMeta Research . Voice Proximity . Advanced Deploy . Technician
Wilson [29th ID] is offline
Send a message via ICQ to Wilson [29th ID] Send a message via AIM to Wilson [29th ID] Send a message via MSN to Wilson [29th ID] Send a message via Yahoo to Wilson [29th ID]
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 01:20.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode