Warhorse ScripBind documentation
ContentsIndexHome
PreviousUpNext
C_ScriptBind_GameRules Methods

The methods of the C_ScriptBind_GameRules class are listed here.

 
Name 
Description 
 
Syntax: GameRules.AbortEntityRemoval( ScriptHandle entityId )
Aborts the entity removal.
 
 
Syntax: GameRules.AbortEntityRespawn( ScriptHandle entityId, bool destroyData )
Aborts a respawning for the specified entity.
 
 
Syntax: GameRules.AddMinimapEntity( ScriptHandle entityId, int type, float lifetime )
Adds a mipmap entity.
 
 
Syntax: GameRules.AddObjective( int teamId, const char *objective, int status, ScriptHandle entityId )
Adds an objective for the specified team with the specified status.
 
 
Syntax: GameRules.AddSpawnGroup(groupId)
Adds a spawn group.
 
 
Syntax: GameRules.AddSpawnLocation(entityId)
Adds the spawn location for the specified entity.
 
 
Syntax: GameRules.AddSpawnLocationToSpawnGroup(groupId,location)
Add a spawn location to spawn a group.
 
 
Syntax: GameRules.AddSpectatorLocation( ScriptHandle location )
Adds a spectator location. 
 
 
 
Syntax: GameRules.CanChangeSpectatorMode( ScriptHandle playerId )
Check if it's possible to change the spectator mode. 
 
Syntax: GameRules.CanCheat()
Checks if in this game entity is possible to cheat.
 
 
Syntax: GameRules.ChangePlayerClass( int channelId, const char *className )
Changes the player class.
 
 
Syntax: GameRules.ChangeSpectatorMode( ScriptHandle playerId, int mode, ScriptHandle targetId )
Changes the spectator mode. 
 
Syntax: GameRules.CreateTeam( const char *name )
Creates a team.
 
 
Syntax: GameRules.DebugCollisionDamage()
Debugs collision damage.
 
 
Syntax: GameRules.DebugHits()
Debugs hits.
 
 
Syntax: GameRules.EndGame()
Ends the game.
 
 
Syntax: GameRules.EndGameNear( ScriptHandle entityId ) 
 
Syntax: GameRules.EnteredGame()
Get the game rules and enter the game.
 
 
Syntax: GameRules.ForbiddenAreaWarning( bool active, int timer, ScriptHandle targetId )
Warnings for a forbidden area.
 
 
Syntax: GameRules.ForceScoreboard( bool force )
Forces the display of the scoreboard on the HUD.
 
 
Syntax: GameRules.ForceSynchedStorageSynch( int channelId )
Forces sync storage syncing.
 
 
Syntax: GameRules.FreezeEntity( ScriptHandle entityId, bool freeze, bool vapor, bool force ) 
 
Syntax: GameRules.FreezeInput( bool freeze )
Freezes the input.
 
 
For the power struggle tutorial. Syntax: GameRules.GameOver( int localWinner )
Ends the game with a local winner.
 
 
Syntax: GameRules.GetChannelId( playerId )
Gets the channel id where the specified player is.
 
 
Syntax: GameRules.GetChannelTeam( int channelId )
Gets the team in the specified channel.
 
 
Syntax: GameRules.GetFirstSpawnLocation( int teamId )
Gets the first spawn location for the team.
 
 
Syntax: GameRules.GetFragLead()
Gets the frag lead.
 
 
Syntax: GameRules.GetFragLimit()
Gets the frag limit.
 
 
Syntax: GameRules.GetFriendlyFireRatio()
Gets the friendly fire ratio.
 
 
Syntax: GameRules.GetHitMaterialId( const char *materialName )
Gets the hit material identifier from its name.
 
 
Syntax: GameRules.GetHitMaterialName( int materialId )
Gets the hit material name from its identifier.
 
 
Syntax: GameRules.GetHitType( int id ) id - Identifier.
 
 
Syntax: GameRules.GetHitTypeId( const char *type )
Gets a hit type identifier from the name.
 
 
Syntax: GameRules.GetInterestingSpectatorLocation( )
Gets an interesting spectator location. 
 
Syntax: GameRules.GetMinPlayerLimit()
Gets the minimum player limit. 
 
Syntax: GameRules.GetMinTeamLimit()
Gets the minimum team limit.
 
 
Syntax: GameRules.GetNextSpectatorTarget( ScriptHandle playerId, int change )
For 3rd person follow-cam mode. Gets the next spectator target. 
 
Syntax: GameRules.GetPing( int channelId )
Gets the ping to a channel.
 
 
Syntax: GameRules.GetPlayerByChannelId( int channelId )
Gets the player from the channel id.
 
 
Syntax: GameRules.GetPlayerCount()
Gets the number of the players.
 
 
Syntax: GameRules.GetPlayers()
Gets the player.
 
 
Syntax: GameRules.GetPreRoundTime()
Gets the pre-round time.
 
 
Syntax: GameRules.GetRandomSpectatorLocation( )
Gets a random spectator location. 
 
