Raised This Month: $203 Target: $400
 50% 

Block Console Command


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
asur
Member
Join Date: Dec 2014
Old 03-20-2015 , 12:01   Block Console Command
Reply With Quote #1

Is it possible to block client side model change command i.e model/etc
If yes pls provide the code for it (y)
Thanks
asur is offline
ironskillz1
AlliedModders Donor
Join Date: Jul 2012
Location: Sweden
Old 03-20-2015 , 13:25   Re: Block Console Command
Reply With Quote #2

Quote:
Originally Posted by asur View Post
Is it possible to block client side model change command i.e model/etc
If yes pls provide the code for it (y)
Thanks
Can you explain more please?

Is it a console command you need blocked? then which?
__________________
I have many private and unique plugins for Jailbreak and Hide'N'Seek. PM me for more info.

Pm me.

Check out my roulette site.
ironskillz1 is offline
Send a message via Skype™ to ironskillz1
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 03-20-2015 , 13:33   Re: Block Console Command
Reply With Quote #3

AFAIK, you can't block model command.
__________________
HamletEagle is online now
EpicKiller
Senior Member
Join Date: Jun 2014
Location: Constanta, Romania
Old 03-20-2015 , 15:19   Re: Block Console Command
Reply With Quote #4

Quote:
Originally Posted by HamletEagle View Post
AFAIK, you can't block model command.
But you can set the model back to whatever it was, so the command would be useless.

PHP Code:
#include < amxmodx >
#include < cstrike >
#include < fakemeta >

public plugin_init()
    
register_forward(FM_SetClientKeyValue"cmdSetClientKeyValue");
    
public 
cmdSetClientKeyValue(id, const infobuffer[], const key[])
{
    if(
equal(key"model"))
    {
        new 
sCurModel[32];
        
cs_get_user_model(idsCurModelcharsmax(sCurModel));
        
        if(!
equal(sCurModelPlayerChoice[id]))
            
cs_set_user_model(idPlayerChoice[id]);
            
        return 
FMRES_SUPERCEDE;
    }
        
    return 
FMRES_IGNORED;

PlayerChoice being the model he chose.
__________________
~ Swiftly and with style ~

Last edited by EpicKiller; 03-20-2015 at 15:20.
EpicKiller is offline
Send a message via Yahoo to EpicKiller Send a message via Skype™ to EpicKiller
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 03-20-2015 , 16:33   Re: Block Console Command
Reply With Quote #5

Quote:
Originally Posted by EpicKiller View Post
But you can set the model back to whatever it was, so the command would be useless.

PHP Code:
#include < amxmodx >
#include < cstrike >
#include < fakemeta >

public plugin_init()
    
register_forward(FM_SetClientKeyValue"cmdSetClientKeyValue");
    
public 
cmdSetClientKeyValue(id, const infobuffer[], const key[])
{
    if(
equal(key"model"))
    {
        new 
sCurModel[32];
        
cs_get_user_model(idsCurModelcharsmax(sCurModel));
        
        if(!
equal(sCurModelPlayerChoice[id]))
            
cs_set_user_model(idPlayerChoice[id]);
            
        return 
FMRES_SUPERCEDE;
    }
        
    return 
FMRES_IGNORED;

PlayerChoice being the model he chose.
I know that, I was just answering his question.
__________________
HamletEagle is online now
EpicKiller
Senior Member
Join Date: Jun 2014
Location: Constanta, Romania
Old 03-20-2015 , 17:03   Re: Block Console Command
Reply With Quote #6

Quote:
Originally Posted by HamletEagle View Post
I know that, I was just answering his question.
I wasn't arguing with you, I was just offering him a solution, as you were right.
__________________
~ Swiftly and with style ~
EpicKiller is offline
Send a message via Yahoo to EpicKiller Send a message via Skype™ to EpicKiller
Reply


Thread Tools
Display Modes

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 10:32.


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