View Single Post
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 03-13-2018 , 13:54   Re: Downloaded Models not Executed/Visible In-Game
Reply With Quote #6

Before telling you what's wrong I want to say you should ALWAYS do some debugging. Put some messages around if check and functions, and based off this messages you will know what code gets executed and what not(see message, means code is executed).

Your did some mistakes. All you should have edited in the original plugin are this two constants:
PHP Code:
new const g_szVipModelT[ ] = "vip_model_t" ;
new const 
g_szVipModelCT[ ] = "vip_model_ct" 
Because you don't know yet what you are doing and since you seem to want a single model for both teams, just set this two constant to "banana" without making any other modifications to the code.

Now, if you want to know some things you did wrong:
PHP Code:
 if( equalszKey"banana" ) ) { 
The key is "model", what you did is create a condition that won't ever be true. key is not the model that you want to set, but the property. Same story in set_user_info, it should be model.

What it should look like is:
PHP Code:
  set_user_infoiPlayer"model"g_szVipModelT ) ; 
assuming that you changed g_szVipModelT to banana. Alternatively(but it's considered bad practice) you could do directly:
PHP Code:
 set_user_infoiPlayer"model""banana") ; 
PHP Code:
formatexszModelTcharsmaxszModelT ), "models/player/banana.mdl"g_szVipModelTg_szVipModelT ) ; 
    
precache_modelszModelT ) ; 
     
    
formatexszModelCTcharsmaxszModelCT ), "models/player/banana.mdl"g_szVipModelCTg_szVipModelCT ) ; 
You basically hard coded the models, there's not need to have , g_szVipModelCT, g_szVipModelCT after "models/player/banana.mdl".
__________________

Last edited by HamletEagle; 03-13-2018 at 13:55.
HamletEagle is offline