AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Disable model changing (https://forums.alliedmods.net/showthread.php?t=309617)

blAck. 08-01-2018 11:39

Disable model changing
 
I have a jailbreak server and my players can change models when they type
model "model name" in console.

So I want to disable that command but I don't know how.
I tried to return PLUGIN_HANDLED on that command but that didn't worked.

Please help :)

HamletEagle 08-01-2018 13:36

Re: Disable model changing
 
Search, this was asked several times before. It's also in every model changing plugin.

blAck. 08-01-2018 15:45

Re: Disable model changing
 
Quote:

Originally Posted by HamletEagle (Post 2607520)
Search, this was asked several times before. It's also in every model changing plugin.

I searched but everything I tried just won't work...

HamletEagle 08-01-2018 15:47

Re: Disable model changing
 
Show what you tried then.

blAck. 08-01-2018 15:49

Re: Disable model changing
 
Quote:

Originally Posted by HamletEagle (Post 2607537)
Show what you tried then.

I tried this
Code:
#include <amxmodx> #include <fakemeta> #define PLUGIN "Model Blocker" #define VERSION "0.1" #define AUTHOR "whoever" public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     register_forward(FM_ClientUserInfoChanged, "fw_ClientUserInfoChanged") } public fw_ClientUserInfoChanged(id, buffer)     return FMRES_SUPERCEDE
And this too
Code:
#include <amxmodx> #include <fakemeta> // MercyLezZ svc_bad and models Tutorial public plugin_init()    register_forward(FM_SetClientKeyValue, "Fw_SetClientKeyValue") public Fwd_SetClientKeyValue(id, const infobuffer[], const key[]) {       if (equal(key, "model"))         return FMRES_SUPERCEDE;             return FMRES_IGNORED; }
But nothing works...

D4rkSiD3Rs 08-01-2018 16:10

Re: Disable model changing
 
First, you can't block a client-side command!
Use that it will help you : https://forums.alliedmods.net/showthread.php?t=161255

blAck. 08-01-2018 16:18

Re: Disable model changing
 
Quote:

Originally Posted by D4rkSiD3Rs (Post 2607540)
First, you can't block a client-side command!
Use that it will help you : https://forums.alliedmods.net/showthread.php?t=161255

How will this help me? What do I need to do?

D4rkSiD3Rs 08-01-2018 16:47

Re: Disable model changing
 
Quote:

Originally Posted by blAck. (Post 2607543)
How will this help me? What do I need to do?

By it, you will use cs_set_player_model instead of cs_set_user_model and nobody can change his model by the "model" command.

aquaviva28 08-05-2018 17:38

Please help me
 
When i want to change player's model when they execute command and when I compile it put in amx i test it by executing a command but my model doesn't changes.

Here's the code:
public god(id)
{

if(get_user_flags(id)& ADMIN_LEVEL_A)
{
cs_set_user_model(id, HERE'S THE PROBLEM !!!!!!!!!!!!!!)
set_user_godmode(id, 1)
ColorChat(id, GREY, "You have ^3GodMode ^4!")


}
}

edon1337 08-05-2018 17:49

Re: Disable model changing
 
Try this
PHP Code:

#include < amxmodx >
#include < fakemeta >

public plugin_init( )
register_forwardFM_ClientUserInfoChanged"@ClientUserInfoChanged" );

@
ClientUserInfoChangedid, const szBuffer[ ], const szKey[ ] )
{
    if( 
equalszKey"model" ) )
    
set_user_infoid"model""" );

    return 
FMRES_IGNORED;



Quote:

Originally Posted by D4rkSiD3Rs (Post 2607540)
First, you can't block a client-side command!

You can.


All times are GMT -4. The time now is 12:48.

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