PHP Code:
public rifles(id)
{
if(rifles_active[id] == 1)
{
dropPrimaryWeapons(id)
dropSecondaryWeapons(id)
fm_give_item(id, "weapon_usp")
fm_give_item(id, "weapon_deagle")
fm_give_item(id, "weapon_ak47")
fm_give_item(id, "weapon_m4a1")
}
}
dropPrimaryWeapons(id)
{
new weaponID = get_pdata_cbase(id, m_pLastPrimaryItem)
while(weaponID != -1)
{
dropWeapon(id, weaponID)
weaponID = get_pdata_cbase(id, m_pLastPrimaryItem)
}
}
dropSecondaryWeapons(id)
{
new weaponID = get_pdata_cbase(id, m_pLastSecondaryItem)
while(weaponID != -1)
{
dropWeapon(id, weaponID)
weaponID = get_pdata_cbase(id, m_pLastSecondaryItem)
}
}
dropWeapon(playerID, weaponID)
{
static weaponName[32]
pev(weaponID, pev_classname, weaponName, charsmax(weaponName))
engclient_cmd(playerID, "drop", weaponName)
}
How do you make all weapons except the usp, deagle, m4a1 and ak47 drop at the start of a new round and stop people from buying anything.