AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugin/Gameplay Ideas and Requests (https://forums.alliedmods.net/forumdisplay.php?f=60)
-   -   Standalone Cvar Checker (https://forums.alliedmods.net/showthread.php?t=131622)

gaissi 07-07-2010 03:08

Standalone Cvar Checker
 
Hey,

I search for a standalone SM Plugin which check if the player have cl_minmodels 0 or not...
If the player have cl_minmodels 1 he will get kicked or get moved to the spectator...

This function exists at several hide'n'seek Plugins but it don't exist as a standalone plugin....

http://forums.alliedmods.net/showthread.php?t=124979

http://forums.alliedmods.net/showthread.php?p=615624

I hope someone can help me...

greetings gaissi

Darkthrone 07-07-2010 08:24

Re: Standalone Cvar Checker
 
if you have kac open beta, then you can add this in your server.cfg
Quote:

kac_addcvar cl_minmodels equal kick 0

bobdole 07-07-2010 13:20

Re: Standalone Cvar Checker
 
what game is this for,

because cl_minmodels was removed in CSS as of the last update

Darkthrone 07-07-2010 14:17

Re: Standalone Cvar Checker
 
Quote:

] cl_minmodels
"cl_minmodels" = "0"
client
- Uses one player model for each team.
] version
Protocol version 15
Exe version 1.0.0.41 (cstrike)
Exe build: 12:27:59 Jul 6 2010 (4259) (240)

bobdole 07-07-2010 14:29

Re: Standalone Cvar Checker
 
http://store.steampowered.com/news/4033/

Quote:

Removed functionality of cl_minmodels.

Darkthrone 07-07-2010 14:52

Re: Standalone Cvar Checker
 
i wonder why they did not remove cvar

Peace-Maker 07-07-2010 17:13

Re: Standalone Cvar Checker
 
cl_minmodels isn't implemented anymore? That's great, but it's strange that it's reported here a few days ago.

Anyways, this is the extracted part to block the convar.

PHP Code:

#include <sourcemod>

new Handle:g_checkPlayers[MAXPLAYERS+1] = {INVALID_HANDLE,...};

public 
OnClientPutInServer(client)
{
    if(!
IsFakeClient(client))
        
g_checkPlayers[client] = CreateTimer(1.0CheckVarclientTIMER_REPEAT);
}

public 
OnClientDisconnect(client)
{
    if(
g_checkPlayers[client] != INVALID_HANDLE)
    {
        
KillTimer(g_checkPlayers[client]);
        
g_checkPlayers[client] = INVALID_HANDLE;
    }
}

public 
Action:CheckVar(Handle:timerany:client)
{    
    if (!
IsClientInGame(client))
        return 
Plugin_Handled;
    
    
QueryClientConVar(client"cl_minmodels"ConVarQueryFinished:ClientConVarclient);
    return 
Plugin_Continue;
}

public 
ClientConVar(QueryCookie:cookieclientConVarQueryResult:result, const String:cvarName[], const String:cvarValue[])
{
    if(!
StrEqual(cvarValue"0"))
    {
        
KickClient(client"cl_minmodels is blocked.");
        
PrintToChatAll("%N has been kicked for cl_minmodels violation."client);
    }



bobdole 07-07-2010 20:29

Re: Standalone Cvar Checker
 
that post was made the second the update went into effect the sixth

there's alot of people on the steam forums raging about the removal of it

gaissi 07-13-2010 17:48

Re: Standalone Cvar Checker
 
Quote:

Originally Posted by Peace-Maker (Post 1231283)
cl_minmodels isn't implemented anymore? That's great, but it's strange that it's reported here a few days ago.

Anyways, this is the extracted part to block the convar.

PHP Code:

#include <sourcemod>

new Handle:g_checkPlayers[MAXPLAYERS+1] = {INVALID_HANDLE,...};

public 
OnClientPutInServer(client)
{
    if(!
IsFakeClient(client))
        
g_checkPlayers[client] = CreateTimer(1.0CheckVarclientTIMER_REPEAT);
}

public 
OnClientDisconnect(client)
{
    if(
g_checkPlayers[client] != INVALID_HANDLE)
    {
        
KillTimer(g_checkPlayers[client]);
        
g_checkPlayers[client] = INVALID_HANDLE;
    }
}

public 
Action:CheckVar(Handle:timerany:client)
{    
    if (!
IsClientInGame(client))
        return 
Plugin_Handled;
    
    
QueryClientConVar(client"cl_minmodels"ConVarQueryFinished:ClientConVarclient);
    return 
Plugin_Continue;
}

public 
ClientConVar(QueryCookie:cookieclientConVarQueryResult:result, const String:cvarName[], const String:cvarValue[])
{
    if(!
StrEqual(cvarValue"0"))
    {
        
KickClient(client"cl_minmodels is blocked.");
        
PrintToChatAll("%N has been kicked for cl_minmodels violation."client);
    }



Thank you for your help!

Darkthrone 07-24-2010 06:07

Re: Standalone Cvar Checker
 
the plugins are unnecessary, because of
Code:

"sv_allowminmodels" = "0" ( def. "1" )
 game replicated
 - Allow or disallow the use of cl_minmodels on this server.



All times are GMT -4. The time now is 03:41.

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