Syntax: GameRules.GetRemainingGameTime()
Gets the remaining game time.
 
 
Syntax: GameRules.GetRemainingPreRoundTime()
Gets the remaining pre-round time.
 
 
Syntax: GameRules.GetRemainingReviveCycleTime()
Gets the remaining cycle time.
 
 
Syntax: GameRules.GetRemainingRoundTime()
Gets the remaining round time.
 
 
Syntax: GameRules.GetRemainingStartTimer( )
Gets the remaining start timer.
 
 
Syntax: GameRules.GetReviveTime()
Gets the revive time.
 
 
Syntax: GameRules.GetRoundLimit()
Gets the round time limit.
 
 
Syntax: GameRules.GetRoundTime()
Gets the round time.
 
 
Syntax: GameRules.GetSpawnGroups()
Gets spawn groups.
 
 
Syntax: GameRules.GetSpawnLocation( playerId, bool ignoreTeam, bool includeNeutral ) 
 
Syntax: GameRules.GetSpawnLocationByIdx( int idx )
Gets the spawn location from its identifier.
 
 
Syntax: GameRules.GetSpawnLocationCount()
Gets the number of the spawn location.
 
 
Syntax: GameRules.GetSpawnLocationGroup(spawnId)
Gets spawn location group.
 
 
Syntax: GameRules.GetSpawnLocations()
Gets the spawn locations.
 
 
Syntax: GameRules.GetSpectatorCount()
Gets the number of the spectators. 
 
Syntax: GameRules.GetSpectatorLocation( int idx )
Gets the spectator location from its identifier. 
 
Syntax: GameRules.GetSpectatorLocationCount( )
Gets the number of the spectator locations. 
 
Syntax: GameRules.GetSpectatorLocations( )
Gets the spectator locations. 
 
Syntax: GameRules.GetSynchedEntityValue( ScriptHandle entityId, int key )
Gets the specified sync entity value.
 
 
Syntax: GameRules.GetSynchedGlobalValue( int key )
Gets the sync global value from its key.
 
 
Syntax: GameRules.GetTeam( ScriptHandle playerId )
Gets the team of the specified player.
 
 
Syntax: GameRules.GetTeamChannelCount( int teamId )
Gets the team channel count.
 
 
Syntax: GameRules.GetTeamCount( )
Gets the team number.
 
 
Syntax: GameRules.GetTeamDefaultSpawnGroup( int teamId )
Gets team default spawn group.
 
 
Syntax: GameRules.GetTeamId( const char *teamName )
Gets the team identifier from the team name.
 
 
Syntax: GameRules.GetTeamLock()
Gets the team lock.
 
 
Syntax: GameRules.GetTeamName( int teamId )
Gets the name of the specified team.
 
 
Syntax: GameRules.GetTeamPlayerCount( int teamId )
Gets the number of players in the specified team.
 
 
Syntax: GameRules.GetTeamPlayers( int teamId )
Gets the players in the specified team.
 
 
Syntax: GameRules.GetTimeLimit()
Gets the time limit.
 
 
Syntax: GameRules.IsClient()
Checks if this entity is a client.
 
 
Syntax: GameRules.IsDemoMode()
Checks if the game is running in demo mode.
 
 
Syntax: GameRules.IsFrozen( ScriptHandle entityId )
Checks if the entity is frozen.
 
 
Syntax: GameRules.IsInvulnerable( ScriptHandle playerId )
Checks if the player is invulnerable.
 
 
Syntax: GameRules.IsNeutral(entityId)
Checks if the entity is neutral.
 
 
Syntax: GameRules.IsPlayerInGame(playerId)
Checks if the specified player is in game.
 
 
Syntax: GameRules.IsProjectile(entityId)
Checks if the specified entity is a projectile.
 
 
Syntax: GameRules.IsRoundTimeLimited()
Checks if the round time is limited.
 
 
Syntax: GameRules.IsSameTeam(entityId0,entityId1)
Checks if the two entity are in the same team.
 
 
Syntax: GameRules.IsServer()
Checks if this entity is a server.
 
 
Syntax: GameRules.IsSpawnGroup(entityId)
Checks if the entity is a spawn group.
 
 
Syntax: GameRules.IsTimeLimited()
Checks if the game time is limited.
 
 
Syntax: GameRules.KillPlayer( ScriptHandle playerId, bool dropItem, bool ragdoll, ScriptHandle shooterId, ScriptHandle weaponId, float damage, int material, int hit_type, Vec3 impulse)
Kills the player.
 
 
Syntax: GameRules.MovePlayer( ScriptHandle playerId, Vec3 pos, Vec3 angles )
Moves the player.
 
 
Syntax: GameRules.NextLevel()
Loads the next level.
 
 
Syntax: GameRules.PerformDeadHit()
Performs a death hit.
 
 
Syntax: GameRules.ProcessEMPEffect( ScriptHandle targetId, float timeScale )
Processes the EMP (Electro Magnetic Pulse) effect.
 
 
Syntax: GameRules.RegisterHitMaterial( const char *materialName )
Registers the specified hit material.
 
 
Syntax: GameRules.RegisterHitType( const char *type )
Registers a type for the hits.
 
 
Syntax: GameRules.RemoveMinimapEntity( ScriptHandle entityId )
Removes a mipmap entity.
 
 
Syntax: GameRules.RemoveObjective( int teamId, const char *objective )
Removes an objective.
 
 
Syntax: GameRules.RemoveSpawnGroup(groupId)
Removes spawn group.
 
 
Syntax: GameRules.RemoveSpawnLocation(id)
Removes the span location.
 
 
Syntax: GameRules.RemoveSpawnLocationFromSpawnGroup(groupId,location)
Removes a spawn location from spawn group.
 
 
Syntax: GameRules.RemoveSpectatorLocation( ScriptHandle id )
Removes a spectator location. 
 
