I donot understand how to give ammo can anyone help
Code is here
Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#include <hamsandwich>
#define PLUGIN "Random Guns"
#define VERSION "1.0"
#define AUTHOR "Anonymousstar"
new sec_weapon[][] =
{
"weapon_usp",
"weapon_glock",
"weapon_deagle",
"weapon_p228",
"weapon_elite",
"weapon_fiveseven"
}
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
RegisterHam(Ham_Spawn, "player", "OnPlayerSpawn", 1)
}
public OnPlayerSpawn(id){
if(is_user_alive(id))
{
new szWeapon = random( sizeof sec_weapon);
strip_user_weapons(id);
give_item(id, sec_weapon[ szWeapon]);
}
}