Código:
// codigo de drop eh do LARS
#include <amxmodx>
#include < fun >
#include <cstrike>
#include <zombieplague>
#include <zmvip>
new s_sg550, s_awp, s_g3sg1 , s_m249
const PRIMARY_WEAPONS_BIT =
(1<<CSW_SG550) |(1<<CSW_AWP) |(1<<CSW_M249)| (1<<CSW_G3SG1)
public plugin_init()
{
register_plugin("[Zv]Armas gratis", "0.1", "LARS-BLOODLIKER && Rotam")
s_sg550 = zv_register_extra_item("SG-550","GRATIS", 0, ZP_TEAM_HUMAN)
s_awp = zv_register_extra_item("AWP","GRATIS", 0, ZP_TEAM_HUMAN)
s_g3sg1 = zv_register_extra_item("G3SG1","GRATIS", 0, ZP_TEAM_HUMAN)
s_m249 = zv_register_extra_item("M249","GRATIS", 0, ZP_TEAM_HUMAN)
}
public zv_extra_item_selected(id, itemid)
{
if(itemid == s_sg550)
{
drop_weapons(id, 1)
give_item(id, "weapon_sg550")
cs_set_user_bpammo(id, CSW_SG550, 90)
}
else if(itemid == s_awp)
{
drop_weapons(id, 1)
give_item(id, "weapon_awp")
cs_set_user_bpammo(id, CSW_AWP, 30)
}
else if(itemid == s_g3sg1)
{
drop_weapons(id, 1)
give_item(id, "weapon_g3sg1")
cs_set_user_bpammo(id, CSW_G3SG1, 90)
}
else if(itemid == s_m249)
{
drop_weapons(id, 1)
give_item(id, "weapon_m249")
cs_set_user_bpammo(id, CSW_M249, 200)
}
}
stock drop_weapons(id, dropwhat)
{
static weapons[32], num, i, weaponid
num = 0
get_user_weapons(id, weapons, num)
for(i = 0; i < num; i++)
{
weaponid = weapons[i]
if(dropwhat == 1 && ((1<<weaponid) & PRIMARY_WEAPONS_BIT))
{
static wname[32]
get_weaponname(weaponid, wname, sizeof wname - 1)
engclient_cmd(id, "drop", wname)
}
}
}
Última edição por rotam em 29/9/2013, 2:51 pm, editado 3 vez(es)