Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Plugin generated by AMXX-Studio */
- #include < amxmodx >
- #include < cstrike >
- #include < hamsandwich >
- #define PLUGIN "New Plug-In"
- #define VERSION "1.0"
- #define AUTHOR "author"
- #define GET_CLASS(%1) cs_get_user_team(%1) == CS_TEAM_CT ? COUNTER : TERRO
- #define SET_MODEL(%1) cs_get_user_team(%1) == CS_TEAM_CT ? 1 : 0
- enum _:CLASS
- {
- COUNTER,
- TERRO
- }
- new const MODEL[CLASS][] =
- {
- "models/player/terromodel.mdl",
- "models/player/ctmodel.mdl"
- }
- public plugin_init() {
- register_plugin(PLUGIN, VERSION, AUTHOR)
- RegisterHam(Ham_Spawn, "player", "Player_Spawned", true)
- }
- public plugin_precache() for(new i = 0 ; i < sizeof(MODEL) ; i++) precache_model(MODEL[i])
- public Player_Spawned(id)
- {
- if( !is_user_alive(id) || !is_user_connected(id) )
- return HAM_IGNORED
- cs_set_user_model(id, MODEL[ GET_CLASS(id) ][ SET_MODEL(id) ])
- return HAM_IGNORED
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement