IncomingConnection

From RAGE Multiplayer Wiki
Jump to navigation Jump to search

Server-Side
Event

Js.png JavaScript



This event is triggered when an player establishes a connection with the server before loading the resources.

JavaScript Syntax
Jslogo.png

Parameters

  • ip: String - player's IP
  • serial: String - player's serial
  • rgscName: String - player's social club username.
  • rgscId: String - player's social club ID.

Example

const rgscIdBlackList = [123];

mp.events.add('incomingConnection', (ip, serial, rgscName, rgscId) => { // This event checks whether the specified social club ID (123) or social club username includes (kemperrr), therefore, cancels connection on match.  
    return rgscIdBlackList.includes(rgscId) || rgscName.includes('kemperrr');
});


See also