From RAGE Multiplayer Wiki

JavaScript Syntax


  • This function calls a client-side event for the selected player.


  • For Peer 2 Peer connections. The current client can call an event on another client's scriptside and that other client can handle that event.

Required Params

  • eventName: string - the event name that will be called
  • args: Array[] - Any arguments, what should be sent to client. Supports entities, strings, numbers and booleans. (Objects and Arrays should be packed to JSON format.)

Return value

  • void

Syntax, ...args);


Register the event that you want to call in client-side using

Client-Side'setPlayerConfigFlag', (flag, enable) => {
    mp.players.local.setConfigFlag(flag, enable);

Here we create a function that will call 'setPlayerConfigFlag' event and it will set the given player a given config flag.

function setPlayerConfigFlag(id, flag, enable) {
    const player =; //Find player with ID 1337;
    if (!player || !mp.players.exists(player)) return; //Do nothing if no player was found"setPlayerConfigFlag", [flag, enable]);

setPlayerConfigFlag(1337, 18, true); //enable can punch flag for player id 1337

See also