Don't report if client disconnected

This commit is contained in:
Kyle
2021-01-22 19:31:38 +08:00
parent abbb397763
commit 08ae7bea86
+12
View File
@@ -293,6 +293,12 @@ static cell_t Native_SetEntityOwner(IPluginContext* pContext, const cell_t* para
return true;
}
if (params[1] >= 1 && params[1] < SM_MAXPLAYERS)
{
smutils->LogError("Entity %d is not being hook.")
return false;
}
return pContext->ThrowNativeError("Entity %d is not being hook.", params[1]);
}
@@ -316,6 +322,12 @@ static cell_t Native_SetEntityState(IPluginContext* pContext, const cell_t* para
return true;
}
if (params[1] >= 1 && params[1] < SM_MAXPLAYERS)
{
smutils->LogError("Entity %d is not being hook.")
return false;
}
return pContext->ThrowNativeError("Entity %d is not being hook.", params[1]);
}