OnPlayerConnect: Difference between revisions

From GTA Connected
Jump to navigation Jump to search
No edit summary
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{ScriptItem
{{ScriptItem2
|endpoint = shared
|name = onPlayerConnect
|side = server
|type = event
|type = event
|name = onPlayerConnect
|games = iii vc sa iv
|usage = player starts connecting to the server. This event is a low-level event, which is invoked before the player's name is sent to the server
|desc = player starts connecting to the server. This event is a low-level event, which is invoked before the player's username is sent to the server
|callbackParameters = Event event, string IP
|arg1 = string IP The IP address for the player.
|cancellable = false
|note = {{Shared/PlayerConnectionEvents}}
|parameter1 = string IP The IP address for the player.
|cancel = false
|notes = {{Shared/PlayerConnectionEvents}}
}}
}}

Latest revision as of 16:46, 26 February 2024

Event Server Only icon-iii.png icon-vc.png icon-sa.png icon-iv.png Online and Offline Not Cancellable

Available since Server 1.0.0

onPlayerConnect(Event event, string IP)

The onPlayerConnect event is invoked when player starts connecting to the server. This event is a low-level event, which is invoked before the player's username is sent to the server.

Parameters

1) Event event The event object for this event.
2) string IP The IP address for the player.

Attributes

const This event cannot be cancelled.

Notes

  • The chronological order of player connection events are:
  1. OnPlayerConnect
  2. OnPlayerJoin
  3. OnPlayerJoined
    .

Examples

There aren't any examples for this event.

Compatibility

There isn't any compatibility information for this event.

Related

Server Related

icon-iii.png icon-vc.png icon-sa.png icon-iv.png OnPlayerChat
icon-iii.png icon-vc.png icon-sa.png icon-iv.png OnPlayerCommand
icon-iii.png icon-vc.png icon-sa.png icon-iv.png OnPlayerConnect
icon-iii.png icon-vc.png icon-sa.png icon-iv.png OnPlayerJoin
icon-iii.png icon-vc.png icon-sa.png icon-iv.png OnPlayerJoined
icon-iii.png icon-vc.png icon-sa.png icon-iv.png OnPlayerQuit