["Solved"] List of events?

Please tell me what are the commands?
such as : onClientMapStart

Those are not commands, They are events. And this is the wrong category for scripting help.

Anyways, Here’s what i could find
##SV

  • Default
  • rconCommand: String Command, Table Arguments.
  • playerDropped: String Reason. Source: Player
  • playerConnecting: String Name, Func SetReason. Source: TempPlayer, If this returns false player will be kicked with reason given in SetReason()
  • onResourceStarting: String ResourceName. Returning false will stop the resource from starting
  • onResourceStart: String ResourceName. Returning false will stop the resource from stopping
  • MapManger
  • onMapStart String Res, Table Map.
  • onGameTypeStart String Res, Table GameType
  • onMapStop String Res.
  • onGameTypeStop String Res
  • BaseEvents
  • onPlayerDied Player DeadPlayer , String DeathReason, Pos PlayerPos
  • onPlayerKilled Player DeadPlayer, Player Killer, String DeathReason, Pos PlayerPos
  • onPlayerWasted Player Player. Don’t know the purpose of this
  • Chat
  • chatMessage
  • SessionManager
  • playerActivated
  • sessionInitialized
  • SpawnManager
  • playerSpawned ??
    ##CL
  • Default
  • onClientResourceStart String Res
  • onClientResourceStop String Res
  • MapManger
  • onClientMapStart String Res.
  • onClientGameTypeStart String Res.
  • onClientMapStop String Res.
  • onClientGameTypeStop String Res.
  • getMapDirectives String Res.
  • BaseEvents
  • onPlayerDied Player DeadPlayer , String DeathReason
  • onPlayerKilled Player DeadPlayer, Player Killer, String DeathReason
  • onPlayerWasted Player Player. Don’t know the purpose of this
  • SessionManager
  • playerActivated
  • sessionInitialized
  • Chat
  • chatMessage

This is by no means all of the but it’s all of the ones I could find quckly

4 Likes

Thank for your helps

Hi,

There is an event on player quit?

playerDropped on the server-side. I think it passes reason as argument, not sure currently though.

Ok, I ask because sometime, the server don’t “see” player is gone… and I use number of player on server for a script and sometime I got wrong result because of that…

I try to change the way of my script work with better verificator,

thank you

Is there an event for chat to made player id to show up in front of player name ?

https://docs.fivem.net/scripting-reference/events/list/