Hook when player joined the map / completely loaded

tarynkelley

Retired Staff
Retired Staff
Trusted Member
Nov 14, 2015
575
178
28
Parts Unknown
Is there any Hook when the player joins the map and when his rust is completely loaded?

I know at least EAC giving these warning messages (e.g. 1 of 3 warnings)when a player successfully joined the game.

Unfortunately On_PlayerConnected is too early.
 

DreTaX

Probably knows the answer...
Administrator
Jun 29, 2014
4,093
4,784
113
At your house.
github.com
Is there any Hook when the player joins the map and when his rust is completely loaded?

I know at least EAC giving these warning messages (e.g. 1 of 3 warnings)when a player successfully joined the game.

Unfortunately On_PlayerConnected is too early.
Add a value to the ds on connected.

When the player spawns check if there is anything in the data. Not bad threory tho, will check it.

Sent From My Samsung Galaxy S4
 

DreTaX

Probably knows the answer...
Administrator
Jun 29, 2014
4,093
4,784
113
At your house.
github.com
When a player spawns would be

http://fougerite.com/wiki/on-playerspawned/

?

How does it exactly work. Do you have an example for the code?
Python:
    def On_PluginInit(self):
        DataStore.Flush("JoiningPlayers")
   
    def On_PlayerSpawned(self, Player, SpawnEvent):
        if DataStore.Get("JoiningPlayers", Player.UID) is not None:
            DataStore.Remove("JoiningPlayers", Player.UID)
            # todo: Do something here

    def On_PlayerConnected(self, Player):
        DataStore.Add("JoiningPlayers", Player.UID, 1)
       
    def On_PlayerDisconnected(self, Player):
        if DataStore.Get("JoiningPlayers", Player.UID) is not None:
            DataStore.Remove("JoiningPlayers", Player.UID)
 
  • Like
Reactions: tarynkelley