AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   JailBreak - Fix model Command (https://forums.alliedmods.net/showthread.php?t=299913)

Amine Belokda 07-30-2017 01:22

JailBreak - Fix model Command
 
hello
I have a problem in my Jailbreak mod ( all jailbreak mod )
the problem is if you add this console command : ( model "namemodel" )
my Model is changed to the name added to the command
please help
and
thanks :wink:

Sanjay Singh 07-30-2017 03:25

Re: JailBreak - Fix model Command
 
Try this and put this plugin before jailbreak.amxx

PHP Code:

#include <amxmodx>
#include <amxmisc>

public plugin_init() 
{
    
register_plugin("Block Models""1.0""$[Y]Y~#Rocks");
    
register_concmd("model","block_cmd");
}

public 
block_cmd(id)
{
    
client_print(idprint_chat,"This Command Is Blocked.")
    return 
PLUGIN_HANDLED;



Amine Belokda 07-30-2017 14:44

Re: JailBreak - Fix model Command
 
Quote:

Originally Posted by Sanjay Singh (Post 2538638)
Try this and put this plugin before jailbreak.amxx

PHP Code:

#include <amxmodx>
#include <amxmisc>

public plugin_init() 
{
    
register_plugin("Block Models""1.0""$[Y]Y~#Rocks");
    
register_clcmd("model","block_cmd");
}

public 
block_cmd(id)
{
    
client_print(idprint_chat,"This Command Is Blocked.")
    return 
PLUGIN_HANDLED;



Not Work !

Ayman Khaled 07-30-2017 18:20

Re: JailBreak - Fix model Command
 
can't be blocked since it's client command.

Sanjay Singh 07-30-2017 22:47

Re: JailBreak - Fix model Command
 
Try this, if it doesnt work then u need to set specific model on that model command

PHP Code:

#include <amxmodx>
#include <amxmisc>

public plugin_init() 
{
    
register_plugin("Block Models""1.0""$[Y]Y~#Rocks");
    
register_concmd("model","block_cmd");
}

public 
block_cmd(id)
{
    
client_print(idprint_chat,"This Command Is Blocked.")
    return 
PLUGIN_HANDLED;



Fuck For Fun 07-31-2017 12:09

Re: JailBreak - Fix model Command
 
You need use forward:
Quote:

client_infochanged
test:
Code:

public fw_SetClientKeyValue( id, const infobuffer[], const key[] )
{
    // Block CS model changes
    if ( g_has_custom_model[id] && equal( key, "model" ) )
        return FMRES_SUPERCEDE;
 
    return FMRES_IGNORED;
}


.Ahlach_. 08-10-2017 06:22

Re: JailBreak - Fix model Command
 
Code:

#include <amxmodx>
#include <cstrike>
 
public plugin_init()
        register_plugin("No Model Change","1.0","BS")
 
public client_infochanged(id)
{
        new act_mod[32],nesto[33]
        cs_get_user_model(id,act_mod,charsmax(act_mod))
        formatex(nesto,charsmax(nesto),"%s",act_mod)
        set_user_info(id,"model",nesto)
        return PLUGIN_HANDLED
}


Amine Belokda 09-05-2017 02:56

Re: JailBreak - Fix model Command
 
Quote:

Originally Posted by Fuck For Fun (Post 2538879)
You need use forward:


test:
Code:

public fw_SetClientKeyValue( id, const infobuffer[], const key[] )
{
    // Block CS model changes
    if ( g_has_custom_model[id] && equal( key, "model" ) )
        return FMRES_SUPERCEDE;
 
    return FMRES_IGNORED;
}


error in g_has_custom_model[id] :/

Natsheh 09-05-2017 04:41

Re: JailBreak - Fix model Command
 
How about to try searching...?

Ayman Khaled 09-05-2017 08:02

Re: JailBreak - Fix model Command
 
put this on the very top in plugins.ini
PHP Code:

#include <amxmodx>
#include <fakemeta>

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;




All times are GMT -4. The time now is 23:27.

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