Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
events.qh File Reference
Include dependency graph for events.qh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.
#define params(i, o)
 Called when a player becomes observer, after shared setup.

Enumerations

enum  { MUT_ITEMTOUCH_CONTINUE , MUT_ITEMTOUCH_RETURN , MUT_ITEMTOUCH_PICKUP }
enum  { MUT_FUSREAC_TARG_CONTINUE , MUT_FUSREAC_TARG_VALID , MUT_FUSREAC_TARG_INVALID }
enum  { MUT_ACCADD_VALID , MUT_ACCADD_INVALID , MUT_ACCADD_INDIFFERENT }
enum  { MUT_SPECCMD_CONTINUE , MUT_SPECCMD_RETURN , MUT_SPECCMD_FORCE }
enum  { MUT_SPECPREV_CONTINUE , MUT_SPECPREV_RETURN , MUT_SPECPREV_FOUND }
enum  { MUT_VOTEPARSE_CONTINUE , MUT_VOTEPARSE_SUCCESS , MUT_VOTEPARSE_INVALID , MUT_VOTEPARSE_UNACCEPTABLE }

Functions

 MUTATOR_HOOKABLE (AbortSpeedrun, params)
 MUTATOR_HOOKABLE (AccuracyTargetValid, params)
 MUTATOR_HOOKABLE (AddedPlayerScore, params)
 MUTATOR_HOOKABLE (AddPlayerScore, params)
 MUTATOR_HOOKABLE (AllowMobButcher, params)
 MUTATOR_HOOKABLE (AllowMobSpawning, params)
 MUTATOR_HOOKABLE (AllowRocketJumping, params)
 MUTATOR_HOOKABLE (AutoJoinOnConnection, params)
 MUTATOR_HOOKABLE (Bot_FixCount, params)
 MUTATOR_HOOKABLE (Bot_ForbidAttack, params)
 MUTATOR_HOOKABLE (BuffModel_Customize, params)
 MUTATOR_HOOKABLE (BuffTouch, params)
 MUTATOR_HOOKABLE (CalculateRespawnTime, params)
 MUTATOR_HOOKABLE (ChatMessage, params)
 MUTATOR_HOOKABLE (ChatMessageTo, params)
 MUTATOR_HOOKABLE (CheckRules_World, params)
 MUTATOR_HOOKABLE (ClearModelParams, EV_NO_ARGS)
 Called when clearing the global parameters for a model.
 MUTATOR_HOOKABLE (ClientCommand_FloodControl, params)
 MUTATOR_HOOKABLE (ClientCommand_Spectate, params)
 MUTATOR_HOOKABLE (ClientConnect, params)
 MUTATOR_HOOKABLE (ClientDisconnect, params)
 MUTATOR_HOOKABLE (ClientKill, params)
 MUTATOR_HOOKABLE (ClientObituary, params)
 MUTATOR_HOOKABLE (CopyBody, params)
 MUTATOR_HOOKABLE (CustomizeWaypoint, params)
 MUTATOR_HOOKABLE (Damage_Calculate, params)
 MUTATOR_HOOKABLE (DecodeLevelParms, EV_NO_ARGS)
 MUTATOR_HOOKABLE (DropSpecialItems, params)
 MUTATOR_HOOKABLE (EditProjectile, params)
 MUTATOR_HOOKABLE (Ent_Init, EV_NO_ARGS)
 MUTATOR_HOOKABLE (FilterItem, params)
 MUTATOR_HOOKABLE (FilterItemDefinition, params)
 MUTATOR_HOOKABLE (FireBullet_Hit, params)
 MUTATOR_HOOKABLE (FixClientCvars, params)
 MUTATOR_HOOKABLE (FixPlayermodel, params)
 MUTATOR_HOOKABLE (ForbidDropCurrentWeapon, params)
 MUTATOR_HOOKABLE (ForbidRandomStartWeapons, params)
 MUTATOR_HOOKABLE (ForbidSpawn, params)
 MUTATOR_HOOKABLE (ForbidThrowCurrentWeapon, params)
 MUTATOR_HOOKABLE (ForbidWeaponUse, params)
 MUTATOR_HOOKABLE (FormatMessage, params)
 MUTATOR_HOOKABLE (FragCenterMessage, params)
 MUTATOR_HOOKABLE (FusionReactor_ValidTarget, params)
 MUTATOR_HOOKABLE (GetCvars, EV_NO_ARGS)
 MUTATOR_HOOKABLE (GetModelParams, params)
 MUTATOR_HOOKABLE (GetPlayerLimit, params)
 MUTATOR_HOOKABLE (GetPlayerStatus, params)
 MUTATOR_HOOKABLE (GetPressedKeys, params)
 MUTATOR_HOOKABLE (GetRecords, params)
 MUTATOR_HOOKABLE (GetResourceLimit, params)
 MUTATOR_HOOKABLE (GiveFragsForKill, params)
 MUTATOR_HOOKABLE (GiveResource, params)
 MUTATOR_HOOKABLE (GiveResourceWithLimit, params)
 MUTATOR_HOOKABLE (GrappleHookThink, params)
 MUTATOR_HOOKABLE (HavocBot_Aim, params)
 MUTATOR_HOOKABLE (HavocBot_ChooseRole, params)
 MUTATOR_HOOKABLE (HelpMePing, params)
 MUTATOR_HOOKABLE (Item_RespawnCountdown, params)
 MUTATOR_HOOKABLE (Item_ScheduleRespawn, params)
 MUTATOR_HOOKABLE (Item_Spawn, params)
 MUTATOR_HOOKABLE (ItemModel, params)
 MUTATOR_HOOKABLE (ItemSound, params)
 MUTATOR_HOOKABLE (ItemTouch, params)
 MUTATOR_HOOKABLE (ItemTouched, params)
 MUTATOR_HOOKABLE (LockWeapon, params)
 MUTATOR_HOOKABLE (LogDeath_AppendItemCodes, params)
 MUTATOR_HOOKABLE (MakePlayerObserver, params)
 MUTATOR_HOOKABLE (MatchEnd, EV_NO_ARGS)
 Called when the match ends.
 MUTATOR_HOOKABLE (MatchEnd_BeforeScores, EV_NO_ARGS)
 Called when the match ends, before recording scores.
 MUTATOR_HOOKABLE (MonsterCheckBossFlag, params)
 MUTATOR_HOOKABLE (MonsterDies, params)
 MUTATOR_HOOKABLE (MonsterDropItem, params)
 MUTATOR_HOOKABLE (MonsterFindTarget, EV_NO_ARGS)
 Called when a monster looks for another target.
 MUTATOR_HOOKABLE (MonsterModel, params)
 MUTATOR_HOOKABLE (MonsterMove, params)
 MUTATOR_HOOKABLE (MonsterRemove, params)
 MUTATOR_HOOKABLE (MonsterRespawn, params)
 MUTATOR_HOOKABLE (MonsterSpawn, params)
 MUTATOR_HOOKABLE (MonsterValidTarget, params)
 MUTATOR_HOOKABLE (OnEntityPreSpawn, params)
 MUTATOR_HOOKABLE (Player_ChangedTeam, params)
 MUTATOR_HOOKABLE (Player_ChangeTeam, params)
 MUTATOR_HOOKABLE (PlayerAnim, params)
 MUTATOR_HOOKABLE (PlayerDamage_SplitHealthArmor, params)
 MUTATOR_HOOKABLE (PlayerDamaged, params)
 MUTATOR_HOOKABLE (PlayerDied, params)
 MUTATOR_HOOKABLE (PlayerDies, params)
 MUTATOR_HOOKABLE (PlayerIsInvisible, params)
 MUTATOR_HOOKABLE (PlayerPhysics_PostUpdateStats, params)
 MUTATOR_HOOKABLE (PlayerPhysics_UpdateStats, params)
 MUTATOR_HOOKABLE (PlayerPowerups, params)
 MUTATOR_HOOKABLE (PlayerPreThink, params)
 MUTATOR_HOOKABLE (PlayerRegen, params)
 MUTATOR_HOOKABLE (PlayerSpawn, params)
 MUTATOR_HOOKABLE (PlayerUseKey, params)
 MUTATOR_HOOKABLE (PlayerWeaponSelect, params)
 MUTATOR_HOOKABLE (PlayHitsound, params)
 MUTATOR_HOOKABLE (PortalTeleport, params)
 MUTATOR_HOOKABLE (PreferPlayerScore_Clear, EV_NO_ARGS)
 Return 1 if player score shall be cleared with g_score_resetonjoin -1.
 MUTATOR_HOOKABLE (PreFormatMessage, params)
 MUTATOR_HOOKABLE (PrepareExplosionByDamage, params)
 MUTATOR_HOOKABLE (PutClientInServer, params)
 MUTATOR_HOOKABLE (Race_FinalCheckpoint, params)
 MUTATOR_HOOKABLE (ReadLevelCvars, EV_NO_ARGS)
 MUTATOR_HOOKABLE (ReadyRestart_Deny, EV_NO_ARGS)
 Return true to restart the server instead of restarting the match, for modes that don't support readyrestart.
 MUTATOR_HOOKABLE (reset_map_global, EV_NO_ARGS)
 Called in reset_map.
 MUTATOR_HOOKABLE (reset_map_players, EV_NO_ARGS)
 Called in reset_map.
 MUTATOR_HOOKABLE (ResourceAmountChanged, params)
 MUTATOR_HOOKABLE (ResourceWasted, params)
 MUTATOR_HOOKABLE (Sandbox_DragAllowed, params)
 MUTATOR_HOOKABLE (Sandbox_EditAllowed, params)
 MUTATOR_HOOKABLE (Sandbox_SaveAllowed, EV_NO_ARGS)
 Return true to prevent writing sandbox changes to storage.
 MUTATOR_HOOKABLE (Scores_CountFragsRemaining, EV_NO_ARGS)
 Return error to play frag remaining announcements.
 MUTATOR_HOOKABLE (SendWaypoint, params)
 MUTATOR_HOOKABLE (SetChangeParms, EV_NO_ARGS)
 MUTATOR_HOOKABLE (SetDefaultAlpha, EV_NO_ARGS)
 MUTATOR_HOOKABLE (SetModname, params)
 MUTATOR_HOOKABLE (SetNewParms, EV_NO_ARGS)
 MUTATOR_HOOKABLE (SetResource, params)
 MUTATOR_HOOKABLE (SetStartItems, EV_NO_ARGS)
 Adjusts {warmup_}start_{items,weapons,ammo_{cells,rockets,nails,shells,fuel}}.
 MUTATOR_HOOKABLE (SetWeaponArena, params)
 MUTATOR_HOOKABLE (SetWeaponreplace, params)
 MUTATOR_HOOKABLE (SetWeaponStay, params)
 MUTATOR_HOOKABLE (ShowChatBubble, params)
 MUTATOR_HOOKABLE (Spawn_Score, params)
 MUTATOR_HOOKABLE (SpectateCopy, params)
 MUTATOR_HOOKABLE (SpectateNext, params)
 MUTATOR_HOOKABLE (SpectatePrev, params)
 MUTATOR_HOOKABLE (SpectateSet, params)
 MUTATOR_HOOKABLE (SuperweaponsImmutable, params)
 MUTATOR_HOOKABLE (SV_ParseClientCommand, params)
 MUTATOR_HOOKABLE (SV_ParseServerCommand, params)
 MUTATOR_HOOKABLE (SV_StartFrame, EV_NO_ARGS)
 runs globally each server frame
 MUTATOR_HOOKABLE (TakeResource, params)
 MUTATOR_HOOKABLE (TakeResourceWithLimit, params)
 MUTATOR_HOOKABLE (TeamBalance_CheckAllowedTeams, params)
 MUTATOR_HOOKABLE (TeamBalance_FindBestTeams, params)
 MUTATOR_HOOKABLE (TeamBalance_GetPlayerForTeamSwitch, params)
 MUTATOR_HOOKABLE (TeamBalance_GetTeamCount, params)
 MUTATOR_HOOKABLE (TeamBalance_GetTeamCounts, EV_NO_ARGS)
 Return true to manually override team counts.
 MUTATOR_HOOKABLE (Turret_CheckFire, params)
 MUTATOR_HOOKABLE (Turret_Plasma_Fire, params)
 MUTATOR_HOOKABLE (TurretFire, params)
 MUTATOR_HOOKABLE (TurretSpawn, params)
 MUTATOR_HOOKABLE (TurretThink, params)
 MUTATOR_HOOKABLE (TurretValidateTarget, params)
 MUTATOR_HOOKABLE (URI_GetCallback, params)
 MUTATOR_HOOKABLE (VehicleEnter, params)
 MUTATOR_HOOKABLE (VehicleExit, params)
 MUTATOR_HOOKABLE (VehicleInit, params)
 MUTATOR_HOOKABLE (VehicleTouch, params)
 MUTATOR_HOOKABLE (VoteCommand_Parse, params)
 MUTATOR_HOOKABLE (W_DecreaseAmmo, params)
 MUTATOR_HOOKABLE (W_PlayStrengthSound, params)
 MUTATOR_HOOKABLE (W_Reload, params)
 MUTATOR_HOOKABLE (WantWeapon, params)
 MUTATOR_HOOKABLE (WeaponRateFactor, params)
 MUTATOR_HOOKABLE (WeaponSpeedFactor, params)

Variables

float get_cvars_f
string get_cvars_s
string monster_loot

Macro Definition Documentation

◆ params [1/139]

#define params ( i,
o )
Value:
i(entity, 0) /* player */ \
i(entity, 1) /* bubble */ \
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [2/139]

#define params ( i,
o )
Value:
i(entity, 0) /* player */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [3/139]

#define params ( i,
o )
Value:
i(entity, 0) /* object */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [4/139]

#define params ( i,
o )
Value:
i(entity, 0) /* player */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [5/139]

#define params ( i,
o )
Value:
i(bool, 0) /* allow_rocketjump */ \
o(bool, 0) \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [6/139]

#define params ( i,
o )
Value:
i(entity, 0) /* player */ \
i(string, 1) /* item codes */ \
o(string, 1) \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [7/139]

#define params ( i,
o )
Value:
i(int, 0) /* g_maxplayers */ \
o(int, 0) \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [8/139]

#define params ( i,
o )
Value:
i(entity, 0) /* caller */ \
i(string, 1) /* first command */ \
i(string, 2) /* vote command */ \
i(float, 3) /* start position of vote command */ \
i(float, 4) /* argument count */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [9/139]

#define params ( i,
o )
Value:
i(entity, 0) /* player */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [10/139]

#define params ( i,
o )
Value:
i(entity, 0) /* bot */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [11/139]

#define params ( i,
o )
Value:
i(entity, 0) /* player */ \
i(float, 1) /* maxspeed_mod */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [12/139]

#define params ( i,
o )
Value:
i(entity, 0) /* player */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [13/139]

#define params ( i,
o )
Value:
i(entity, 0) /* item */ \
i(float, 1) /* respawn time */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [14/139]

#define params ( i,
o )
Value:
i(entity, 0) /* turret */ \
i(entity, 1) /* target */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [15/139]

#define params ( i,
o )
Value:
i(entity, 0) /* destination player */ \
i(entity, 1) /* sender */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [16/139]

#define params ( i,
o )
Value:
i(entity, 0) /* sender */ \
i(int, 1) /* ret */ \
o(int, 1) \
i(string, 2) /* message */ \
i(entity, 3) /* private msg target */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [17/139]

#define params ( i,
o )
Value:
i(entity, 0) /* player */ \
i(entity, 1) /* newly created clone */ \
i(bool, 2) /* keepvelocity? */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [18/139]

#define params ( i,
o )
Value:
i(entity, 0) /* player */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [19/139]

#define params ( i,
o )
Value:
i(entity, 0) /* player */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [20/139]

#define params ( i,
o )
Value:
i(float, 0) /* id */ \
i(float, 1) /* status */ \
i(string, 2) /* data */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [21/139]

#define params ( i,
o )
Value:
i(entity, 0) /* player */ \
i(float, 1) /* old team index */ \
i(float, 2) /* current team index */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [22/139]

#define params ( i,
o )
Value:
i(entity, 0) /* player */ \
i(float, 1) /* current team index */ \
i(float, 2) /* new team index */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [23/139]

#define params ( i,
o )
Value:
i(string, 0) /* model */ \
i(string, 1) /* output */ \
o(string, 1) \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [24/139]

#define params ( i,
o )
Value:
i(entity, 0) /* projectile */ \
i(entity, 1) /* attacker */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [25/139]

#define params ( i,
o )
Value:
i(entity, 0) /* turret */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [26/139]

