ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Client events
  3. onClientPlayerSpawn

Event

onClientPlayerSpawn

A player (local or another) appeared in the world.

Handler

addEventHandler("onClientPlayerSpawn", root, function() ... end)

Differences from MTA:SA

  • These MTA:SA parameters are not here: team hisTeam

In MTA:SA

function(team hisTeam)

Source

source is the player.

Example

addEventHandler("onClientPlayerSpawn", localPlayer, function()
    setCameraTarget(localPlayer)
end)

See also