I dont get this. I’ve added this to ClientuserInfoChanged in g_client.c
// check for warpers
s = Info_ValueForKey( userinfo, "rate" );
if ( atoi(s) < 3000 || atoi(s) > 25000) trap_DropClient(ent->client->ps.clientNum, "rate must be between 3000 and 25000");
s = Info_ValueForKey( userinfo, "cl_timenudge" );
if ( atoi(s) < -50 || atoi(s) > 0) trap_DropClient(ent->client->ps.clientNum, "cl_timenudge must be between -50 and 0");
s = Info_ValueForKey( userinfo, "cl_maxpackets" );
if ( atoi(s) < 30 || atoi(s) > 100) trap_DropClient(ent->client->ps.clientNum, "cl_maxpackets must be between 30 and 100");
And I’m getting kicked by server for not having cl_maxpackets between 30 and 100 even when I’m sure it is. (I tested with cl_maxpackets 40)
I’ve figured out that this command does not return a string:
Info_ValueForKey( userinfo, “cl_maxpackets” );
Do you have any idea what I should do to restrict players having a wrong value of cl_maxpackets?
MrPingu, rtcwdemo modder