Raised This Month: $248 Target: $400

Help How To Give Weapon Ammo

Post New Thread Reply   
Thread Tools Display Modes
Author Message
Junior Member
Join Date: Apr 2020
Old 09-12-2020 , 04:17   Help How To Give Weapon Ammo
Reply With Quote #1

I donot understand how to give ammo can anyone help

Code is here

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#include <hamsandwich>

#define PLUGIN "Random Guns"
#define VERSION "1.0"
#define AUTHOR "Anonymousstar"

new sec_weapon[][] =

public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	RegisterHam(Ham_Spawn, "player", "OnPlayerSpawn", 1)

public OnPlayerSpawn(id){
		new szWeapon = random( sizeof sec_weapon);
		give_item(id, sec_weapon[ szWeapon]);
Anonymousstar is offline
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 09-12-2020 , 07:48   Re: Help How To Give Weapon Ammo
Reply With Quote #2

Accepting private $$$ plugins requests.

@Steam: crazy770
@Discord: CrazY.#5317

Website | Channel

CrazY. is offline
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 09-13-2020 , 20:09   Re: Help How To Give Weapon Ammo
Reply With Quote #3

Also this, just be aware that you must pass the weapon entity index, not CSW_* weapon ID.

Bugsy is offline
Veteran Member
Join Date: Sep 2012
Old 09-14-2020 , 09:04   Re: Help How To Give Weapon Ammo
Reply With Quote #4

Weapon clip ammo is stored in the weapon entity ,backpack ammo is stored within the player entity.
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Last edited by Natsheh; 09-14-2020 at 09:05.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh

Thread Tools
Display Modes

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 10:48.

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