Phasor
01.00.10.059
|
All script events are raised through functions here. More...
Enumerations | |
enum | e_ident_or_bool { kIdent = 0, kBool } |
Functions | |
const std::string * | GetEventTable () |
size_t | GetEventTableElementCount () |
bool | OnTeamChange (const halo::s_player &player, bool relevant, DWORD old_team, DWORD new_team) |
Called when a player has changed team. | |
bool | OnServerCommand (const halo::s_player *player, const std::string &command) |
Called when a server command is being executed. | |
bool | OnServerCommandAttempt (const halo::s_player &player, const std::string &command, const std::string &password) |
Called when a player without the correct password is trying to execute a server command. | |
void | OnNewGame (const std::string &map) |
Called when a new game is starting. | |
void | OnGameEnd (DWORD stage) |
Called when a game is ending. | |
bool | OnBanCheck (const std::string &hash, const std::string &ip) |
Called when a player is attempting to join. | |
void | OnClientUpdate (const halo::s_player &player) |
Called when a client sends its update packet. | |
void | OnPlayerJoin (const halo::s_player &player) |
Called when a player successfully joins the game. | |
void | OnPlayerLeave (const halo::s_player &player) |
Called when a player quits. | |
bool | OnTeamDecision (DWORD in_team, DWORD &out_team) |
Called when a player needs to be assigned a team. | |
void | OnPlayerSpawn (const halo::s_player &player, halo::ident m_objectId) |
Called when a player has spawned. | |
void | OnPlayerSpawnEnd (const halo::s_player &player, halo::ident m_objectId) |
Called when the server has been notified on the player's spawn. | |
void | OnObjectCreation (halo::ident m_objectId) |
Called when an object has just been created. You can modify most object settings and have it sync. | |
e_ident_or_bool | OnObjectCreationAttempt (const halo::objects::s_object_creation_disposition *info, halo::ident &change_id, bool &allow) |
Called when an object wants to be created. You can block it. | |
bool | OnWeaponAssignment (halo::s_player *player, halo::ident owner, DWORD order, halo::ident weap_id, halo::ident &out) |
Called when an object is being assigned their spawn weapons. | |
bool | OnObjectInteraction (halo::s_player &player, halo::ident objid, halo::ident mapid) |
Called when a player interacts with an object (ie stands on it) | |
bool | OnDamageLookup (halo::s_damage_info *dmg, void *metaData, halo::ident receiver, halo::damage_script_options &out) |
Called when the server needs to apply damage to an object. | |
bool | OnDamageApplication (const halo::s_damage_info *dmg, halo::ident receiver, const halo::s_hit_info *hit, bool backtap) |
Called when the server is about to apply damage to an object. | |
bool | OnServerChat (const halo::s_player *sender, const std::string &msg, halo::server::chat::e_chat_types &type, std::string &change_msg) |
Called when a player chats in the server. | |
bool | OnVehicleEntry (const halo::s_player &player, halo::ident veh_id, DWORD seat, bool relevant) |
Called when a player is wanting to enter a vehicle. | |
bool | OnVehicleEject (const halo::s_player &player, bool forceEjected) |
Called when a player is leaving a vehicle. | |
void | OnPlayerKill (const halo::s_player &victim, const halo::s_player *killer, DWORD mode) |
Called when a player is killed. | |
void | OnKillMultiplier (const halo::s_player &player, DWORD multiplier) |
Called when a player gets a kill streak. | |
bool | OnWeaponReload (const halo::s_player *player, halo::ident weap) |
Called when a weapon is being reloaded. | |
bool | OnNameRequest (const std::string &hash, const std::string &name, std::string &new_name) |
Called when a player is requesting a certain name (during connection). | |
All script events are raised through functions here.
All scripting events receive at least one parameter, this parameter determines whether or not your return value will be considered. It is the last parameter on all functions and you don't need to explicitly add it to your parameter list unless you want to use it.
nil
or return nothing at all.relevant
== false
it will be ignored.nil
not -1
id
on the desired weapon, it shouldn't returned the result of lookuptag
, instead use gettagid
. Also, for performance reasons scripts should save the result of gettagid
instead of calling it each time.tagdata
anymore. Instead, use the odl_ functions to modify its behaviour. const std::string * scripting::events::GetEventTable | ( | ) |
size_t scripting::events::GetEventTableElementCount | ( | ) |
bool scripting::events::OnBanCheck | ( | const std::string & | hash, |
const std::string & | ip | ||
) |
Called when a player is attempting to join.
hash | The joining player's hash |
ip | The joining player's ip |
Definition:
void scripting::events::OnClientUpdate | ( | const halo::s_player & | player | ) |
Called when a client sends its update packet.
player | The player's memory id. |
Definition:
bool scripting::events::OnDamageApplication | ( | const halo::s_damage_info * | dmg, |
halo::ident | receiver, | ||
const halo::s_hit_info * | hit, | ||
bool | backtap | ||
) |
Called when the server is about to apply damage to an object.
receiving | object id of the object that is to receive the damage. |
causing | object id of the object that is causing the damage. |
tagid | tag id of damage tag which is being used. |
hit | string describing the hit location (eg head, legs) |
backtap | true if damage is a melee from behind, false otherwise. |
Definition:
bool scripting::events::OnDamageLookup | ( | halo::s_damage_info * | dmg, |
void * | metaData, | ||
halo::ident | receiver, | ||
halo::damage_script_options & | out | ||
) |
Called when the server needs to apply damage to an object.
receiving | object id of the object that is to receive the damage. |
causing | object id of the object that is causing the damage. |
tagid | tag id of damage tag which is being used. |
tagdata | Memory address of the tag's meta data. |
Definition:
void scripting::events::OnGameEnd | ( | DWORD | stage | ) |
Called when a game is ending.
stage | The stage of the game that has ended. |
stage
can be either:Definition:
void scripting::events::OnKillMultiplier | ( | const halo::s_player & | player, |
DWORD | multiplier | ||
) |
Called when a player gets a kill streak.
player | The player's memory id |
multiplier | The multiplier the player got. |
Definition:
bool scripting::events::OnNameRequest | ( | const std::string & | hash, |
const std::string & | name, | ||
std::string & | new_name | ||
) |
Called when a player is requesting a certain name (during connection).
hash | The hash of the requesting machine. |
name | The requested name. |
allow
is false
then the player is assigned a random name. If new_name
is specified, then allow
is ignored and the player's name is changed to new_name
Definition:
void scripting::events::OnNewGame | ( | const std::string & | map | ) |
Called when a new game is starting.
map | The map the game is running. |
Definition:
void scripting::events::OnObjectCreation | ( | halo::ident | m_objectId | ) |
Called when an object has just been created. You can modify most object settings and have it sync.
objid | The object id of the newly created object. |
Definition:
e_ident_or_bool scripting::events::OnObjectCreationAttempt | ( | const halo::objects::s_object_creation_disposition * | info, |
halo::ident & | change_id, | ||
bool & | allow | ||
) |
Called when an object wants to be created. You can block it.
mapid | The id of the object being created. |
parentid | The object id of the to be created object's parent. |
player | The memory id of the owning player. |
parent
and player
can be nil if the object doesn't have a parent or isn't owned by a player.Definition:
bool scripting::events::OnObjectInteraction | ( | halo::s_player & | player, |
halo::ident | objid, | ||
halo::ident | mapid | ||
) |
Called when a player interacts with an object (ie stands on it)
player | The player interacting with the object |
objid | The object being interacted with. |
mapid | The map id of the object being interacted with. |
Definition:
void scripting::events::OnPlayerJoin | ( | const halo::s_player & | player | ) |
Called when a player successfully joins the game.
player | The joining player's memory id. |
Definition:
void scripting::events::OnPlayerKill | ( | const halo::s_player & | victim, |
const halo::s_player * | killer, | ||
DWORD | mode | ||
) |
Called when a player is killed.
killer | The killer's memory id. |
victim | The victim's memory id. |
mode | Describes how they died. |
killer
can be nil
.victim
is never nil
.killer
killer
Definition:
void scripting::events::OnPlayerLeave | ( | const halo::s_player & | player | ) |
Called when a player quits.
player | The player who left. |
Definition:
void scripting::events::OnPlayerSpawn | ( | const halo::s_player & | player, |
halo::ident | m_objectId | ||
) |
Called when a player has spawned.
player | The player who is spawning. |
objid | The player's new object id. |
Definition:
void scripting::events::OnPlayerSpawnEnd | ( | const halo::s_player & | player, |
halo::ident | m_objectId | ||
) |
Called when the server has been notified on the player's spawn.
player | The player who is spawning. |
objid | The player's new object id. |
Definition:
bool scripting::events::OnServerChat | ( | const halo::s_player * | sender, |
const std::string & | msg, | ||
halo::server::chat::e_chat_types & | type, | ||
std::string & | change_msg | ||
) |
Called when a player chats in the server.
player | The chatting player's memory id |
type | The type of chat |
msg | The message being sent. |
player
is nil
if it's a server message. If it's a private server message then player
is the player who will receive the message.Definition:
bool scripting::events::OnServerCommand | ( | const halo::s_player * | player, |
const std::string & | command | ||
) |
Called when a server command is being executed.
This function is only called when the player enters the correct rcon password and when they are allowed to execute the desired command.
player | The player executing the command |
command | The command being executed. |
Definition:
bool scripting::events::OnServerCommandAttempt | ( | const halo::s_player & | player, |
const std::string & | command, | ||
const std::string & | password | ||
) |
Called when a player without the correct password is trying to execute a server command.
player | The player wanting to execute the command |
command | The command they want to execute. |
Definition:
bool scripting::events::OnTeamChange | ( | const halo::s_player & | player, |
bool | relevant, | ||
DWORD | old_team, | ||
DWORD | new_team | ||
) |
Called when a player has changed team.
player | The player who is changing team. |
old_team | The player's old team |
new_team | The player's new team |
relevant | Determines whether or not your return value matters. |
relevant
correctly.Definition:
Called when a player needs to be assigned a team.
team | The team the player is about to be put on. |
nil
if you don't care.Definition:
bool scripting::events::OnVehicleEject | ( | const halo::s_player & | player, |
bool | forceEjected | ||
) |
Called when a player is leaving a vehicle.
player | The player's memory id |
relevant | Boolean indicating whether or not you can stop them leaving. |
Definition:
bool scripting::events::OnVehicleEntry | ( | const halo::s_player & | player, |
halo::ident | veh_id, | ||
DWORD | seat, | ||
bool | relevant | ||
) |
Called when a player is wanting to enter a vehicle.
player | The player's memory id. |
veh_id | The object id of the vehicle they're trying to enter. |
seat | The seat they're trying to enter. |
mapid | The map id of the vehicle they're trying to enter. |
relevant | Whether or not you can stop them entering. |
Definition:
bool scripting::events::OnWeaponAssignment | ( | halo::s_player * | player, |
halo::ident | owner, | ||
DWORD | order, | ||
halo::ident | weap_id, | ||
halo::ident & | out | ||
) |
Called when an object is being assigned their spawn weapons.
player | The memory id of the player, if the weapons belong to a player. |
owner | The object id of the object which owns the assigned weapon. |
order | Which weapon is being assigned (first, second, third etc) |
weap_id | The map id of the weapon which will be assigned. |
player
is nil
when assigning weapons to vehicles.nil
if you don't want to change the assigned weapon.OnNewGame
and store the results globally.Definition:
bool scripting::events::OnWeaponReload | ( | const halo::s_player * | player, |
halo::ident | weap | ||
) |
Called when a weapon is being reloaded.
player | The player who is reloading. |
objid | The object id of the weapon being reloaded. |
player
can be nil if a vehicle's weapon is being reloaded.Definition: