SDKCall Function

Calls an SDK function with the given parameters.

If the call type is Entity or Player, the index MUST ALWAYS be the FIRST parameter passed. If the call type is GameRules, then nothing special needs to be passed. If the return value is a Vector or QAngles, the SECOND parameter must be a Float[3]. If the return value is a string, the THIRD parameter must be a String buffer, and the FOURTH parameter must be the maximum length. All parameters must be passed after the above is followed. Failure to follow these rules will result in crashes or wildly unexpected behavior!

If the return value is a float or integer, the return value will be this value. If the return value is a string, the value returned by the function will be the number of bytes written, or -1 for NULL. If the return value is a CBaseEntity, CBasePlayer, or edict, the return value will always be the entity index, or -1 for NULL.

any SDKCall(Handle call, any... ...)

Parameters

Handle call

SDKCall Handle.

any... ...

Call Parameters.

Return Value

Simple return value, if any.

Errors

Invalid Handle or internal decoding error.