#define params ( i,
o )
Value:
i(entity, 0) /* turret */ \
i(entity, 1) /* target */ \
i(int, 2) /* validate flags */ \
o(float, 3) /* target score */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [27/139]

#define params ( i,
o )
Value:
i(entity, 0) /* waypoint */ \
i(entity, 1) /* to */ \
i(int, 2) /* send flags */ \
o(int, 2) \
i(int, 3) /* wp flag */ \
o(int, 3) \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [28/139]

#define params ( i,
o )
Value:
o(string, 0) /* reason */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [29/139]

#define params ( i,
o )
Value:
i(entity, 0) /* target */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [30/139]

#define params ( i,
o )
Value:
i(int, 0) /* weapon_stay */ \
o(int, 0) \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [31/139]

#define params ( i,
o )
Value:
i(string, 0) /* arena */ \
o(string, 0) \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [32/139]

#define params ( i,
o )
Value:
i(entity, 0) /* player */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [33/139]

#define params ( i,
o )
Value:
i(entity, 0) /* score field */ \
i(float, 1) /* score */ \
i(entity, 2) /* player */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [34/139]

#define params ( i,
o )
Value:
i(entity, 0) /* score field */ \
i(float, 1) /* score */ \
o(float, 1) \
i(entity, 2) /* player */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [35/139]

#define params ( i,
o )
Value:
i(entity, 0) /* weapon info entity */ \
i(float, 1) /* do want? */ \
o(float, 1) \
i(int, 2) /* want all guns */ \
o(int, 2) \
i(bool, 3) /* want mutator blocked */ \
o(bool, 3) \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [36/139]

#define params ( i,
o )
Value:
i(float, 0) /* status */ \
o(float, 0) \
i(float, 1) /* time limit */ \
i(float, 2) /* frag limit */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [37/139]

#define params ( i,
o )
Value:
i(entity, 0) /* player */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [38/139]

#define params ( i,
o )
Value:
i(int, 0) /* active real players */ \
o(int, 0) \
i(int, 1) /* real players */ \
o(int, 1) \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [39/139]

#define params ( i,
o )
Value:
i(entity, 0) /* client */ \
i(entity, 1) /* target */ \
o(entity, 1) \
i(entity, 2) /* first */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [40/139]

#define params ( i,
o )
Value:
i(entity, 0) /* client */ \
i(entity, 1) /* target */ \
o(entity, 1) \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [41/139]

#define params ( i,
o )
Value:
i(entity, 0) /* client */ \
i(entity, 1) /* target */ \
o(entity, 1) \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [42/139]

#define params ( i,
o )
Value:
i(entity, 0) /* player */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [43/139]

#define params ( i,
o )
Value:
i(entity, 0) /* player */ \
i(float, 1) /* kill delay */ \
o(float, 1) \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [44/139]

#define params ( i,
o )
Value:
i(entity, 0) /* player */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [45/139]

#define params ( i,
o )
Value:
i(int, 0) /* page */ \
i(string, 1) /* record list */ \
o(string, 1) \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [46/139]

#define params ( i,
o )
Value:
i(entity, 0) /* buff */ \
i(entity, 1) /* player */ \
o(entity, 1) \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [47/139]

#define params ( i,
o )
Value:
i(entity, 0) /* buff */ \
i(entity, 1) /* player */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [48/139]

#define params ( i,
o )
Value:
i(entity, 0) /* hook */ \
i(int, 1) /* tarzan */ \
o(int, 1) \
i(entity, 2) /* pulling entity */ \
o(entity, 2) \
i(float, 3) /* velocity multiplier */ \
o(float, 3) \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [49/139]

#define params ( i,
o )
Value:
i(string, 0) /* model */ \
o(string, 0) \
i(int, 1) /* skin */ \
o(int, 1) \
i(entity, 2) /* player */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [50/139]

#define params ( i,
o )
Value:
i(entity, 0) /* player */ \
i(entity, 1) /* targ */ \
i(vector, 2) /* start pos */ \
i(vector, 3) /* end pos */ \
i(float, 4) /* damage */ \
o(float, 4) \
i(entity, 5) /* wep entity */ \
vector
Definition self.qh:96

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [51/139]

#define params ( i,
o )
Value:
i(string, 0) /* input */ \
i(string, 1) /* command */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [52/139]

#define params ( i,
o )
Value:
i(entity, 0) /* attacker */ \
i(entity, 1) /* target */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [53/139]

#define params ( i,
o )
Value:
i(entity, 0) /* bot */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [54/139]

#define params ( i,
o )
Value:
i(entity, 0) /* player */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [55/139]

#define params ( i,
o )
Value:
i(entity, 7) /* receiver */ \
i(entity, 8) /* resource type */ \
o(entity, 8) \
i(float, 9) /* amount */ \
o(float, 9) \
i(float, 10) /* limit */ \
o(float, 10) \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [56/139]

#define params ( i,
o )
Value:
i(entity, 7) /* receiver */ \
i(entity, 8) /* resource type */ \
o(entity, 8) \
i(float, 9) /* amount */ \
o(float, 9) \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [57/139]

#define params ( i,
o )
Value:
i(entity, 7) /* receiver */ \
i(entity, 8) /* resource type */ \
o(entity, 8) \
i(float, 9) /* amount */ \
o(float, 9) \
i(float, 10) /* limit */ \
o(float, 10) \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [58/139]

#define params ( i,
o )
Value:
i(entity, 7) /* receiver */ \
i(entity, 8) /* resource type */ \
o(entity, 8) \
i(float, 9) /* amount */ \
o(float, 9) \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [59/139]

#define params ( i,
o )
Value:
i(entity, 7) /* checked entity */ \
i(entity, 8) /* resource type */ \
i(float, 9) /* amount wasted */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [60/139]

#define params ( i,
o )
Value:
i(entity, 7) /* checked entity */ \
i(entity, 8) /* resource type */ \
i(float, 9) /* amount */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [61/139]

#define params ( i,
o )
Value:
i(entity, 7) /* checked entity */ \
i(entity, 8) /* resource type */ \
o(entity, 8) \
i(float, 9) /* amount */ \
o(float, 9) \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [62/139]

#define params ( i,
o )
Value:
i(entity, 7) /* checked entity */ \
i(entity, 8) /* resource type */ \
i(float, 9) /* limit */ \
o(float, 9) \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [63/139]

#define params ( i,
o )
Value:
i(entity, 0) /* item */ \
i(entity, 1) /* toucher */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [64/139]

#define params ( i,
o )
Value:
i(entity, 0) /* item */ \
i(entity, 1) /* toucher */ \
o(entity, 1) \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [65/139]

#define params ( i,
o )
Value:
i(entity, 0) /* player */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [66/139]

#define params ( i,
o )
Value:
i(entity, 0) /* player */ \
i(entity, 1) /* vehicle */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [67/139]

#define params ( i,
o )
Value:
i(entity, 0) /* vehicle */ \
i(entity, 1) /* player */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [68/139]

#define params ( i,
o )
Value:
i(entity, 0) /* player */ \
i(entity, 1) /* vehicle */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [69/139]

#define params ( i,
o )
Value:
i(entity, 0) /* vehicle */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [70/139]

#define params ( i,
o )
Value:
i(entity, 0) /* the player who pressed impulse 33 */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [71/139]

#define params ( i,
o )
Value:
i(entity, 0) /* player */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [72/139]

#define params ( i,
o )
Value:
i(entity, 0) /* bot */ \
i(entity, 1) /* target */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [73/139]

#define params ( i,
o )
Value:
i(entity, 0) /* item */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [74/139]

#define params ( i,
o )
Value:
i(entity, 0) /* map entity */ \
i(entity, 1) /* weapon info */ \
i(string, 2) /* replacement */ \
o(string, 2) \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [75/139]

#define params ( i,
o )
Value:
i(entity, 0) /* item */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [76/139]

#define params ( i,
o )
Value:
\
i(string, 0) \
o(string, 0) \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [77/139]

#define params ( i,
o )
Value:
i(entity, 0) /* player wanting to spawn */ \
i(entity, 1) /* spot to be evaluated */ \
i(vector, 2) /* spot score, _x is priority, _y is "distance" */ \
o(vector, 2) \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [78/139]

#define params ( i,
o )
Value:
i(string, 0) /* command name */ \
i(int, 1) /* argc (also, argv() can be used) */ \
i(string, 2) /* whole command, use only if you really have to */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [79/139]

