Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- replace_weapon_models(id, weaponid)
- {
- if(g_categorypro{id}) // de celestial
- {
- fm_set_weaponmodel_ent(id, 255, 255, 255)
- }
- else
- {
- fm_set_weaponmodel_ent(id, -1, -1, -1);
- }
- if(g_categoryice{id}) // de hielo
- {
- fm_set_weaponmodel_ent(id, 0, 155, 255)
- }
- else
- {
- fm_set_weaponmodel_ent(id, -1, -1, -1);
- }
- if(g_categoryfire{id}) // de fuego
- {
- fm_set_weaponmodel_ent(id, 0, 155, 255)
- }
- else
- {
- fm_set_weaponmodel_ent(id, -1, -1, -1);
- }
- if(g_categorygolden{id}) //de fuego
- {
- fm_set_weaponmodel_ent(id, 255, 0, 0)
- }
- else
- {
- fm_set_weaponmodel_ent(id, -1, -1, -1);
- }
- if(g_CategoryPlasmatic{id}) // plasma
- {
- fm_set_weaponmodel_ent(id, 0, 255, 0)
- }
- else
- {
- fm_set_weaponmodel_ent(id, -1, -1, -1);
- }
- switch (weaponid)
- {
- case CSW_KNIFE: // Custom knife models
- {
- if (g_class[id] >= ZOMBIE)
- {
- if (g_class[id] == NEMESIS) // Nemesis
- {
- set_pev(id, pev_viewmodel2, model_vknife_nemesis)
- set_pev(id, pev_weaponmodel2, "")
- }
- else if (g_class[id] == ALIEN) // Alien
- {
- set_pev(id, pev_viewmodel2, model_vknife_alien)
- set_pev(id, pev_weaponmodel2, "")
- }
- else // Zombies
- {
- // Admin knife models?
- if (get_pcvar_num(cvar_adminknifemodelszombie) && get_user_flags(id) & g_access_flag[ACCESS_ADMIN_MODELS])
- {
- set_pev(id, pev_viewmodel2, model_vknife_admin_zombie)
- set_pev(id, pev_weaponmodel2, "")
- }
- else
- {
- static clawmodel[100]
- ArrayGetString(g_zclass_clawmodel, g_zombieclass[id], clawmodel, charsmax(clawmodel))
- format(clawmodel, charsmax(clawmodel), "models/zombie_apocalypse/%s", clawmodel)
- set_pev(id, pev_viewmodel2, clawmodel)
- set_pev(id, pev_weaponmodel2, "")
- }
- }
- }
- else // Humans
- {
- // Admin knife models?
- if (get_pcvar_num(cvar_adminknifemodelshuman) && get_user_flags(id) & g_access_flag[ACCESS_ADMIN_MODELS])
- {
- set_pev(id, pev_viewmodel2, model_vknife_admin_human)
- set_pev(id, pev_weaponmodel2, model_pknife_admin_human)
- }
- else
- {
- set_pev(id, pev_viewmodel2, model_vknife_human)
- set_pev(id, pev_weaponmodel2, model_pknife_human)
- }
- }
- }
- case CSW_HEGRENADE: // Infection bomb or fire grenade
- {
- if (g_class[id] >= ZOMBIE)
- set_pev(id, pev_viewmodel2, model_grenade_infect)
- else
- set_pev(id, pev_viewmodel2, model_grenade_fire)
- }
- case CSW_FLASHBANG: // Frost grenade
- {
- set_pev(id, pev_viewmodel2, model_grenade_frost)
- }
- case CSW_SMOKEGRENADE: // Aura Shield grenade
- {
- set_pev(id, pev_viewmodel2, model_grenade_aurashield)
- }
- case CSW_M249: // Survivor weapon
- {
- if (g_class[id] == SURVIVOR || g_superm249[id])
- {
- set_pev(id, pev_viewmodel2, model_vm249_survivor)
- set_pev(id, pev_weaponmodel2, model_pm249_survivor)
- }
- }
- case CSW_DEAGLE: // Deagle weapon
- {
- if (g_class[id] == WESKER || g_superdeagle[id])
- {
- set_pev(id, pev_viewmodel2, model_vdeagle_wesker)
- set_pev(id, pev_weaponmodel2, model_pdeagle_wesker)
- }
- }
- case CSW_AWP: // Special awps
- {
- switch (g_specialawp[id])
- {
- case 1:
- {
- set_pev(id, pev_viewmodel2, model_vawp_freezer)
- set_pev(id, pev_weaponmodel2, model_pawp_freezer)
- }
- case 2:
- {
- set_pev(id, pev_viewmodel2, model_vawp_burner)
- set_pev(id, pev_weaponmodel2, model_pawp_burner)
- }
- case 3:
- {
- set_pev(id, pev_viewmodel2, model_vawp_thunderer)
- set_pev(id, pev_weaponmodel2, model_pawp_thunderer)
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement