Raised This Month: $51 Target: $400
 12% 

Block custom models [cs 1.6]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
sl4y62
Junior Member
Join Date: Dec 2009
Old 01-08-2024 , 21:53   Block custom models [cs 1.6]
Reply With Quote #1

Hello everyone !

Folks, my friend has a server where some players are changing their models to custom ones, such as having ct models with red heads,making them easier to spot and kill. I believe this could be considered a hack, even though valve allows it. Does anyone know of a way to block this ? I've been looking into some amxmodx commands like md5_file, which verifies the file's checksum, but I'm not sure if it's reliable. Does anyone have any ideas?

Thanks in advance !!

Last edited by sl4y62; 01-08-2024 at 21:54.
sl4y62 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 01-09-2024 , 01:19   Re: Block custom models [cs 1.6]
Reply With Quote #2

There is a function for this type of thing called force_unmodified(). I use it on certain maps to prevent removing critical sprites that would give the cheater a significant advantage.

You do not have access to a client's file so you wouldn't even be able to get an MD5 or any other hash of their files. I'm not sure how the aforementioned function works but it's probably something built into the game.

I use the "force_exactfile" type and simply put in arrays of zeros for the second and third arguments ("{0,0,0}"). I have the function called in plugin_precache() but I can't remember if that is a requirement (I suspect that it is).
__________________

Last edited by fysiks; 01-09-2024 at 01:28.
fysiks is offline
bibu
Veteran Member
Join Date: Sep 2010
Old 01-09-2024 , 05:40   Re: Block custom models [cs 1.6]
Reply With Quote #3

Try this:

PHP Code:
#include <amxmodx>

#define PLUGIN "Force Unmodified"
#define VERSION "0.1"
#define AUTHOR "SweatyBanana"

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
}

public 
plugin_precache()
{
    
force_unmodified(force_exactfile,{0,0,0},{0,0,0},"models/player/sas/sas.mdl")
    
force_unmodified(force_exactfile,{0,0,0},{0,0,0},"models/player/urban/urban.mdl")
    
force_unmodified(force_exactfile,{0,0,0},{0,0,0},"models/player/gsg9/gsg9.mdl")
    
force_unmodified(force_exactfile,{0,0,0},{0,0,0},"models/player/gign/gign.mdl")
    
force_unmodified(force_exactfile,{0,0,0},{0,0,0},"models/player/vip/vip.mdl")

    
force_unmodified(force_exactfile,{0,0,0},{0,0,0},"models/player/terror/terror.mdl")
    
force_unmodified(force_exactfile,{0,0,0},{0,0,0},"models/player/leet/leet.mdl")
    
force_unmodified(force_exactfile,{0,0,0},{0,0,0},"models/player/arctic/arctic.mdl")
    
force_unmodified(force_exactfile,{0,0,0},{0,0,0},"models/player/guerilla/guerilla.mdl")
}

public 
inconsistent_file(id,const filename[],reason[64])
{
    
format(reason,63,"Please use the default player models");
    return 
PLUGIN_CONTINUE;

__________________
Selling tons of my own private works.
Accepting paid work for clans and communities.
Don't hesitate to contact me.
bibu is offline
amirwolf
Senior Member
Join Date: Feb 2019
Location: Iran
Old 01-09-2024 , 07:40   Re: Block custom models [cs 1.6]
Reply With Quote #4

What is its compliance with?
Size file?
__________________
amirwolf is offline
mlibre
Veteran Member
Join Date: Nov 2015
Location: return PLUGIN_CONTINUE
Old 01-09-2024 , 10:04   Re: Block custom models [cs 1.6]
Reply With Quote #5

could be used as "AntiCheat"
__________________
mlibre is offline
amirwolf
Senior Member
Join Date: Feb 2019
Location: Iran
Old 01-09-2024 , 17:30   Re: Block custom models [cs 1.6]
Reply With Quote #6

I didn't say what it was used for
What I mean is that it is evaluated according to what criteria?
For example, file size
__________________
amirwolf is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 01-09-2024 , 23:11   Re: Block custom models [cs 1.6]
Reply With Quote #7

The furthest I was able to get tonight was to track it down to some metamod documentation where it says that it calls ForceUnmodified() from engine/eiface.h.
__________________
fysiks is offline
Reply



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 14:59.


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