NewRound
this will be called on new round every round using the function below:
this will be called at round start using below:
Roundend
This will be called at the end of every round using function below:
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:
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".
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