IncomingConnection

From RAGE Multiplayer Wiki
Revision as of 20:28, 11 November 2019 by Unknown (talk | contribs) (Created page with "{{ServersideJsEvent}} __TOC__ This event is triggered when an player establishes a connection with the server before loading the resources. {{JSContainer| {{Parameters}} *...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Server-Side
Event

 JavaScript



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

JavaScript Syntax

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