AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   ZombiPlague/Human Admin models do not turn into zombie models (https://forums.alliedmods.net/showthread.php?t=307292)

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_forwardFM_SetClientKeyValue"fw_FMSetClientKeyValuePre") ;
    
    
RegisterHamHam_Spawn"player""fw_HamSpawnPost") ;
}

public 
plugin_precache( ) {

    new 
szModelT64 ], szModelCT64 ] ;
    
    
formatexszModelCTcharsmaxszModelCT ), "models/player/%s/%s.mdl"g_szVipModelCTg_szVipModelCT ) ;
    
precache_modelszModelCT ) ;
}

public 
fw_HamSpawnPostid ) {

    if( ! 
is_user_aliveid ) )
    return 
HAM_IGNORED ;
    
    if( ~ 
get_user_flagsid ) & VIP_FLAG )
    return 
HAM_IGNORED ;
    
    switch( 
get_user_teamid ) ) {
          
    case 
2: {
            
            
set_user_infoid"model"g_szVipModelCT ) ;
        }
    }

    return 
HAM_IGNORED ;
}

public 
fw_FMSetClientKeyValuePreiPlayer, const szBuffer[ ], const szKey[ ] ) {

    if( 
equalszKey"model" ) ) {
        
        if( 
get_user_flagsiPlayer ) & VIP_FLAG ) {

            switch( 
get_user_teamiPlayer ) ) {
                   
            case 
2: {
                    
                    
set_user_infoiPlayer"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 }
*/ 



All times are GMT -4. The time now is 04:37.

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