Useful functions and variables from respawn#

Throughout this guide many functions and values made by respawn will be referenced in examples, in the interest of not confusing people those functions, and other frequently used ones, will be listed and explained here for a full list (although without explaination) go here

General functions#


Returns and array of entities representing each player, not that it does not just return return the playername but the actual entities, as such all values associated with players can be called like his


Returns the number of objects in an array, thats about it.


returns the remaining game time


returns the name of a weapon entity

Player functions#

This section contains many functions that can be applied to the player entity


returns a list of all weapons equipped by that player. this is a list of entities


Returns a list of all offhand weapons (grenades, boosts, abilities). this is a list of entities

player.TakeWeaponNow( weaponname )#

removes weapon of that name, best used with a foreach using the previous functions

player.GiveWeapon( Weaponname, mods)#

gives the player a weapon, the mods field must be empty or a list of strings ["mod","mod2"]