Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Ham Weapon Deploy Forward
- public fw_Item_Deploy_Post(weapon_ent)
- {
- set_task(0.01, "Item_Deploy_Post", weapon_ent + 50000);
- }
- public Item_Deploy_Post(weapon_ent)
- {
- weapon_ent -= 50000;
- if (!is_valid_ent(weapon_ent))
- return;
- // Get weapon's owner
- static owner; owner = fm_cs_get_weapon_ent_owner(weapon_ent)
- // Valid owner?
- if (!pev_valid(owner)) return;
- // Get weapon's id
- static weaponid; weaponid = cs_get_weapon_id(weapon_ent)
- // Store current weapon's id for reference
- g_currentweapon[owner] = weaponid
- g_categorypro[owner] = g_categoryice[owner] = g_categoryfire[owner] = g_categorygolden[owner] = g_CategoryPlasmatic[owner] = false;
- new iImpulse = pev(weapon_ent, pev_impulse);
- switch (iImpulse)
- {
- case 10000:
- {
- g_categorypro[owner] = true;
- }
- case 11000:
- {
- g_categoryice[owner] = true;
- }
- case 12000:
- {
- g_categoryfire[owner] = true;
- }
- case 13000:
- {
- g_categorygolden[owner] = true;
- }
- case 14000:
- {
- g_CategoryPlasmatic[owner] = true;
- }
- }
- // Replace weapon models with custom ones
- replace_weapon_models(owner, weaponid)
- // Zombie not holding an allowed weapon for some reason
- if (g_class[owner] >= ZOMBIE && !((1<<weaponid) & ZOMBIE_ALLOWED_WEAPONS_BITSUM))
- {
- // Switch to knife
- g_currentweapon[owner] = CSW_KNIFE
- engclient_cmd(owner, "weapon_knife")
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement