View Single Post
mewbie222
Senior Member
Join Date: May 2018
Old 12-15-2022 , 01:56   Re: [DOD:s]fix [DoDS] Class Restrictions for individual players..
Reply With Quote #3

Quote:
Originally Posted by Bacardi View Post
not sure.

So you not use in game convars ?
[PHP]
Have you looked at the plugin what it does?!!!

And the plugin closes a certain class to a certain player ([DoDS] Class Restrictions for individual players)...

So sometimes some players, when a certain class is closed for them, this plugin is somehow bypassed = cheaters use some kind of hack or chip, and take the class that is forbidden from them. That is, for them, the admin ban in the form of a plug-in for the class is nonsense, which put a ban on, say, a sniper, no, they still manage to take it (the sniper class), but in the sense of a weapon class.

I began to look at the code, and there is not an extra "else" in this block?
Here is a piece of code (highlighted in red):
Quote:
public Action:ChangeClassEvent(Handle:event, const String:name[], bool:dontBroadcast)
{
if (GetConVarInt(g_Cvar_Enable))
{
new client = GetClientOfUserId(GetEventInt(event, "userid"))
new class = GetEventInt(event, "class")
new String:classstring[64]

if (g_Class[client][class] == 1)
{
PrintCenterText(client, "%s Class Unavailable", classname[class])
Format(classstring, sizeof(classstring), "joinclass %i", g_PreviousClass[client])
FakeClientCommand(client, classstring)
new team = GetClientTeam(client)
ShowVGUIPanel(client, team == 3 ? "class_ger" : "class_us")
}
else
{
g_PreviousClass[client] = class
}

}
return Plugin_Continue
}

Last edited by mewbie222; 12-15-2022 at 02:05.
mewbie222 is offline