Raised This Month: $ Target: $400
 0% 

Need A Plugin Which Restricts Players to change their models


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 11-02-2014 , 07:10   Re: Need A Plugin Which Restricts Players to change their models
Reply With Quote #4

Quote:
Originally Posted by HamletEagle View Post
Just need to check in SetClientKeyValue...
I'd say even more. Here's some Zombie Plague 4 code which would help.

PHP Code:
// Forward Client User Info Changed -prevent players from changing models-
public fw_ClientUserInfoChanged(id)
{
    
// Cache player's name
    
get_user_name(idg_playername[id], charsmax(g_playername[]))
    
    if (!
g_handle_models_on_separate_ent)
    {
        
// Get current model
        
static currentmodel[32]
        
fm_cs_get_user_model(idcurrentmodelcharsmax(currentmodel))
        
        
// If they're different, set model again
        
if (!equal(currentmodelg_playermodel[id]) && !task_exists(id+TASK_MODEL))
            
fm_cs_set_user_model(id+TASK_MODEL)
    }
}

// Forward Set ClientKey Value -prevent CS from changing player models-
public fw_SetClientKeyValue(id, const infobuffer[], const key[])
{
    
// Block CS model changes
    
if (key[0] == 'm' && key[1] == 'o' && key[2] == 'd' && key[3] == 'e' && key[4] == 'l')
        return 
FMRES_SUPERCEDE;
    
    return 
FMRES_IGNORED;

__________________

Last edited by claudiuhks; 11-02-2014 at 08:26.
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
 



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:46.


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