#define params ( i,
o )
Value:
i(entity, 0) /* client sending the command */ \
i(string, 1) /* command name */ \
i(int, 2) /* argc (also, argv() can be used) */ \
i(string, 3) /* whole command, use only if you really have to */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [80/139]

#define params ( i,
o )
Value:
i(entity, 0) /* client sending the command */ \
i(string, 1) /* command name */ \
i(int, 2) /* argc (also, argv() can be used) */ \
i(string, 3) /* whole command, use only if you really have to */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [81/139]

#define params ( i,
o )
Value:
i(entity, 0) /* player */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [82/139]

#define params ( i,
o )
Value:
i(entity, 0) /* player */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [83/139]

#define params ( i,
o )
Value:
i(entity, 0) /* player */ \
i(float, 1) /* max_mod */ \
o(float, 1) \
i(float, 2) /* regen_mod */ \
o(float, 2) \
i(float, 3) /* rot_mod */ \
o(float, 3) \
i(float, 4) /* limit_mod */ \
o(float, 4) \
i(float, 5) /* health_regen */ \
o(float, 5) \
i(float, 6) /* health_regenlinear */ \
o(float, 6) \
i(float, 7) /* health_rot */ \
o(float, 7) \
i(float, 8) /* health_rotlinear */ \
o(float, 8) \
i(float, 9) /* health_stable */ \
o(float, 9) \
i(float, 10) /* health_rotstable */ \
o(float, 10) \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [84/139]

#define params ( i,
o )
Value:
i(entity, 0) /* player */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [85/139]

#define params ( i,
o )
Value:
i(entity, 0) /* player */ \
i(int, 1) /* old items */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [86/139]

#define params ( i,
o )
Value:
i(entity, 0) /* actor */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [87/139]

#define params ( i,
o )
Value:
i(entity, 0) /* actor */ \
i(entity, 1) /* weapon entity */ \
i(float, 2) /* ammo to take */ \
o(float, 2) \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [88/139]

#define params ( i,
o )
Value:
i(entity, 0) /* attacker */ \
i(entity, 1) /* target */ \
i(float, 2) /* health */ \
i(float, 3) /* armor */ \
i(vector, 4) /* location */ \
i(int, 5) /* deathtype */ \
i(float, 6) /* potential_damage */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [89/139]

#define params ( i,
o )
Value:
i(entity, 0) /* inflictor */ \
i(entity, 1) /* attacker */ \
i(entity, 2) /* target */ \
i(float, 3) /* deathtype */ \
i(float, 4) /* damage */ \
o(float, 4) /* damage */ \
i(float, 5) /* mirrordamage */ \
o(float, 5) /* mirrordamage */ \
i(vector, 6) /* force */ \
o(vector, 6) /* force */ \
i(entity, 7) /* weapon entity */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [90/139]

#define params ( i,
o )
Value:
i(entity, 0) /* inflictor */ \
i(entity, 1) /* attacker */ \
i(entity, 2) /* target */ \
i(vector, 3) /* force (no out) */ \
i(float, 4) /* damage take */ \
o(float, 4) /* damage take */ \
i(float, 5) /* damage save */ \
o(float, 5) /* damage save */ \
i(float, 6) /* deathtype */ \
i(float, 7) /* damage */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [91/139]

#define params ( i,
o )
Value:
i(entity, 0) /* caller */ \
o(string, 1) /* reason */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [92/139]

#define params ( i,
o )
Value:
i(entity, 0) /* monster */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [93/139]

#define params ( i,
o )
Value:
i(entity, 0) /* monster */ \
i(entity, 1) /* target */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [94/139]

#define params ( i,
o )
Value:
i(entity, 0) /* monster */ \
i(float, 1) /* run speed */ \
o(float, 1) \
i(float, 2) /* walk speed */ \
o(float, 2) \
i(entity, 3) /* move target */ \
o(entity, 3) \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [95/139]

#define params ( i,
o )
Value:
i(entity, 0) /* monster */ \
i(string, 1) /* list of items to drop */ \
o(string, 1) \
i(entity, 2) /* attacker */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [96/139]

#define params ( i,
o )
Value:
i(entity, 0) /* monster */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [97/139]

#define params ( i,
o )
Value:
i(entity, 0) /* monster */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [98/139]

#define params ( i,
o )
Value:
i(entity, 0) /* target */ \
i(entity, 1) /* attacker */ \
i(float, 2) /* deathtype */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [99/139]

#define params ( i,
o )
Value:
i(entity, 0) /* monster */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [100/139]

#define params ( i,
o )
Value:
i(entity, 0) /* projectile owner */ \
i(entity, 1) /* projectile */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [101/139]

#define params ( i,
o )
Value:
i(float, get_cvars_f) \
i(string, get_cvars_s) \
float get_cvars_f
Definition events.qh:375
string get_cvars_s
Definition events.qh:376

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [102/139]

#define params ( i,
o )
Value:
i(entity, 0) /* player */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [103/139]

#define params ( i,
o )
Value:
i(entity, 0) /* player */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [104/139]

#define params ( i,
o )
Value:
i(entity, 0) /* entity */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [105/139]

#define params ( i,
o )
Value:
i(entity, 0) /* turret */ \
i(bool, 1) /* dual */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [106/139]

#define params ( i,
o )
Value:
i(entity, 0) /* turret */ \
o(bool, 1) /* to fire or not to fire */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [107/139]

#define params ( i,
o )
Value:
i(entity, 0) /* turret */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [108/139]

#define params ( i,
o )
Value:
i(entity, 0) /* turret */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [109/139]

#define params ( i,
o )
Value:
i(entity, 0) /* item */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [110/139]

#define params ( i,
o )
Value:
i(entity, 0) /* item */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [111/139]

#define params ( i,
o )
Value:
i(entity, 0) /* waypoint */ \
i(entity, 1) /* player; other.enemy = spectator */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [112/139]

#define params ( i,
o )
Value:
i(float, 0) /* weapon speed */ \
o(float, 0) \
i(entity, 1) /* player */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [113/139]

#define params ( i,
o )
Value:
i(float, 0) /* weapon rate */ \
o(float, 0) \
i(entity, 1) /* player */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [114/139]

#define params ( i,
o )
Value:
i(entity, 0) /* player */ \
i(int, 1) /* weapon id */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [115/139]

#define params ( i,
o )
Value:
i(entity, 0) /* player */ \
i(entity, 1) /* weapon entity */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [116/139]

#define params ( i,
o )
Value:
i(entity, 0) /* player */ \
i(string, 1) /* message */ \
o(string, 1) \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [117/139]

#define params ( i,
o )
Value:
i(entity, 0) /* player */ \
i(string, 1) /* escape */ \
i(string, 2) /* replacement */ \
o(string, 2) \
i(string, 3) /* message */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [118/139]

#define params ( i,
o )
Value:
i(entity, 0) /* spectatee */ \
i(entity, 1) /* client */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [119/139]

#define params ( i,
o )
Value:
i(int, 0) /* source team index */ \
i(int, 1) /* destination team index */ \
i(bool, 2) /* is looking for bot */ \
o(entity, 3) /* player to switch */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [120/139]

#define params ( i,
o )
Value:
i(entity, 0) /* player checked */ \
o(float, 1) /* bitmask of teams */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [121/139]

#define params ( i,
o )
Value:
i(float, 0) /* team index to count */ \
i(entity, 1) /* player to ignore */ \
o(float, 2) /* number of players in a team */ \
o(float, 3) /* number of bots in a team */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [122/139]

#define params ( i,
o )
Value:
i(float, 0) /* mask of teams */ \
o(float, 0) \
i(string, 1) /* team entity name */ \
o(string, 1) \
i(entity, 2) /* player checked */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [123/139]

#define params ( i,
o )
Value:
i(entity, 0) /* attacker */ \
i(entity, 1) /* target */ \
i(float, 2) /* frag score */ \
o(float, 2) \
i(float, 3) /* deathtype */ \
i(entity, 4) /* wep entity */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [124/139]

#define params ( i,
o )
Value:
i(string, 0) /* sound */ \
i(string, 1) /* output */ \
o(string, 1) \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [125/139]

#define params ( i,
o )
Value:
i(string, 0) /* model */ \
i(string, 1) /* output */ \
o(string, 1) \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [126/139]

#define params ( i,
o )
Value:
i(entity, 0) /* victim */ \
i(entity, 1) /* attacker */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [127/139]

