Raised This Month: $ Target: $400
 0% 

block key 'model' & used it for other case ?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
abdobiskra
Veteran Member
Join Date: Jul 2014
Location: Algeria
Old 04-07-2017 , 14:51   Re: block key 'model' & used it for other case ?
Reply With Quote #7

i do pre & post
i do set_user_info()

but why when i want to cheack my name of model i see othere name but model not changed like what i saw in consol

my model name is 'sas'
but when i try consol cmd :
Quote:
] model
"model" is "red"
] model blue
====== Stop change model =======
] model
"model" is "blue"
PHP Code:
public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_forward(FM_SetClientKeyValue"SetClientKeyValue"1);
    
    
// Add your code here...
}
public 
SetClientKeyValue(player, const szInfoBuffer[], const szKey[], const szValue[])
{
    new 
sCurModel[32], PlayerChoice[32];
        
    
//hl_get_user_model(player, sCurModel, charsmax(sCurModel));
    
get_user_info(player"model"sCurModel31);
        

    if(
equal(szKey"model") && is_user_connected(player) && !equal(g_asModels[player], ""))
    {
        if(
changes[player] >= )
        {
            
//hl_set_user_model(player, PlayerChoice[player]);
            
client_print(playerprint_chat" ====== Stop  change model ======= ")
            
set_user_info(player"model"PlayerChoice[player]) 
            
//return FMRES_IGNORED
            
return FMRES_HANDLED
        
}
        
client_print(playerprint_chat" ====== Auto  change model ======= ")
        
changes[player]++
        return 
FMRES_SUPERCEDE
    
}
    return 
FMRES_IGNORED

btw my function what i want use for change model without killing in team ( in HL Game dll restricts models for teams)
__________________

Last edited by abdobiskra; 04-07-2017 at 15:08.
abdobiskra is offline
Send a message via Skype™ to abdobiskra
 



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 17:48.


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