Syntax: GameRules.RemoveTeam( int teamId )
Removes the specified team.
 
 
Syntax: GameRules.RenamePlayer( ScriptHandle playerId, const char *name )
Renames the player.
 
 
Syntax: GameRules.ResetEntities( )
 
 
Syntax: GameRules.ResetGameStartTimer()
Resets game start timer.
 
 
Syntax: GameRules.ResetGameTime()
Resets the game time.
 
 
Syntax: GameRules.ResetHitMaterials()
Resets the hit materials.
 
 
Syntax: GameRules.ResetHitTypes()
Resets the hit types.
 
 
Syntax: GameRules.ResetMinimap( )
 
 
Syntax: GameRules.ResetObjectives( )
Resets all the objectives.
 
 
Syntax: GameRules.ResetPreRoundTime()
Resets the pre-round time.
 
 
Syntax: GameRules.ResetReviveCycleTime()
Resets the revive cycle time.
 
 
Syntax: GameRules.ResetRoundTime()
Resets the round time.
 
 
Syntax: GameRules.ResetSynchedStorage()
Resets the sync storage.
 
 
Syntax: GameRules.RevivePlayer( ScriptHandle playerId, Vec3 pos, Vec3 angles, int teamId, bool clearInventory )
Revives the player.
 
 
Syntax: GameRules.RevivePlayerInVehicle( ScriptHandle playerId, ScriptHandle vehicleId, int seatId, int teamId, bool clearInventory )
Revives a player inside a vehicle.
 
 
Syntax: GameRules.ScheduleEntityRemoval( ScriptHandle entityId, float timer, bool visibility )
Schedules the removal of the specified entity.
 
 
Syntax: GameRules.ScheduleEntityRespawn( ScriptHandle entityId, bool unique, float timer )
Schedules a respawning of the specified entity.
 
 
Syntax: GameRules.SendChatMessage( int type, ScriptHandle sourceId, ScriptHandle targetId, const char *msg )
Sends a text message from the source to the target with the specified type and text.
 
 
Syntax: GameRules.SendDamageIndicator( ScriptHandle targetId, ScriptHandle shooterId, ScriptHandle weaponId )
Send a damage indicator from the shooter to the target.
 
 
Syntax: GameRules.SendHitIndicator( ScriptHandle shooterId )
Sends a hit indicator.
 
 
Syntax: GameRules.SendTextMessage( int type, const char *msg )
Sends a text message type with the specified text.
 
 
Syntax: GameRules.ServerExplosion( ScriptHandle shooterId, ScriptHandle weaponId, float dmg, Vec3 pos, Vec3 dir, float radius, float angle, float pressure, float holesize )
 
 
Syntax: GameRules.ServerHit( ScriptHandle targetId, ScriptHandle shooterId, ScriptHandle weaponId, float dmg, float radius, int materialId, int partId, int typeId )
 
 
Syntax: GameRules.SetInvulnerability( ScriptHandle playerId, bool invulnerable )
Sets/unsets invulnerability for the specified player.
 
 
Syntax: GameRules.SetObjectiveEntity( int teamId, const char *objective, ScriptHandle entityId )
Sets the objective entity.
 
 
Syntax: GameRules.SetObjectiveStatus( int teamId, const char *objective, int status )
Sets the status of an objective.
 
 
Syntax: GameRules.SetPlayerSpawnGroup(ScriptHandle playerId, ScriptHandle groupId)
Sets the player spawn group.
 
 
Syntax: GameRules.SetSynchedEntityValue( ScriptHandle entityId, int key )
Sets a sync entity value.
 
 
Syntax: GameRules.SetSynchedGlobalValue( int key , value)
Sets a sync global value.
 
 
Syntax: GameRules.SetTeam( int teamId, ScriptHandle playerId )
Adds a player to a team.
 
 
Syntax: GameRules.SetTeamDefaultSpawnGroup( int teamId, groupId)
Sets the default spawn group for the team.
 
 
Syntax: GameRules.ShatterEntity( ScriptHandle entityId, Vec3 pos, Vec3 impulse )
Shatters an entity.
 
 
Syntax: GameRules.SpawnPlayer( int channelId, const char *name, const char *className, Vec3 pos, Vec3 angles )
Spawns a player.
 
 
Syntax: GameRules.SPNotifyPlayerKill( ScriptHandle targetId, ScriptHandle weaponId, bool bHeadShot )
Notifies that the player kills somebody. 
 
Syntax: GameRules.TextMessage( )
Displays a text message type with the specified text.
 
Copyright (c) 2012. All rights reserved.