SetOwner: DHookIsNullParam

This commit is contained in:
BotoX 2019-11-01 01:16:30 +01:00
parent 91a51dce36
commit d7fa08f44c

View File

@ -54,6 +54,9 @@ public MRESReturn Hook_AcceptInput(int iEntity, Handle hReturn, Handle hParams)
char sCommand[128]; char sCommand[128];
DHookGetParamString(hParams, 1, sCommand, sizeof(sCommand)); DHookGetParamString(hParams, 1, sCommand, sizeof(sCommand));
if (DHookIsNullParam(hParams, 2))
return MRES_Ignored;
int iActivator = DHookGetParam(hParams, 2); int iActivator = DHookGetParam(hParams, 2);
if (iActivator < 1 || iActivator > MaxClients) if (iActivator < 1 || iActivator > MaxClients)
return MRES_Ignored; return MRES_Ignored;