PlayerCommand

From RAGE Multiplayer Wiki
Revision as of 21:13, 20 September 2017 by Ragempdev (talk | contribs)

This event is triggered when player send command .

Parameters

  • player - player, who send command.
  • command - string with arguments.

Example

Server-Side
mp.events.add(
    {
        "playerCommand": (player, command) => {
            let args = command.split(/[ ]+/);
    
            const commandName = args.splice(0, 1)[0];
            if (commandName == "meetme") {
                player.outputChatBox("Hello!");
            }
        }
    }
);

See also

Checkpoint

Colshape

Entity

Player

Streaming

Vehicle

Waypoint