I think this should do the trick:
PHP Code:
int hook_StateCompare(char * state, char * base)
{
if ((CvarVariableValue == NULL || CvarVariableValue("sv_cracked") == 1) && strcmp (state, "deny") == 0) // when sv_cracked 1 and deny state
{
if(strcmp(base, "accept") == 0) // when compare value is accept return true
return 0;
else
return 1; // when compare to value is deny return false
}
return strcmp(state, base);
}
#if COD_VERSION == COD4_1_7
cracking_hook_call(0x0816FF42, (int)hook_StateCompare);
cracking_hook_call(0x081701D6, (int)hook_StateCompare);
#endif
Basically it changes the compare function to returning false (1) when it compares deny to deny. And it returns true (0) when it compares deny to accept.