Clan DT Forum

Would you like to react to this message? Create an account in a few clicks or log in to continue.
Clan DT Forum

2 posters

    Registering Events

    Dr. Jan Itor
    Dr. Jan Itor
    Registering Events Directorro0


    Number of posts : 66
    Age : 33
    Location : there.
    Steam ID : STEAM_0:1:16785387
    Warning :
    Registering Events Left_bar_bleue0 / 1000 / 100Registering Events Right_bar_bleue

    Karma : Infintely Awesome
    Reputation : 0
    Registration date : 2008-03-30

    Registering Events Empty Registering Events

    Post by Dr. Jan Itor Sun Jun 15, 2008 11:44 am

    NewRound
    this will be called on new round every round using the function below:
    Code:
    register_event("HLTV", "event_new_round", "a", "1=0", "2=0")

    this will be called at round start using below:
    Code:
    register_logevent("logevent_round_start", 2, "1=Round_Start") 

    Roundend
    This will be called at the end of every round using function below:
    Code:
    register_logevent("logevent_round_end", 2, "1=Round_End") 

    Playerspawn (hamsandwich)
    I think no need to explain what the "Player Spawn" is. But many of the coders still do not know how to detect this event correctly.

    If you are using AMX Mod X v1.8 or higher, or if you have the "Ham Sandwich" module installed the most simple and efficient way of the "Player Spawn" detection is a hook of the "Spawn" function itself:
    Code:
    RegisterHam(Ham_Spawn, "player", "fwHamPlayerSpawnPost", 1)





    Still confused?

    Still confused and don't really sure which from the above events should be used in your plugin? Review the below examples that may help you to understand the things better.

    * The "New Round" event can be used to move a spawn point entities or to play a music for a players if a freeze time is too long.
    * The "Player Spawn" can be used to alter a player's properties like start health, weapons, etc.
    * The "Round Start" can be used to create your own "buytime" for a plugins that provide a purchasable items or when you want to create a surprise item.
    * The "Round End" can be used to protect a players with a godmode until the "New Round" or to create a quick minigame until the "New Round".


    Last edited by Dr. Jan Itor on Thu Jun 26, 2008 6:56 am; edited 4 times in total
    Ironhide v1.1.0.1
    Ironhide v1.1.0.1
    Ironhide
    Ironhide


    Number of posts : 8
    Age : 30
    Location : on the computer with my cat lieing on the computer
    Steam ID : Steam:0:1:17811664
    Warning :
    Registering Events Left_bar_bleue0 / 1000 / 100Registering Events Right_bar_bleue

    Karma : Infinitely Awesome
    Reputation : 0
    Registration date : 2008-03-30

    Registering Events Empty Re: Registering Events

    Post by Ironhide v1.1.0.1 Sun Jun 15, 2008 11:47 am

    Maybe should add that the first 1 (dont know how it is with the other) need a public newRound
    Code:
    Public newRound
    {
    }
    Dr. Jan Itor
    Dr. Jan Itor
    Registering Events Directorro0


    Number of posts : 66
    Age : 33
    Location : there.
    Steam ID : STEAM_0:1:16785387
    Warning :
    Registering Events Left_bar_bleue0 / 1000 / 100Registering Events Right_bar_bleue

    Karma : Infintely Awesome
    Reputation : 0
    Registration date : 2008-03-30

    Registering Events Empty Re: Registering Events

    Post by Dr. Jan Itor Sun Jun 15, 2008 11:48 am

    yes these are registering events they reigster the
    Public Round_end
    Public newRound
    Public Round_start
    functions
    Dr. Jan Itor
    Dr. Jan Itor
    Registering Events Directorro0


    Number of posts : 66
    Age : 33
    Location : there.
    Steam ID : STEAM_0:1:16785387
    Warning :
    Registering Events Left_bar_bleue0 / 1000 / 100Registering Events Right_bar_bleue

    Karma : Infintely Awesome
    Reputation : 0
    Registration date : 2008-03-30

    Registering Events Empty Re: Registering Events

    Post by Dr. Jan Itor Mon Jun 23, 2008 4:57 pm

    added playerspawn

    Sponsored content


    Registering Events Empty Re: Registering Events

    Post by Sponsored content


      Current date/time is Tue May 07, 2024 12:21 pm