Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Plugin generated by AMXX-Studio */
- #include < amxmodx >
- #include < hamsandwich >
- #include < cstrike >
- enum _: gData { mModel[ 33 ], mACCESS }
- new const szDatas [ ] [ gData ] =
- {
- { "regular_model", ADMIN_ALL },
- { "vip_model", ADMIN_KICK },
- { "admin_model", ADMIN_MAP },
- { "superadmin_model", ADMIN_BAN },
- { "manager_model", ADMIN_RESERVATION },
- { "owner_model", ADMIN_IMMUNITY }
- }
- public plugin_init()
- {
- register_plugin( "Admins Models", "1.0", "Cookie Monster" )
- RegisterHam( Ham_Spawn, "player", "FwClientSpawn_Post" );
- }
- public plugin_precache()
- {
- for( new i, szModel[ 128 ]; i < sizeof( szDatas ); i++ )
- {
- formatex( szModel, charsmax( szModel ), "models/player/%s/%s.mdl", szDatas[ i ][ mModel ], szDatas[ i ][ mModel ] );
- precache_model( szModel );
- }
- }
- public FwClientSpawn_Post( client )
- {
- for( new i; i < sizeof( szDatas ); i++ )
- {
- if( get_user_flags( client ) & szDatas[ i ][ mACCESS ] )
- {
- cs_set_user_model( client, szDatas[ i ][ mModel ] );
- break;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement