Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include < amxmodx >
- #include < cstrike >
- #include < fakemeta >
- #include < hamsandwich >
- #define FLAG ADMIN_LEVEL_H
- #define PLUGIN "PLAYER MODEL CHANGER"
- #define VERSION "1.0.1"
- #define AUTHOR "Sorinel"
- new const VIP_MODEL[ ] = {
- "vip1",
- "vip2",
- "vip3",
- "vip4"
- }
- public plugin_init() {
- register_plugin( PLUGIN, VERSION, AUTHOR )
- RegisterHam(Ham_Spawn, "player", "fwHamPlayerSpawnPost", 1)
- }
- public plugin_precache() {
- new ModelOrSoundPath[128]
- formatex( ModelOrSoundPath, sizeof ( ModelOrSoundPath ) -1, "models/player/%s/%s.mdl", VIP_MODEL, VIP_MODEL )
- engfunc( EngFunc_PrecacheModel, ModelOrSoundPath)
- }
- public fwHamPlayerSpawnPost(id) {
- if(!is_user_alive(id) && get_user_flags(id) & FLAG ) {
- if(random_num(0, 4))
- {
- if(cs_get_user_team(id) == CS_TEAM_CT)
- {
- cs_set_user_model(id, VIP_MODEL)
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement