@name Random Weapon Giver
@persist TempPlayer:array Weapon:string WeaponList:array TSPlayer:entity SPlayer:array Player:string

runOnTick(1)

timer("gun", 1000)

findByClass("player")
TempPlayer = findToArray()

TSPlayer = TempPlayer[random(TempPlayer:count()), entity]

SPlayer = TSPlayer:name():explode(" ")

Player = SPlayer[1, string]

WeaponList = array("bb_ak47_alt",
"bb_awp_alt",
"bb_deagle_alt",
"bb_dualelites_alt",
"bb_famas_alt",
"bb_fiveseven_alt",
"bb_p90_alt",
"bb_g3sg1_alt",
"bb_galil_alt",
"bb_glock_alt",
"bb_ump45_alt",
"bb_usp_alt",
"bb_m249_alt",
"bb_m3_alt",
"bb_m4a1_alt",
"bb_mac10_alt",
"bb_mp5_alt",
"bb_p228_alt",
"bb_sg550_alt",
"bb_sg552_alt",
"bb_css_smoke_alt",
"bb_aug_alt",
"bb_tmp_alt",
"bb_xm1014_alt")

Weapon = WeaponList[random(WeaponList:count()), string]

if(clk("gun")){
concmd("_fadmin giveweapon " + Player + " " + Weapon)
}
