Scripting/Server/Functions/RegisterRemoteFunc

Allows or forbids a client to call this global function with CallServerFunc. Names up to 63 characters.

Syntax

RegisterRemoteFunc("name")
UnRegisterRemoteFunc("name")

Arguments

Returns

bool (false if invalid, already registered, or the 128-entry list is full)

Example

function onPlayerCommand( player, cmd, params )
{
	if ( cmd == "registerremotefunc" )
	{
		local result = RegisterRemoteFunc( 0 );
		MessagePlayer( "RegisterRemoteFunc returned: " + result, player );
	}
}

This sample was generated from the signature – adapt the values to your gamemode.

Section: Constructors for helper objects

Categories: Server functions | Constructors for helper objects