AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   Solved Models of HL working on CS (https://forums.alliedmods.net/showthread.php?t=327219)

artYY 09-06-2020 21:17

Models of HL working on CS
 
Hello guys,

I've been a problem on my server. The models of HL are working on server when the player put model "vip" or model "gordon".

I tried this command above, but doesn't resolve.

PHP Code:

#include <amxmodx>
#include <fakemeta>

public FWSetClientKeyValueIndex, const InfoBuffer[], const Key[] )
{
    if( 
equalKey"model" ) )
        return 
FMRES_SUPERCEDE;
    
    return 
FMRES_IGNORED;


Anyone can help me?

artYY 09-13-2020 13:30

Re: Models of HL working on CS
 
up

drakunovu6 09-13-2020 14:18

Re: Models of HL working on CS
 
Try this:

PHP Code:

#include <amxmodx>
#include <amxmisc>
#include <fakemeta>

public plugin_init()
{
    
register_plugin("Prevent players changing models""1.0""Drakunovu");
    
register_forward(FM_SetClientKeyValue"fw_SetClientKeyValue");
}

public 
fw_SetClientKeyValue(id, const infobuffer[], const key[])
{
    if (
key[0] == 'm' && key[1] == 'o' && key[2] == 'd' && key[3] == 'e' && key[4] == 'l')
        return 
FMRES_SUPERCEDE;
    
    return 
FMRES_IGNORED;


Tell me if doesn't work

artYY 09-13-2020 18:46

Re: Models of HL working on CS
 
Quote:

Originally Posted by drakunovu6 (Post 2717691)
Try this:

PHP Code:

#include <amxmodx>
#include <amxmisc>
#include <fakemeta>

public plugin_init()
{
    
register_plugin("Prevent players changing models""1.0""Drakunovu");
    
register_forward(FM_SetClientKeyValue"fw_SetClientKeyValue");
}

public 
fw_SetClientKeyValue(id, const infobuffer[], const key[])
{
    if (
key[0] == 'm' && key[1] == 'o' && key[2] == 'd' && key[3] == 'e' && key[4] == 'l')
        return 
FMRES_SUPERCEDE;
    
    return 
FMRES_IGNORED;


Tell me if doesn't work

It doesn't work.. :cry:

drakunovu6 09-13-2020 23:33

Re: Models of HL working on CS
 
Quote:

Originally Posted by artYY (Post 2717712)
It doesn't work.. :cry:

So I tested both codes, in the both the problem still exists, however at the moment I removed the plugin it was fixed and the player was unable to change his model, so try this: remove the code of blocking model on any plugins that has code. (I guess there are exceptions like CS Player Models API but idk)

artYY 09-14-2020 22:00

Re: Models of HL working on CS
 
Quote:

Originally Posted by drakunovu6 (Post 2717730)
So I tested both codes, in the both the problem still exists, however at the moment I removed the plugin it was fixed and the player was unable to change his model, so try this: remove the code of blocking model on any plugins that has code. (I guess there are exceptions like CS Player Models API but idk)

I tried, but still doesn't work.

What is the possibility of creating a plugin that forces the player to stick with cl_minmodels 1?

ZaX 09-14-2020 22:37

Re: Models of HL working on CS
 
PHP Code:

#include <amxmodx>

public plugin_init()
{
    
register_plugin("TTT's Exploit Prevention""1.0""Guskis");
}

public 
client_disconnect(id)
{
  if(
task_exists(id))
    
remove_task(id);
}

public 
client_putinserver(id)
{
  if(!
is_user_bot(id) && !is_user_hltv(id))
    
set_task(5.0"query_him"id);
}

public 
query_him(id)
{
  if(
is_user_connected(id))
    
query_client_cvar(id"cl_minmodels""query_results");
}

public 
query_results(id, const cvar[], const val[])
{
  if(
floatstr(val) == 1.0)
  {
    
server_cmd("kick #%i %s"get_user_userid(id), "Stop using cl_minmodels 1!");
  }

  if(!
task_exists(id))
    
set_task(2.0"query_him"id__"b");


EDIT: I misread the last sentence, sorry.
You could use this, but check if the user has their value to 0 and kick him.

artYY 09-17-2020 22:18

Re: Models of HL working on CS
 
Quote:

Originally Posted by ZaX (Post 2717829)
PHP Code:

#include <amxmodx>

public plugin_init()
{
    
register_plugin("TTT's Exploit Prevention""1.0""Guskis");
}

public 
client_disconnect(id)
{
  if(
task_exists(id))
    
remove_task(id);
}

public 
client_putinserver(id)
{
  if(!
is_user_bot(id) && !is_user_hltv(id))
    
set_task(5.0"query_him"id);
}

public 
query_him(id)
{
  if(
is_user_connected(id))
    
query_client_cvar(id"cl_minmodels""query_results");
}

public 
query_results(id, const cvar[], const val[])
{
  if(
floatstr(val) == 1.0)
  {
    
server_cmd("kick #%i %s"get_user_userid(id), "Stop using cl_minmodels 1!");
  }

  if(!
task_exists(id))
    
set_task(2.0"query_him"id__"b");


EDIT: I misread the last sentence, sorry.
You could use this, but check if the user has their value to 0 and kick him.

I don't want to kick the player, I just want him to switch to the command cl_minmodels 1

ZaX 09-18-2020 01:51

Re: Models of HL working on CS
 
I believe thats slow hacking and its not allowed, also people who have cl_filterstuffcmd set to 1 wont be affected.

artYY 09-20-2020 02:30

Re: Models of HL working on CS
 
The problem was a pug plugin... For some reason, the plugin activate the models "menu"


All times are GMT -4. The time now is 14:37.

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