rendered paste body#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>
#define Plugin "Weapon Chance"
#define Version "1.0"
#define Author "Doombringer"
#define TIME_TO_WAIT 4
public plugin_init()
{
register_plugin(Plugin, Version, Author)
register_logevent("round_start", 2, "1=Round_Start")
}
public main_func()
{
new players[32], num
get_players(players, num)
new player
for(new i = 0; i < num; i++)
{
player = players[i]
if(random_num(0, 100) < 97 && random_num(0,100) > 100 )
{
give_item(player, "weapon_awp")
cs_set_user_bpammo(player, CSW_AWP, 3)
client_print(player, print_chat, "You're lucky...You got a AWP with 3 bullets (1/100 Chance)")
}
if(random_num(0, 100) < 80 && random_num(0,100) > 95 )
{
give_item(player, "weapon_fiveseven")
cs_set_user_bpammo(player, CSW_FIVESEVEN, 2)
client_print(player, print_chat, "You're lucky...You got a five seven with 2 bullets (1/20 Chance)")
}
if(random_num(0, 100) < 30 && random_num(0,100) > 70 )
{
give_item(player, "weapon_hegrenade")
client_print(player, print_chat, "You're lucky...You got a hegrenade (1/6 Chance)")
}
if(random_num(0, 100) < 20 && random_num(0,100) > 40 )
{
give_item(player, "weapon_shield")
client_print(player, print_chat, "You're lucky...You got a shield (1/15 chance)")
}
}
}
public round_start()
{
set_task(TIME_TO_WAIT, "main_func")
}