IsClientOnly

bool IsClientOnly()

Description

Returns true if the code is executing only clientside, but not serverside. Shorthand for IsClient() && !IsServer().

Examples

The following code will not trigger the error clientside or in singleplayer:

if (IsClientOnly())
Error("This function needs to be executed serverside");