How would I check if a player just enters the map...

Thothie

Administrator
Staff member
Administrator
Moderator
MSC Archivist
Joined
Apr 8, 2005
Messages
16,342
Reaction score
326
Location
lost
"player_joined <id>" fires on all scripts the first time a player enters the world.

"game_playerjoin <id>" fires also fires whenever a player joins the server, but I think it only applies to \sv_world

"ext_activate_items <id>" fires on all scripts whenever a player respawns (and when he first joins in world.)

"bs_global_command <id> vanish death" also fires on all scripts whenever a player dies. (Check PARAM3 for 'death', as this same event also fires whenever a player uses a global summon command, such as "all follow" or "all vanish".)
 

greatguys1

Epic Adventurer
MSC Developer
Warriors of the North
MSC Archivist
Joined
Apr 20, 2013
Messages
339
Reaction score
60
Age
26
Location
Yes
None of these are in ms.stx or scripting_alldocs. Can they be added to those? Also is there a variant for player disconnect?
 

Thothie

Administrator
Staff member
Administrator
Moderator
MSC Archivist
Joined
Apr 8, 2005
Messages
16,342
Reaction score
326
Location
lost
Should probably be added to the stx at least, as soft/hard events. Really need a wiki or something for the scripting documentation, which some stabs were made at, but yeah, epic task.

Don't think we have a reliable way to passively detect disconnects. game_playerleave fires in sv_world, which in turn fires player_left globally, but it doesn't seem to go off under every circumstance.
 
Top