#define params ( i,
o )
Value:
i(entity, 0) /* attacker */ \
i(entity, 1) /* target */ \
i(float, 2) /* deathtype */ \
i(int, 3) /* attacker kcount */ \
i(int, 4) /* targ killcount */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [128/139]

#define params ( i,
o )
Value:
i(entity, 0) /* inflictor */ \
i(entity, 1) /* attacker */ \
i(entity, 2) /* target */ \
i(float, 3) /* deathtype */ \
i(entity, 4) /* wep entity */ \
o(bool, 5) /* anonymous killer */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [129/139]

#define params ( i,
o )
Value:
i(entity, 0) /* player */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [130/139]

#define params ( i,
o )
Value:
i(entity, 0) /* inflictor */ \
i(entity, 1) /* attacker */ \
i(entity, 2) /* target */ \
i(float, 3) /* deathtype */ \
i(float, 4) /* damage */ \
o(float, 4) /* damage */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [131/139]

#define params ( i,
o )
Value:
i(entity, 0) /* player */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [132/139]

#define params ( i,
o )
Value:
i(entity, 0) /* player */ \
i(int, 1) /* anim bits */ \
o(int, 1) \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [133/139]

#define params ( i,
o )
Value:
i(entity, 0) /* player spawning */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [134/139]

#define params ( i,
o )
Value:
i(entity, 0) /* player spawning */ \
i(entity, 1) /* spot that was used, or NULL */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [135/139]

#define params ( i,
o )
Value:
i(entity, 0) /* player */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [136/139]

#define params ( i,
o )
Value:
i(entity, 0) /* player */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [137/139]

#define params ( i,
o )
Value:
i(entity, 0) /* player */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [138/139]

#define params ( i,
o )
Value:
i(entity, 0) /* client wanting to spawn */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

◆ params [139/139]

#define params ( i,
o )
Value:
i(entity, 0) /* player */ \
i(bool, 1) /* is_forced */ \

Called when a player becomes observer, after shared setup.

Return true to hide the chat bubble above typing players.

Return true to prevent the player from editing sandbox objects with commands.

Return true to prevent sandbox objects from being dragged.

Called when weapons are performing their attack, useful for applying bonus attack sounds.

Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting.

Include special item codes for a death to the game log.

Called when a player is trying to join, argument is the number of players allowed to join the match.

Called when parsing a vote command.

Return true to skip respawn time calculations.

Return true to use your own aim target (or none at all).

Called after physics stats are set on a player, allows post-initialization modifications.

Called before physics stats are set on a player, allows limited early customization.

Return true to show a waypoint while the item is spawning.

Called when a fusion reactor is validating its target.

Return true to prevent sending a chat (private, team or regular) message from reaching a certain player.

Called when sending a chat message, ret argument can be changed to prevent the message.

Called when creating a clone of the player (usually for corpses that stay after the player has respawned).

Return true to prevent weapon use for a player.

Return true to lock weapon (can't be used nor changed) for a player.

Called after player has changed their team.

Called before player changes their team. Return true to block team change.

Called when a monster model is about to be set, allows custom paths etc.

Called when an admin tries to kill all monsters.

Called when player triggered kill (or is changing teams), return error to not do anything.

Called when a buff is touched. Called early, can edit buff properties.

Called when a bullet has hit a target.

Called when getting the global parameters for a model.

Called when a target is checked for accuracy.

Called at when a player connect.

Called when some resource is being taken from an entity, with a limit.

Called when some resource is being taken from an entity.

Called when entity is being given some resource with specified limit.

Called when entity is being given some resource.

Called when there was an attempt to set entity resources higher than their limit.

Called after the amount of resource of an entity has changed.

Called when the amount of resource of an entity changes.

Called when the amount of entity resources changes. Can be used to override resource limit.

Called after the item has been touched.

Called at when a item is touched. Called early, can edit item properties.

Called when a speedrun is aborted and the player is teleported back to start position.

Called when a player exits a vehicle.

Called when a player touches a vehicle.

Called when a player enters a vehicle.

Called when a vehicle initializes.

Called whenever a player uses impulse 33 (help me) in impulse.qc.

Called whenever a player goes through a portal gun teleport.

Called when a bot checks a target to attack.

Called when an item is about to respawn.

Called for each item being spawned on a map, including dropped weapons.

Called when a spawnpoint is being evaluated.

Please read EV_SV_ParseClientCommand description before using.

Called when a client command is parsed NOTE: hooks MUST start with if (MUTATOR_RETURNVALUE) return false; NOTE: return true if you handled the command, return false to continue handling NOTE: THESE HOOKS MUST NEVER EVER CALL tokenize() // example: MUTATOR_HOOKFUNCTION(foo, SV_ParseClientCommand) { if (MUTATOR_RETURNVALUE) // command was already handled?

Return true if the player should be considered invisible.

Called when the use key is pressed.

Called every player think frame.

Return true to keep the player's superweapons unchanged in player_powerups().

Called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items.

Called by W_Reload.

Called by W_DecreaseAmmo.

Called when a player is damaged.

Called to adjust damage and force values which are applied to the player, used for e.g.

Called when a player gets damaged to e.g. remove stuff they were carrying.

Called when a player tries to spawn a monster.

Called when checking if a monster should be a miniboss.

Called when validating a monster's target.

Called when a monster moves.

Called when a monster is dropping loot.

Called when a monster wants to respawn.

Called when a monster dies.

Called when a monster spawns.

Can edit any "just fired" projectile.

is meant to call GetCvars_handle* for cvars this mutator needs from the client, e.g.: MUTATOR_HOOKFUNCTION(mymutator, GetCvars) { GetCvars_handleFloat(this, store, s, f, cvar_mycvar, "mycvar"); return false; } Usually you can just use REPLICATE instead of this hook, e.g.: REPLICATE(cvar_mycvar, int, "mycvar"); NOTE: requesting cvar values (get_cvars_f 0) is deprecated

Runs in the event loop for players; is called for ALL player entities, also bots, also the dead, or spectators.

Return error to prevent entity spawn, or modify the entity.

Called in Plasma & Dual Plasma turret's tr_attack. Return true to override the default attack.

Return error to not attack.

Return error to request removal.

Checks if the current item may be spawned (.items may be read and written to, as well as the ammo_ fields).

Check if items having the given definition are allowed to spawn.

Called every frame, customizes the waypoint for spectators.

Allows changing weapon speed (projectiles mostly).

allows changing attack rate

Return true if dropping the current weapon shall not be allowed at any time including death.

Return true if throwing the current weapon shall not be allowed.

Called before any formatting is applied, handy for tweaking the message before scripts get ahold of it.

Called when formatting a chat message to replace fancy functions.

Copies variables for spectating "spectatee" to "client".

Called during autobalance. Return true to override the player that will be switched.

Allows overriding the teams that will make the game most balanced if the player joins any of them.

Allows overriding of team counts.

Allows adjusting allowed teams.

Called when someone was fragged by "self", and is expected to change frag_score to adjust scoring for the kill.

Called when an item sound is about to be played, allows custom paths etc.

Called when an item model is about to be set, allows custom paths etc.

Allows overriding the frag centerprint messages.

Called when showing an obituary for the player. return true to show nothing (workarounds may be needed).

Called after a player died.

Called when a player dies to e.g. remove stuff they were carrying.

Called when a player disconnects.

Called when setting the player's animation state.

Called after a player's weapon is chosen so it can be overriden here.

Called when a player spawns as player, after shared setup, before their weapon is chosen (so items may be changed in here).

Called when player spawns to determine whether to give them random start weapons. Return true to forbid giving them.

Return true if client should be put as player on connection.

Return true to prevent a spectator/observer to spawn as player.

Return true to use the bitmask value and set non-empty string to use team entity name. Both behaviors can be active at the same time and will stack allowed teams.

Return true to disallow spawning.

Return error to request removal

Returning true makes the monster stop.

Return true to prevent the monster from becoming a miniboss.

Return 1 to prevent spawning. NOTE: requires reason if disallowed

strength damage/force multiplier I'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).

Return true if damage shouldn't be logged

Return 1 to disable regen.

If MUTATOR_RETURNVALUE is 1, don't do anything. Return 1 if the use key actually did something

return false; entity player = M_ARGV(0, entity); string cmd_name = M_ARGV(1, string); int cmd_argc = M_ARGV(2, int); string cmd_string = M_ARGV(3, string); if (cmd_name == "echocvar" && cmd_argc >= 2) { sprint(player, "\n", cvar_string(argv(1)), "\n"); return true; } if (cmd_name == "echostring" && cmd_argc >= 2) { sprint(player, "\n", substring(cmd_string, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), "\n"); return true; } return false; }

