3 in 1 model
Can anyone can help me put 3models into 1model ?
1.amx_flashbangmodel #include <amxmodx> #include <engine> public plugin_init() { // Plugin information register_plugin("Teamdeagles","0.1","Ywa-NL") register_event("CurWeapon", "weaponChange", "be", "1=1") register_cvar("amx_teamdeagles", "1") return PLUGIN_CONTINUE } public plugin_precache() { // Precache models precache_model("models/topsever1/v_flashbang.mdl") precache_model("models/topsever1/p_flashbang.mdl") return PLUGIN_CONTINUE } public weaponChange(id) { if ( !get_cvar_num("amx_teamdeagles") ) return PLUGIN_CONTINUE // Get needed information // // Weapon ID, Ammo, Clip new clip, ammo, wpnid = get_user_weapon(id,clip,ammo) // Team new team = get_user_team(id); switch( team ) { case 1: { if (wpnid == CSW_FLASHBANG) { entity_set_string(id, EV_SZ_viewmodel, "models/topsever1/v_flashbang.mdl") entity_set_string(id, EV_SZ_weaponmodel,"models/topsever1/p_flashbang.mdl") } } case 2: { if (wpnid == CSW_FLASHBANG) { entity_set_string(id, EV_SZ_viewmodel, "models/topsever1/v_flashbang.mdl") entity_set_string(id, EV_SZ_weaponmodel,"models/topsever1/p_flashbang.mdl") } } case 3: { if (wpnid == CSW_FLASHBANG) { entity_set_string(id, EV_SZ_viewmodel, "models/topsever1/v_flashbang.mdl") entity_set_string(id, EV_SZ_weaponmodel,"models/topsever1/p_flashbang.mdl") } } } return PLUGIN_CONTINUE } // // End of plugin // 2.amx_hegrenademodel #include <amxmodx> #include <engine> public plugin_init() { // Plugin information register_plugin("Teamdeagles","0.1","Ywa-NL") register_event("CurWeapon", "weaponChange", "be", "1=1") register_cvar("amx_teamdeagles", "1") return PLUGIN_CONTINUE } public plugin_precache() { // Precache models precache_model("models/topsever1/v_hegrenade.mdl") precache_model("models/topsever1/p_hegrenade.mdl") return PLUGIN_CONTINUE } public weaponChange(id) { if ( !get_cvar_num("amx_teamdeagles") ) return PLUGIN_CONTINUE // Get needed information // // Weapon ID, Ammo, Clip new clip, ammo, wpnid = get_user_weapon(id,clip,ammo) // Team new team = get_user_team(id); switch( team ) { case 1: { if (wpnid == CSW_HEGRENADE) { entity_set_string(id, EV_SZ_viewmodel, "models/topsever1/v_hegrenade.mdl") entity_set_string(id, EV_SZ_weaponmodel,"models/topsever1/p_hegrenade.mdl") } } case 2: { if (wpnid == CSW_HEGRENADE) { entity_set_string(id, EV_SZ_viewmodel, "models/topsever1/v_hegrenade.mdl") entity_set_string(id, EV_SZ_weaponmodel,"models/topsever1/p_hegrenade.mdl") } } case 3: { if (wpnid == CSW_HEGRENADE) { entity_set_string(id, EV_SZ_viewmodel, "models/topsever1/v_hegrenade.mdl") entity_set_string(id, EV_SZ_weaponmodel,"models/topsever1/p_hegrenade.mdl") } } } return PLUGIN_CONTINUE } // // End of plugin // 3.amx_c4model #include <amxmodx> #include <engine> public plugin_init() { // Plugin information register_plugin("Teamdeagles","0.1","Ywa-NL") register_event("CurWeapon", "weaponChange", "be", "1=1") register_cvar("amx_teamdeagles", "1") return PLUGIN_CONTINUE } public plugin_precache() { // Precache models precache_model("models/topsever1/v_c4.mdl") return PLUGIN_CONTINUE } public weaponChange(id) { if ( !get_cvar_num("amx_teamdeagles") ) return PLUGIN_CONTINUE // Get needed information // // Weapon ID, Ammo, Clip new clip, ammo, wpnid = get_user_weapon(id,clip,ammo) // Team new team = get_user_team(id); switch( team ) { case 1: { if (wpnid == CSW_C4) { entity_set_string(id, EV_SZ_viewmodel, "models/topsever1/v_c4.mdl") } } case 2: { if (wpnid == CSW_C4) { entity_set_string(id, EV_SZ_viewmodel, "models/topsever1/v_c4.mdl") } } case 3: { if (wpnid == CSW_C4) { entity_set_string(id, EV_SZ_viewmodel, "models/topsever1/v_c4.mdl") } } } return PLUGIN_CONTINUE } // // End of plugin // |
Re: 3 in 1 model
Code:
|
Re: 3 in 1 model
Quote:
Help Me |
Change
swtich(wpnid) -->> switch(wpnid) |
Well how can I add this : new g_lastweap[33]
to check also the last used weapon. Code:
#include <amxmodx>case (weap == CSW_ELITE && g_lastweap[id] != weap) but it doesn't seems to work HELP :cry: PS: and by the way is it necessary to check if the player is alive like other plugin model, cause I don't think so cause the dead and alive players can see the same weapon in this case. |
| All times are GMT -4. The time now is 05:12. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.