Raised This Month: $ Target: $400
 0% 

[Help] VIP model BB


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
CodingIsHard
Junior Member
Join Date: Jul 2015
Old 10-01-2015 , 10:32   Re: [Help] VIP model BB
Reply With Quote #7

Quote:
Originally Posted by redivcram View Post
You need to speak English if you want me to understand you
But after trying to figure out what you posted I think I got it...

Are pgeu_ct and pgeu_t default or special models?
I belive those are the "VIP models". Nevertheless hooking to ResetHUD have been over this forum for a long time, read the following thread https://forums.alliedmods.net/showthread.php?t=42159 why it isn't a good idea to hook it without defining when to.

This is what I would use.

PHP Code:

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <hamsandwich>

new const g_VipModels[][] = {

    
"models/player/pgeu_ct/pgeu_ct.mdl",
    
"models/player/pgeu_t/pgeu_t.mdl"

}

public 
plugin_init() {
    
    
register_plugin("AMX Admin Model""1.1.1""whitemike");
    
RegisterHam(Ham_Spawn"player""fwHamSpawnPlayer"1)  
    
// return PLUGIN_CONTINUE  Why?
}

public 
plugin_precache() {

    for(new 
0sizeof(g_VipModels); i++) {
        
precache_model(g_VipModels[i]);
    }

}

public 
fwHamSpawnPlayer(id) {

    
setVipModel(id);

}

public 
setVipModel(idlevelcid) {

    if(
get_user_flags(id) & ADMIN_LEVEL_A) {
        
        if(
cs_get_user_team(id) == CS_TEAM_CT) {
           
cs_set_user_model(idg_VipModels[0]);
        }
        }
   return 
PLUGIN_HANDLED;

NB! This is not tested, if it works, it works, if not, i might fix it later.
Just don't set the model to T? What you can also do is check which model the current player has, if he/she has a default model, then switch it to whatever you like, if not.. return PLUGIN_HANDLED?

Last edited by CodingIsHard; 10-01-2015 at 10:40. Reason: Reading, understanding.
CodingIsHard 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 22:18.


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