Return true to skip flood control on the given command.

Return 1 to make the spawnpoint unusable.

Return 1 to remove an item.

Return true to forbid the bot from attacking the target.

Allows you to strip a player of an item if they go through the teleporter to help prevent cheating.

Normally help me ping uses .waypointsprite_attachedforcarrier, but if your mutator uses something different then you can handle it in a special manner using this hook

Return true to remove the vehicle.

Allows mutators to set special settings in this event.

Return true to stop player from entering the vehicle.

See RES_* constants for resource types. Return true to forbid the change

See RES_* constants for resource types. Amount wasted is the amount of resource that is above resource limit so it was not given.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by GiveResourceWithLimit

See RES_* constants for resource types. Return true to forbid giving.

See RES_* constants for resource types. Return true to forbid giving. NOTE: This hook is also called by TakeResourceWithLimit

Return 1 to prevent spawning.

Definition at line 11 of file events.qh.

11#define params(i, o) \
12 i(entity, 0) /* player */ \
13 i(bool, 1) /* is_forced */ \
14 /**/

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
MUT_ITEMTOUCH_CONTINUE 
MUT_ITEMTOUCH_RETURN 
MUT_ITEMTOUCH_PICKUP 

Definition at line 795 of file events.qh.

796{
797 MUT_ITEMTOUCH_CONTINUE, // return this flag to make the function continue as normal
798 MUT_ITEMTOUCH_RETURN, // return this flag to make the function return (handled entirely by mutator)
799 MUT_ITEMTOUCH_PICKUP // return this flag to have the item "picked up" and taken even after mutator handled it
800};
@ MUT_ITEMTOUCH_PICKUP
Definition events.qh:799
@ MUT_ITEMTOUCH_RETURN
Definition events.qh:798
@ MUT_ITEMTOUCH_CONTINUE
Definition events.qh:797

◆ anonymous enum

anonymous enum
Enumerator
MUT_FUSREAC_TARG_CONTINUE 
MUT_FUSREAC_TARG_VALID 
MUT_FUSREAC_TARG_INVALID 

Definition at line 1308 of file events.qh.

1309{
1310 MUT_FUSREAC_TARG_CONTINUE, // return this flag to make the function continue as normal
1311 MUT_FUSREAC_TARG_VALID, // return this flag to make the function return true (valid target)
1312 MUT_FUSREAC_TARG_INVALID // return this flag to make the function return false (invalid target)
1313};
@ MUT_FUSREAC_TARG_VALID
Definition events.qh:1311
@ MUT_FUSREAC_TARG_INVALID
Definition events.qh:1312
@ MUT_FUSREAC_TARG_CONTINUE
Definition events.qh:1310

◆ anonymous enum

anonymous enum
Enumerator
MUT_ACCADD_VALID 
MUT_ACCADD_INVALID 
MUT_ACCADD_INDIFFERENT 

Definition at line 946 of file events.qh.

947{
948 MUT_ACCADD_VALID, // return this flag to make the function continue if target is a client
949 MUT_ACCADD_INVALID, // return this flag to make the function always continue
950 MUT_ACCADD_INDIFFERENT // return this flag to make the function always return
951};
@ MUT_ACCADD_INDIFFERENT
Definition events.qh:950
@ MUT_ACCADD_INVALID
Definition events.qh:949
@ MUT_ACCADD_VALID
Definition events.qh:948

◆ anonymous enum

anonymous enum
Enumerator
MUT_SPECCMD_CONTINUE 
MUT_SPECCMD_RETURN 
MUT_SPECCMD_FORCE 

Definition at line 1101 of file events.qh.

1102{
1103 MUT_SPECCMD_CONTINUE, // return this flag to make the function continue as normal
1104 MUT_SPECCMD_RETURN, // return this flag to make the function return (don't spectate)
1105 MUT_SPECCMD_FORCE // return this flag to force the player to spectate, even if they're not a player
1106};
@ MUT_SPECCMD_RETURN
Definition events.qh:1104
@ MUT_SPECCMD_FORCE
Definition events.qh:1105
@ MUT_SPECCMD_CONTINUE
Definition events.qh:1103

◆ anonymous enum

anonymous enum
Enumerator
MUT_SPECPREV_CONTINUE 
MUT_SPECPREV_RETURN 
MUT_SPECPREV_FOUND 

Definition at line 1078 of file events.qh.

1079{
1080 MUT_SPECPREV_CONTINUE, // return this flag to make the function continue as normal
1081 MUT_SPECPREV_RETURN, // return this flag to make the function return (handled entirely by mutator)
1082 MUT_SPECPREV_FOUND // return this flag to make the function continue without default functions (handled mostly by mutator)
1083};
@ MUT_SPECPREV_RETURN
Definition events.qh:1081
@ MUT_SPECPREV_CONTINUE
Definition events.qh:1080
@ MUT_SPECPREV_FOUND
Definition events.qh:1082

◆ anonymous enum

anonymous enum
Enumerator
MUT_VOTEPARSE_CONTINUE 
MUT_VOTEPARSE_SUCCESS 
MUT_VOTEPARSE_INVALID 
MUT_VOTEPARSE_UNACCEPTABLE 

Definition at line 1363 of file events.qh.

1364{
1365 MUT_VOTEPARSE_CONTINUE, // return this flag to make the function continue as normal
1366 MUT_VOTEPARSE_SUCCESS, // return 1 (vote parsed)
1367 MUT_VOTEPARSE_INVALID, // return -1 (vote parsed but counted as invalid, no action or vote)
1368 MUT_VOTEPARSE_UNACCEPTABLE // return 0 (vote parameter counted as unacceptable, warns caller)
1369};
@ MUT_VOTEPARSE_CONTINUE
Definition events.qh:1365
@ MUT_VOTEPARSE_UNACCEPTABLE
Definition events.qh:1368
@ MUT_VOTEPARSE_INVALID
Definition events.qh:1367
@ MUT_VOTEPARSE_SUCCESS
Definition events.qh:1366

Function Documentation

◆ MUTATOR_HOOKABLE() [1/158]

