| grkmkprl |
05-03-2018 14:48 |
ZombiPlague/Human Admin models do not turn into zombie models
Hello to everyone,I need help again in an important matter.There are 3 administrators on the server and we made a private model for the server owner.But 2 people wanted another model 1 person wanted another model.I found and edited scripts for S and T access flag.Seemed to have worked,but there is a problem like this.If the player spawns on the ct team, the model is working properly,(we do not want her to work in the terror team,because this is zp mode )so the model remained the same when we switched to zombie.(it was bad)I want the model to close after the zombie turns,please help me for this.
Private admin model script
PHP Code:
#include < amxmodx >
#include < hamsandwich >
#include < fakemeta >
#define VIP_FLAG ADMIN_LEVEL_H
new const g_szVipModelCT[ ] = "vip_model_ct" ;
public plugin_init( ) {
register_plugin( "VIP Model", "1.0", "DoNii" ) ;
register_forward( FM_SetClientKeyValue, "fw_FMSetClientKeyValuePre", 0 ) ;
RegisterHam( Ham_Spawn, "player", "fw_HamSpawnPost", 1 ) ;
}
public plugin_precache( ) {
new szModelT[ 64 ], szModelCT[ 64 ] ;
formatex( szModelCT, charsmax( szModelCT ), "models/player/%s/%s.mdl", g_szVipModelCT, g_szVipModelCT ) ;
precache_model( szModelCT ) ;
}
public fw_HamSpawnPost( id ) {
if( ! is_user_alive( id ) )
return HAM_IGNORED ;
if( ~ get_user_flags( id ) & VIP_FLAG )
return HAM_IGNORED ;
switch( get_user_team( id ) ) {
case 2: {
set_user_info( id, "model", g_szVipModelCT ) ;
}
}
return HAM_IGNORED ;
}
public fw_FMSetClientKeyValuePre( iPlayer, const szBuffer[ ], const szKey[ ] ) {
if( equal( szKey, "model" ) ) {
if( get_user_flags( iPlayer ) & VIP_FLAG ) {
switch( get_user_team( iPlayer ) ) {
case 2: {
set_user_info( iPlayer, "model", g_szVipModelCT ) ;
return FMRES_SUPERCEDE ;
}
}
}
}
return FMRES_IGNORED ;
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ ansicpg1254\\ deff0\\ deflang1055{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ f0\\ fs16 \n\\ par }
*/
|