1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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

Discussion in 'Scripts' started by greatguys1, Jul 29, 2016.

  1. greatguys1

    greatguys1 Active Adventurer Developer Warriors of the North

    279
    34
    Apr 20, 2013
    Yes
  2. Thothie

    Thothie Administrator Staff Member Administrator Moderator Developer

    15,079
    54
    Apr 8, 2005
    psycho-oligist
    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".)
     
  3. greatguys1

    greatguys1 Active Adventurer Developer Warriors of the North

    279
    34
    Apr 20, 2013
    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?
     
  4. Thothie

    Thothie Administrator Staff Member Administrator Moderator Developer

    15,079
    54
    Apr 8, 2005
    psycho-oligist
    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.
     

Share This Page