MUTATOR_HOOKABLE ( AbortSpeedrun ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [2/158]

MUTATOR_HOOKABLE ( AccuracyTargetValid ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [3/158]

MUTATOR_HOOKABLE ( AddedPlayerScore ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [4/158]

MUTATOR_HOOKABLE ( AddPlayerScore ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [5/158]

MUTATOR_HOOKABLE ( AllowMobButcher ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [6/158]

MUTATOR_HOOKABLE ( AllowMobSpawning ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [7/158]

MUTATOR_HOOKABLE ( AllowRocketJumping ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [8/158]

MUTATOR_HOOKABLE ( AutoJoinOnConnection ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [9/158]

MUTATOR_HOOKABLE ( Bot_FixCount ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [10/158]

MUTATOR_HOOKABLE ( Bot_ForbidAttack ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [11/158]

MUTATOR_HOOKABLE ( BuffModel_Customize ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [12/158]

MUTATOR_HOOKABLE ( BuffTouch ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [13/158]

MUTATOR_HOOKABLE ( CalculateRespawnTime ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [14/158]

MUTATOR_HOOKABLE ( ChatMessage ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [15/158]

MUTATOR_HOOKABLE ( ChatMessageTo ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [16/158]

MUTATOR_HOOKABLE ( CheckRules_World ,
params  )

References CheckRules_World(), and params.

◆ MUTATOR_HOOKABLE() [17/158]

MUTATOR_HOOKABLE ( ClearModelParams ,
EV_NO_ARGS  )

Called when clearing the global parameters for a model.

References EV_NO_ARGS.

◆ MUTATOR_HOOKABLE() [18/158]

MUTATOR_HOOKABLE ( ClientCommand_FloodControl ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [19/158]

MUTATOR_HOOKABLE ( ClientCommand_Spectate ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [20/158]

MUTATOR_HOOKABLE ( ClientConnect ,
params  )

References ClientConnect, and params.

◆ MUTATOR_HOOKABLE() [21/158]

MUTATOR_HOOKABLE ( ClientDisconnect ,
params  )

References ClientDisconnect, and params.

◆ MUTATOR_HOOKABLE() [22/158]

MUTATOR_HOOKABLE ( ClientKill ,
params  )

References ClientKill, and params.

◆ MUTATOR_HOOKABLE() [23/158]

MUTATOR_HOOKABLE ( ClientObituary ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [24/158]

MUTATOR_HOOKABLE ( CopyBody ,
params  )

References CopyBody(), and params.

◆ MUTATOR_HOOKABLE() [25/158]

MUTATOR_HOOKABLE ( CustomizeWaypoint ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [26/158]

MUTATOR_HOOKABLE ( Damage_Calculate ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [27/158]

MUTATOR_HOOKABLE ( DecodeLevelParms ,
EV_NO_ARGS  )

References DecodeLevelParms(), and EV_NO_ARGS.

◆ MUTATOR_HOOKABLE() [28/158]

MUTATOR_HOOKABLE ( DropSpecialItems ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [29/158]

MUTATOR_HOOKABLE ( EditProjectile ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [30/158]

MUTATOR_HOOKABLE ( Ent_Init ,
EV_NO_ARGS  )

References EV_NO_ARGS.

◆ MUTATOR_HOOKABLE() [31/158]

MUTATOR_HOOKABLE ( FilterItem ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [32/158]

MUTATOR_HOOKABLE ( FilterItemDefinition ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [33/158]

MUTATOR_HOOKABLE ( FireBullet_Hit ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [34/158]

MUTATOR_HOOKABLE ( FixClientCvars ,
params  )

References FixClientCvars(), and params.

◆ MUTATOR_HOOKABLE() [35/158]

MUTATOR_HOOKABLE ( FixPlayermodel ,
params  )

References FixPlayermodel(), and params.

◆ MUTATOR_HOOKABLE() [36/158]

MUTATOR_HOOKABLE ( ForbidDropCurrentWeapon ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [37/158]

MUTATOR_HOOKABLE ( ForbidRandomStartWeapons ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [38/158]

MUTATOR_HOOKABLE ( ForbidSpawn ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [39/158]

MUTATOR_HOOKABLE ( ForbidThrowCurrentWeapon ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [40/158]

MUTATOR_HOOKABLE ( ForbidWeaponUse ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [41/158]

MUTATOR_HOOKABLE ( FormatMessage ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [42/158]

MUTATOR_HOOKABLE ( FragCenterMessage ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [43/158]

MUTATOR_HOOKABLE ( FusionReactor_ValidTarget ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [44/158]

MUTATOR_HOOKABLE ( GetCvars ,
EV_NO_ARGS  )

References EV_NO_ARGS, and GetCvars().

◆ MUTATOR_HOOKABLE() [45/158]

MUTATOR_HOOKABLE ( GetModelParams ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [46/158]

MUTATOR_HOOKABLE ( GetPlayerLimit ,
params  )

References GetPlayerLimit(), and params.

◆ MUTATOR_HOOKABLE() [47/158]

MUTATOR_HOOKABLE ( GetPlayerStatus ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [48/158]

MUTATOR_HOOKABLE ( GetPressedKeys ,
params  )

References GetPressedKeys(), and params.

◆ MUTATOR_HOOKABLE() [49/158]

MUTATOR_HOOKABLE ( GetRecords ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [50/158]

MUTATOR_HOOKABLE ( GetResourceLimit ,
params  )

References GetResourceLimit(), and params.

◆ MUTATOR_HOOKABLE() [51/158]

MUTATOR_HOOKABLE ( GiveFragsForKill ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [52/158]

MUTATOR_HOOKABLE ( GiveResource ,
params  )

References GiveResource(), and params.

◆ MUTATOR_HOOKABLE() [53/158]

MUTATOR_HOOKABLE ( GiveResourceWithLimit ,
params  )

References GiveResourceWithLimit(), and params.

◆ MUTATOR_HOOKABLE() [54/158]

MUTATOR_HOOKABLE ( GrappleHookThink ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [55/158]

MUTATOR_HOOKABLE ( HavocBot_Aim ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [56/158]

MUTATOR_HOOKABLE ( HavocBot_ChooseRole ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [57/158]

MUTATOR_HOOKABLE ( HelpMePing ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [58/158]

MUTATOR_HOOKABLE ( Item_RespawnCountdown ,
params  )

References Item_RespawnCountdown(), and params.

◆ MUTATOR_HOOKABLE() [59/158]

MUTATOR_HOOKABLE ( Item_ScheduleRespawn ,
params  )

References Item_ScheduleRespawn(), and params.

◆ MUTATOR_HOOKABLE() [60/158]

MUTATOR_HOOKABLE ( Item_Spawn ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [61/158]

MUTATOR_HOOKABLE ( ItemModel ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [62/158]

MUTATOR_HOOKABLE ( ItemSound ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [63/158]

MUTATOR_HOOKABLE ( ItemTouch ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [64/158]

MUTATOR_HOOKABLE ( ItemTouched ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [65/158]

MUTATOR_HOOKABLE ( LockWeapon ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [66/158]

MUTATOR_HOOKABLE ( LogDeath_AppendItemCodes ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [67/158]

MUTATOR_HOOKABLE ( MakePlayerObserver ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [68/158]

MUTATOR_HOOKABLE ( MatchEnd ,
EV_NO_ARGS  )

Called when the match ends.

References EV_NO_ARGS.

◆ MUTATOR_HOOKABLE() [69/158]

MUTATOR_HOOKABLE ( MatchEnd_BeforeScores ,
EV_NO_ARGS  )

Called when the match ends, before recording scores.

References EV_NO_ARGS.

◆ MUTATOR_HOOKABLE() [70/158]

MUTATOR_HOOKABLE ( MonsterCheckBossFlag ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [71/158]

MUTATOR_HOOKABLE ( MonsterDies ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [72/158]

MUTATOR_HOOKABLE ( MonsterDropItem ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [73/158]

MUTATOR_HOOKABLE ( MonsterFindTarget ,
EV_NO_ARGS  )

Called when a monster looks for another target.

References EV_NO_ARGS.

◆ MUTATOR_HOOKABLE() [74/158]

MUTATOR_HOOKABLE ( MonsterModel ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [75/158]

MUTATOR_HOOKABLE ( MonsterMove ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [76/158]

MUTATOR_HOOKABLE ( MonsterRemove ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [77/158]

MUTATOR_HOOKABLE ( MonsterRespawn ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [78/158]

MUTATOR_HOOKABLE ( MonsterSpawn ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [79/158]

MUTATOR_HOOKABLE ( MonsterValidTarget ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [80/158]

MUTATOR_HOOKABLE ( OnEntityPreSpawn ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [81/158]

MUTATOR_HOOKABLE ( Player_ChangedTeam ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [82/158]

MUTATOR_HOOKABLE ( Player_ChangeTeam ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [83/158]

MUTATOR_HOOKABLE ( PlayerAnim ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [84/158]

MUTATOR_HOOKABLE ( PlayerDamage_SplitHealthArmor ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [85/158]

MUTATOR_HOOKABLE ( PlayerDamaged ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [86/158]

MUTATOR_HOOKABLE ( PlayerDied ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [87/158]

MUTATOR_HOOKABLE ( PlayerDies ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [88/158]

MUTATOR_HOOKABLE ( PlayerIsInvisible ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [89/158]

MUTATOR_HOOKABLE ( PlayerPhysics_PostUpdateStats ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [90/158]

MUTATOR_HOOKABLE ( PlayerPhysics_UpdateStats ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [91/158]

MUTATOR_HOOKABLE ( PlayerPowerups ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [92/158]

MUTATOR_HOOKABLE ( PlayerPreThink ,
params  )

References params, and PlayerPreThink.

◆ MUTATOR_HOOKABLE() [93/158]

MUTATOR_HOOKABLE ( PlayerRegen ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [94/158]

MUTATOR_HOOKABLE ( PlayerSpawn ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [95/158]

MUTATOR_HOOKABLE ( PlayerUseKey ,
params  )

References params, and PlayerUseKey().

◆ MUTATOR_HOOKABLE() [96/158]

MUTATOR_HOOKABLE ( PlayerWeaponSelect ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [97/158]

MUTATOR_HOOKABLE ( PlayHitsound ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [98/158]

MUTATOR_HOOKABLE ( PortalTeleport ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [99/158]

MUTATOR_HOOKABLE ( PreferPlayerScore_Clear ,
EV_NO_ARGS  )

Return 1 if player score shall be cleared with g_score_resetonjoin -1.

References EV_NO_ARGS.

◆ MUTATOR_HOOKABLE() [100/158]

MUTATOR_HOOKABLE ( PreFormatMessage ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [101/158]

MUTATOR_HOOKABLE ( PrepareExplosionByDamage ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [102/158]

MUTATOR_HOOKABLE ( PutClientInServer ,
params  )

References params, and PutClientInServer.

◆ MUTATOR_HOOKABLE() [103/158]

MUTATOR_HOOKABLE ( Race_FinalCheckpoint ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [104/158]

MUTATOR_HOOKABLE ( ReadLevelCvars ,
EV_NO_ARGS  )

References EV_NO_ARGS.

◆ MUTATOR_HOOKABLE() [105/158]

MUTATOR_HOOKABLE ( ReadyRestart_Deny ,
EV_NO_ARGS  )

Return true to restart the server instead of restarting the match, for modes that don't support readyrestart.

NOTE: ReadyRestart support is mandatory in campaign

References EV_NO_ARGS.

◆ MUTATOR_HOOKABLE() [106/158]

MUTATOR_HOOKABLE ( reset_map_global ,
EV_NO_ARGS  )

Called in reset_map.

References EV_NO_ARGS.

◆ MUTATOR_HOOKABLE() [107/158]

MUTATOR_HOOKABLE ( reset_map_players ,
EV_NO_ARGS  )

Called in reset_map.

References EV_NO_ARGS.

◆ MUTATOR_HOOKABLE() [108/158]

MUTATOR_HOOKABLE ( ResourceAmountChanged ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [109/158]

MUTATOR_HOOKABLE ( ResourceWasted ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [110/158]

MUTATOR_HOOKABLE ( Sandbox_DragAllowed ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [111/158]

MUTATOR_HOOKABLE ( Sandbox_EditAllowed ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [112/158]

MUTATOR_HOOKABLE ( Sandbox_SaveAllowed ,
EV_NO_ARGS  )

Return true to prevent writing sandbox changes to storage.

References EV_NO_ARGS.

◆ MUTATOR_HOOKABLE() [113/158]

MUTATOR_HOOKABLE ( Scores_CountFragsRemaining ,
EV_NO_ARGS  )

Return error to play frag remaining announcements.

References EV_NO_ARGS.

◆ MUTATOR_HOOKABLE() [114/158]

MUTATOR_HOOKABLE ( SendWaypoint ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [115/158]

MUTATOR_HOOKABLE ( SetChangeParms ,
EV_NO_ARGS  )

References EV_NO_ARGS, and SetChangeParms.

◆ MUTATOR_HOOKABLE() [116/158]

MUTATOR_HOOKABLE ( SetDefaultAlpha ,
EV_NO_ARGS  )

References EV_NO_ARGS, and SetDefaultAlpha().

◆ MUTATOR_HOOKABLE() [117/158]

MUTATOR_HOOKABLE ( SetModname ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [118/158]

MUTATOR_HOOKABLE ( SetNewParms ,
EV_NO_ARGS  )

References EV_NO_ARGS, and SetNewParms.

◆ MUTATOR_HOOKABLE() [119/158]

MUTATOR_HOOKABLE ( SetResource ,
params  )

References params, and SetResource().

◆ MUTATOR_HOOKABLE() [120/158]

MUTATOR_HOOKABLE ( SetStartItems ,
EV_NO_ARGS  )

Adjusts {warmup_}start_{items,weapons,ammo_{cells,rockets,nails,shells,fuel}}.

References EV_NO_ARGS.

◆ MUTATOR_HOOKABLE() [121/158]

MUTATOR_HOOKABLE ( SetWeaponArena ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [122/158]

MUTATOR_HOOKABLE ( SetWeaponreplace ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [123/158]

MUTATOR_HOOKABLE ( SetWeaponStay ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [124/158]

MUTATOR_HOOKABLE ( ShowChatBubble ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [125/158]

MUTATOR_HOOKABLE ( Spawn_Score ,
params  )

References params, and Spawn_Score().

◆ MUTATOR_HOOKABLE() [126/158]

MUTATOR_HOOKABLE ( SpectateCopy ,
params  )

References params, and SpectateCopy().

◆ MUTATOR_HOOKABLE() [127/158]

MUTATOR_HOOKABLE ( SpectateNext ,
params  )

References params, and SpectateNext().

◆ MUTATOR_HOOKABLE() [128/158]

MUTATOR_HOOKABLE ( SpectatePrev ,
params  )

References params, and SpectatePrev().

◆ MUTATOR_HOOKABLE() [129/158]

MUTATOR_HOOKABLE ( SpectateSet ,
params  )

References params, and SpectateSet().

◆ MUTATOR_HOOKABLE() [130/158]

MUTATOR_HOOKABLE ( SuperweaponsImmutable ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [131/158]

MUTATOR_HOOKABLE ( SV_ParseClientCommand ,
params  )

References params, and SV_ParseClientCommand.

◆ MUTATOR_HOOKABLE() [132/158]

MUTATOR_HOOKABLE ( SV_ParseServerCommand ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [133/158]

MUTATOR_HOOKABLE ( SV_StartFrame ,
EV_NO_ARGS  )

runs globally each server frame

References EV_NO_ARGS.

◆ MUTATOR_HOOKABLE() [134/158]

MUTATOR_HOOKABLE ( TakeResource ,
params  )

References params, and TakeResource().

◆ MUTATOR_HOOKABLE() [135/158]

MUTATOR_HOOKABLE ( TakeResourceWithLimit ,
params  )

References params, and TakeResourceWithLimit().

◆ MUTATOR_HOOKABLE() [136/158]

◆ MUTATOR_HOOKABLE() [137/158]

MUTATOR_HOOKABLE ( TeamBalance_FindBestTeams ,
params  )

◆ MUTATOR_HOOKABLE() [138/158]

◆ MUTATOR_HOOKABLE() [139/158]

MUTATOR_HOOKABLE ( TeamBalance_GetTeamCount ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [140/158]

MUTATOR_HOOKABLE ( TeamBalance_GetTeamCounts ,
EV_NO_ARGS  )

Return true to manually override team counts.

References EV_NO_ARGS, and TeamBalance_GetTeamCounts().

◆ MUTATOR_HOOKABLE() [141/158]

MUTATOR_HOOKABLE ( Turret_CheckFire ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [142/158]

MUTATOR_HOOKABLE ( Turret_Plasma_Fire ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [143/158]

MUTATOR_HOOKABLE ( TurretFire ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [144/158]

MUTATOR_HOOKABLE ( TurretSpawn ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [145/158]

MUTATOR_HOOKABLE ( TurretThink ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [146/158]

MUTATOR_HOOKABLE ( TurretValidateTarget ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [147/158]

MUTATOR_HOOKABLE ( URI_GetCallback ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [148/158]

MUTATOR_HOOKABLE ( VehicleEnter ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [149/158]

MUTATOR_HOOKABLE ( VehicleExit ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [150/158]

MUTATOR_HOOKABLE ( VehicleInit ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [151/158]

MUTATOR_HOOKABLE ( VehicleTouch ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [152/158]

MUTATOR_HOOKABLE ( VoteCommand_Parse ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [153/158]

MUTATOR_HOOKABLE ( W_DecreaseAmmo ,
params  )

References params, and W_DecreaseAmmo().

◆ MUTATOR_HOOKABLE() [154/158]

MUTATOR_HOOKABLE ( W_PlayStrengthSound ,
params  )

References params, and W_PlayStrengthSound().

◆ MUTATOR_HOOKABLE() [155/158]

MUTATOR_HOOKABLE ( W_Reload ,
params  )

References params, and W_Reload().

◆ MUTATOR_HOOKABLE() [156/158]

MUTATOR_HOOKABLE ( WantWeapon ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [157/158]

MUTATOR_HOOKABLE ( WeaponRateFactor ,
params  )

References params.

◆ MUTATOR_HOOKABLE() [158/158]

MUTATOR_HOOKABLE ( WeaponSpeedFactor ,
params  )

References params.

Variable Documentation

◆ get_cvars_f

float get_cvars_f

Definition at line 375 of file events.qh.

Referenced by GetCvars(), and Notification_GetCvars().

◆ get_cvars_s

string get_cvars_s

Definition at line 376 of file events.qh.

Referenced by GetCvars(), and Notification_GetCvars().

◆ monster_loot

string monster_loot

Definition at line 425 of file events.qh.

Referenced by monster_dropitem().