Raised This Month: $ Target: $400
 0% 

3 in 1 model


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
vincentwind
Junior Member
Join Date: Apr 2006
Old 04-24-2006 , 07:13   3 in 1 model
Reply With Quote #1

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
//
vincentwind is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:12.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode