BaseMode Class |
Namespace: SampSharp.GameMode
public abstract class BaseMode : Disposable, IGameModeProvider, IDisposable
The BaseMode type exposes the following members.
Name | Description | |
---|---|---|
Client |
Gets the game mode client.
| |
Controllers |
Gets the collection of controllers loaded.
| |
Gravity |
Gets or sets the gravity.
| |
Instance |
Gets the instance.
| |
IsDisposed |
Gets whether this resource has been disposed.
(Inherited from Disposable.) | |
Services |
Gets the GameModeServiceContainer holding all the service providers attached to the game mode.
|
Name | Description | |
---|---|---|
AddPlayerClass(Int32, Vector3, Single) |
Adds a class to class selection. Classes are used so players may spawn with a skin of their choice.
| |
AddPlayerClass(Int32, Int32, Vector3, Single) |
Adds a class to class selection. Classes are used so players may spawn with a skin of their choice.
| |
AddPlayerClass(Int32, Vector3, Single, Weapon, Int32) |
Adds a class to class selection. Classes are used so players may spawn with a skin of their choice.
| |
AddPlayerClass(Int32, Int32, Vector3, Single, Weapon, Int32) |
Adds a class to class selection. Classes are used so players may spawn with a skin of their choice.
| |
AddPlayerClass(Int32, Vector3, Single, Weapon, Int32, Weapon, Int32) |
Adds a class to class selection. Classes are used so players may spawn with a skin of their choice.
| |
AddPlayerClass(Int32, Int32, Vector3, Single, Weapon, Int32, Weapon, Int32) |
Adds a class to class selection. Classes are used so players may spawn with a skin of their choice.
| |
AddPlayerClass(Int32, Vector3, Single, Weapon, Int32, Weapon, Int32, Weapon, Int32) |
Adds a class to class selection. Classes are used so players may spawn with a skin of their choice.
| |
AddPlayerClass(Int32, Int32, Vector3, Single, Weapon, Int32, Weapon, Int32, Weapon, Int32) |
Adds a class to class selection. Classes are used so players may spawn with a skin of their choice.
| |
AllowInteriorWeapons |
Toggle whether the usage of weapons in interiors is allowed or not.
| |
AssertNotDisposed |
Checks whether this instance has been disposed. If it has, it throws an exception.
(Inherited from Disposable.) | |
AutoloadControllersForAssembly |
Autoloads the controllers in the specified assembly.
| |
DisableInteriorEnterExits |
Disable all the interior entrances and exits in the game (the yellow arrows at doors).
| |
DisableNameTagLOS |
Disables the name tag line of sight test.
| |
Dispose |
Performs tasks associated with freeing, releasing, or resetting unmanaged resources.
(Inherited from Disposable.) | |
Dispose(Boolean) |
Performs tasks associated with freeing, releasing, or resetting unmanaged resources.
(Overrides DisposableDispose(Boolean).) | |
EnableStuntBonusForAll |
Enables or disables stunt bonuses for all players.
| |
EnableTirePopping |
With this function you can enable or disable tire popping.
| |
EnableVehicleFriendlyFire |
Enable friendly fire for team vehicles.
| |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Exit |
Ends and restarts the game mode.
| |
Finalize |
Finalizes an instance of the Disposable class.
(Inherited from Disposable.) | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
LimitGlobalChatRadius |
Set a radius limitation for the chat. Only players at a certain distance from the player will see their message in
the chat. Also changes the distance at which a player can see other players on the map at the same distance.
| |
LimitPlayerMarkerRadius |
Set the player marker radius.
| |
LoadControllers |
Loads all controllers into the given ControllerCollection.
| |
ManualVehicleEngineAndLights |
Use this function before any player connects (OnInitialized(EventArgs)) to tell all clients that the
script will control vehicle engines and lights. This prevents the game automatically turning the engine on/off when
players enter/exit vehicles and headlights automatically coming on when it is dark.
| |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
OnActorStreamIn |
Raises the ActorStreamIn event.
| |
OnActorStreamOut |
Raises the ActorStreamOut event.
| |
OnDialogResponse |
Raises the DialogResponse event.
| |
OnExited |
Raises the Exited event.
| |
OnIncomingConnection |
Raises the IncomingConnection event.
| |
OnInitialized |
Raises the Initialized event.
| |
OnObjectMoved |
Raises the ObjectMoved event.
| |
OnPlayerCancelClickTextDraw |
Raises the PlayerCancelClickTextDraw event.
| |
OnPlayerCleanup |
Raises the PlayerCleanup event.
| |
OnPlayerClickMap |
Raises the PlayerClickMap event.
| |
OnPlayerClickPlayer |
Raises the PlayerClickPlayer event.
| |
OnPlayerClickPlayerTextDraw |
Raises the PlayerClickPlayerTextDraw event.
| |
OnPlayerClickTextDraw |
Raises the PlayerClickTextDraw event.
| |
OnPlayerCommandText |
Raises the PlayerCommandText event.
| |
OnPlayerConnected |
Raises the PlayerConnected event.
| |
OnPlayerDied |
Raises the PlayerDied event.
| |
OnPlayerDisconnected |
Raises the PlayerDisconnected event.
| |
OnPlayerEditAttachedObject |
Raises the PlayerEditAttachedObject event.
| |
OnPlayerEditGlobalObject |
Raises the PlayerEditGlobalObject event.
| |
OnPlayerEditPlayerObject |
Raises the PlayerEditPlayerObject event.
| |
OnPlayerEnterCheckpoint |
Raises the PlayerEnterCheckpoint event.
| |
OnPlayerEnterExitModShop |
Raises the PlayerEnterExitModShop event.
| |
OnPlayerEnterRaceCheckpoint |
Raises the PlayerEnterRaceCheckpoint event.
| |
OnPlayerEnterVehicle |
Raises the PlayerEnterVehicle event.
| |
OnPlayerExitedMenu |
Raises the PlayerExitedMenu event.
| |
OnPlayerExitVehicle |
Raises the PlayerExitVehicle event.
| |
OnPlayerGiveDamage |
Raises the PlayerGiveDamage event.
| |
OnPlayerGiveDamageActor |
Raises the PlayerGiveDamageActor event.
| |
OnPlayerInteriorChanged |
Raises the PlayerInteriorChanged event.
| |
OnPlayerKeyStateChanged |
Raises the PlayerKeyStateChanged event.
| |
OnPlayerLeaveCheckpoint |
Raises the PlayerLeaveCheckpoint event.
| |
OnPlayerLeaveRaceCheckpoint |
Raises the PlayerLeaveRaceCheckpoint event.
| |
OnPlayerObjectMoved |
Raises the PlayerObjectMoved event.
| |
OnPlayerPickUpPickup |
Raises the PlayerPickUpPickup event.
| |
OnPlayerRequestClass |
Raises the PlayerRequestClass event.
| |
OnPlayerRequestSpawn |
Raises the PlayerRequestSpawn event.
| |
OnPlayerSelectedMenuRow |
Raises the PlayerSelectedMenuRow event.
| |
OnPlayerSelectGlobalObject |
Raises the PlayerSelectGlobalObject event.
| |
OnPlayerSelectPlayerObject |
Raises the PlayerSelectPlayerObject event.
| |
OnPlayerSpawned |
Raises the PlayerSpawned event.
| |
OnPlayerStateChanged |
Raises the PlayerStateChanged event.
| |
OnPlayerStreamIn |
Raises the PlayerStreamIn event.
| |
OnPlayerStreamOut |
Raises the PlayerStreamOut event.
| |
OnPlayerTakeDamage |
Raises the PlayerTakeDamage event.
| |
OnPlayerText |
Raises the PlayerText event.
| |
OnPlayerUpdate |
Raises the PlayerUpdate event.
| |
OnPlayerWeaponShot |
Raises the PlayerWeaponShot event.
| |
OnRconCommand |
Raises the RconCommand event.
| |
OnRconLoginAttempt |
Raises the RconLoginAttempt event.
| |
OnTick |
Raises the Tick event.
| |
OnTrailerUpdate |
Raises the TrailerUpdate event.
| |
OnUnoccupiedVehicleUpdated |
Raises the UnoccupiedVehicleUpdated event.
| |
OnVehicleDamageStatusUpdated |
Raises the VehicleDamageStatusUpdated event.
| |
OnVehicleDied |
Raises the VehicleDied event.
| |
OnVehicleMod |
Raises the VehicleMod event.
| |
OnVehiclePaintjobApplied |
Raises the VehiclePaintjobApplied event.
| |
OnVehicleResprayed |
Raises the VehicleResprayed event.
| |
OnVehicleSirenStateChange |
Raises the VehicleSirenStateChange event.
| |
OnVehicleSpawned |
Raises the VehicleSpawned event.
| |
OnVehicleStreamIn |
Raises the VehicleStreamIn event.
| |
OnVehicleStreamOut |
Raises the VehicleStreamOut event.
| |
RegisterExtensionT |
Registers the specified extension.
| |
SendRconCommand |
Sends an RCON command.
| |
SetGameModeText |
Set the name of the game mode, which appears in the server browser.
| |
SetNameTagDrawDistance |
Set the maximum distance to display the names of players.
| |
SetTeamCount |
This function is used to change the amount of teams used in the game mode. It has no obvious way of being used, but
can help to indicate the number of teams used for better (more effective) internal handling. This function should
only be used in the OnInitialized(EventArgs) callback.
| |
ShowNameTags |
Toggle the drawing of player name tags, health bars and armor bars above players.
| |
ShowPlayerMarkers |
A function that can be used in OnInitialized(EventArgs) to enable or disable the players markers,
which would normally be shown on the radar. If you want to change the marker settings at some other point in the
gamemode, have a look at SetPlayerMarker(BasePlayer, Color) which does exactly that.
| |
ToString | Returns a string that represents the current object. (Inherited from Object.) | |
UsePlayerPedAnimations |
Uses standard player walking animation (animation of CJ) instead of custom animations for every skin (e.g. skating
for skater skins).
|
Name | Description | |
---|---|---|
ActorStreamIn |
Occurs when the OnActorStreamIn(Actor, PlayerEventArgs) callback is being called.
This callback is called when an actor is streamed in by a player's client.
| |
ActorStreamOut |
Occurs when the OnActorStreamOut(Actor, PlayerEventArgs) callback is being called.
This callback is called when an actor is streamed out by a player's client.
| |
DialogResponse |
Occurs when the OnDialogResponse(BasePlayer, DialogResponseEventArgs) callback is being called.
This callback is called when a player responds to a dialog shown using Dialog by
either clicking a button, pressing ENTER/ESC or double-clicking a list item (if using a list style dialog).
| |
Disposed |
Occurs when this isntance has been disposed.
(Inherited from Disposable.) | |
Exited |
Occurs when the OnExited(EventArgs) callback is being called.
This callback is called when a gamemode ends.
| |
IncomingConnection |
Occurs when the OnIncomingConnection(ConnectionEventArgs) callback is being called.
This callback is called when an IP address attempts a connection to the server.
| |
Initialized |
Occurs when the OnInitialized(EventArgs) callback is being called.
This callback is triggered when the gamemode starts.
| |
ObjectMoved |
Occurs when the OnObjectMoved(GlobalObject, EventArgs) callback is being called.
This callback is called when an object is moved using Move(Vector3, Single) or
Move(Vector3, Single, Vector3) (when it stops moving).
| |
PlayerCancelClickTextDraw |
Occurs when the OnPlayerCancelClickTextDraw(BasePlayer, PlayerEventArgs) callback is being called.
This callback is called when a player cancels the textdraw select mode(ESC).
| |
PlayerCleanup |
Occurs when the OnPlayerCleanup(BasePlayer, DisconnectEventArgs) callback is being called.
This callback is called after a player has disconnected.
| |
PlayerClickMap |
Occurs when the OnPlayerClickMap(BasePlayer, PositionEventArgs) callback is being called.
This callback is called when a player places a target/waypoint on the pause menu map (by right-clicking).
| |
PlayerClickPlayer |
Occurs when the OnPlayerClickPlayer(BasePlayer, ClickPlayerEventArgs) callback is being called.
Called when a player double-clicks on a player on the scoreboard.
| |
PlayerClickPlayerTextDraw |
Occurs when the OnPlayerClickPlayerTextDraw(BasePlayer, ClickPlayerTextDrawEventArgs) callback is
being called. This callback is called when a player clicks on a player-textdraw. It is not called when player cancels
the select mode (ESC).
| |
PlayerClickTextDraw |
Occurs when the OnPlayerClickTextDraw(BasePlayer, ClickTextDrawEventArgs) callback is being called.
This callback is called when a player clicks on a textdraw. It is not called when player cancels the select mode (ESC).
| |
PlayerCommandText |
Occurs when the OnPlayerCommandText(BasePlayer, CommandTextEventArgs) callback is being called.
This callback is called when a player enters a command into the client chat window, e.g. /help.
| |
PlayerConnected |
Occurs when the OnPlayerConnected(BasePlayer, EventArgs) callback is being called.
This callback is called when a player connects to the server.
| |
PlayerDied |
Occurs when the OnPlayerDied(BasePlayer, DeathEventArgs) callback is being called.
This callback is triggered when the gamemode starts.
| |
PlayerDisconnected |
Occurs when the OnPlayerDisconnected(BasePlayer, DisconnectEventArgs) callback is being called.
This callback is called when a player disconnects from the server.
| |
PlayerEditAttachedObject |
Occurs when the OnPlayerEditAttachedObject(BasePlayer, EditAttachedObjectEventArgs) callback is being
called.
This callback is called when a player ends attached object edition mode.
| |
PlayerEditGlobalObject |
Occurs when the OnPlayerEditGlobalObject(BasePlayer, EditGlobalObjectEventArgs) callback is being
called.
This callback is called when a player ends global object edition mode.
| |
PlayerEditPlayerObject |
Occurs when the OnPlayerEditPlayerObject(BasePlayer, EditPlayerObjectEventArgs) callback is being
called.
This callback is called when a player ends player object edition mode.
| |
PlayerEnterCheckpoint |
Occurs when the OnPlayerEnterCheckpoint(BasePlayer, EventArgs) callback is being called.
This callback is called when a player enters the checkpoint set for that player.
| |
PlayerEnterExitModShop |
Occurs when the OnPlayerEnterExitModShop(BasePlayer, EnterModShopEventArgs) callback is being called.
This callback is called when a player enters or exits a mod shop.
| |
PlayerEnterRaceCheckpoint |
Occurs when the OnPlayerEnterRaceCheckpoint(BasePlayer, EventArgs) callback is being called.
This callback is called when a player enters a race checkpoint.
| |
PlayerEnterVehicle |
Occurs when the OnPlayerEnterVehicle(BasePlayer, EnterVehicleEventArgs) callback is being called.
This callback is called when a player starts to enter a vehicle, meaning the player is not in vehicle yet at the
time this callback is called.
| |
PlayerExitedMenu |
Occurs when the OnPlayerExitedMenu(BasePlayer, EventArgs) callback is being called.
Called when a player exits a menu.
| |
PlayerExitVehicle |
Occurs when the OnPlayerExitVehicle(BasePlayer, PlayerVehicleEventArgs) callback is being called.
This callback is called when a player exits a vehicle.
| |
PlayerGiveDamage |
Occurs when the OnPlayerGiveDamage(BasePlayer, DamageEventArgs) callback is being called.
This callback is called when a player gives damage to another player.
| |
PlayerGiveDamageActor |
Occurs when the OnPlayerGiveDamageActor(Actor, DamageEventArgs) callback is being called.
This callback is called when a player gives damage to an actor.
| |
PlayerInteriorChanged |
Occurs when the OnPlayerInteriorChanged(BasePlayer, InteriorChangedEventArgs) callback is being called.
Called when a player changes interior.
| |
PlayerKeyStateChanged |
Occurs when the OnPlayerKeyStateChanged(BasePlayer, KeyStateChangedEventArgs) callback is being called.
This callback is called when the state of any supported key is changed (pressed/released). Directional keys do not
trigger this callback.
| |
PlayerLeaveCheckpoint |
Occurs when the OnPlayerLeaveCheckpoint(BasePlayer, EventArgs) callback is being called.
This callback is called when a player leaves the checkpoint set for that player.
| |
PlayerLeaveRaceCheckpoint |
Occurs when the OnPlayerLeaveRaceCheckpoint(BasePlayer, EventArgs) callback is being called.
This callback is called when a player leaves the race checkpoint.
| |
PlayerObjectMoved |
Occurs when the OnPlayerObjectMoved(PlayerObject, EventArgs) callback is being called.
This callback is called when an object is moved using Move(Vector3, Single) or
Move(Vector3, Single, Vector3) (when it stops moving).
| |
PlayerPickUpPickup |
Occurs when the OnPlayerPickUpPickup(BasePlayer, PickUpPickupEventArgs) callback is being called.
Called when a player picks up a pickup created with Pickup.
| |
PlayerRequestClass |
Occurs when the OnPlayerRequestClass(BasePlayer, RequestClassEventArgs) callback is being called.
Called when a player changes class at class selection (and when class selection first appears).
| |
PlayerRequestSpawn |
Occurs when the OnPlayerRequestSpawn(BasePlayer, RequestSpawnEventArgs) callback is being called.
Called when a player attempts to spawn via class selection.
| |
PlayerSelectedMenuRow |
Occurs when the OnPlayerSelectedMenuRow(BasePlayer, MenuRowEventArgs) callback is being called.
This callback is called when a player selects an item from a menu.
| |
PlayerSelectGlobalObject |
Occurs when the OnPlayerSelectGlobalObject(BasePlayer, SelectGlobalObjectEventArgs) callback is being called.
This callback is called when a player selects an object after Select(BasePlayer) has been used.
| |
PlayerSelectPlayerObject |
Occurs when the OnPlayerSelectPlayerObject(BasePlayer, SelectPlayerObjectEventArgs) callback is being called.
This callback is called when a player selects an object after Select(BasePlayer) has been used.
| |
PlayerSpawned |
Occurs when the OnPlayerSpawned(BasePlayer, SpawnEventArgs) callback is being called.
This callback is called when a player spawns.
| |
PlayerStateChanged |
Occurs when the OnPlayerStateChanged(BasePlayer, StateEventArgs) callback is being called.
This callback is called when a player exits a vehicle.
| |
PlayerStreamIn |
Occurs when the OnPlayerStreamIn(BasePlayer, PlayerEventArgs) callback is being called.
This callback is called when a player is streamed by some other player's client.
| |
PlayerStreamOut |
Occurs when the OnPlayerStreamOut(BasePlayer, PlayerEventArgs) callback is being called.
This callback is called when a player is streamed out from some other player's client.
| |
PlayerTakeDamage |
Occurs when the OnPlayerTakeDamage(BasePlayer, DamageEventArgs) callback is being called.
This callback is called when a player takes damage.
| |
PlayerText |
Occurs when the OnPlayerText(BasePlayer, TextEventArgs) callback is being called.
Called when a player sends a chat message.
| |
PlayerUpdate |
Occurs when the OnPlayerUpdate(BasePlayer, PlayerUpdateEventArgs) callback is being called.
This callback is called everytime a client/player updates the server with their status.
| |
PlayerWeaponShot |
Occurs when the OnPlayerWeaponShot(BasePlayer, WeaponShotEventArgs) callback is being called.
This callback is called when a player fires a shot from a weapon.
| |
RconCommand |
Occurs when the OnRconCommand(RconEventArgs) callback is being called.
This callback is called when a command is sent through the server console, remote RCON, or via the in-game /rcon
command.
| |
RconLoginAttempt |
Occurs when the OnRconLoginAttempt(RconLoginAttemptEventArgs) callback is being called.
This callback is called when someone tries to login to RCON, succesful or not.
| |
Tick |
Occurs when the OnTick(EventArgs) callback is being called. This callback is called every
tick(50 times per second).
| |
TrailerUpdate |
Occurs when the OnTrailerUpdate(BaseVehicle, TrailerEventArgs) callback is being called.
This callback is called when a player sent a trailer update.
| |
UnoccupiedVehicleUpdated |
Occurs when the OnUnoccupiedVehicleUpdated(BaseVehicle, UnoccupiedVehicleEventArgs) callback is being called.
This callback is called everytime an unoccupied vehicle updates the server with their status.
| |
VehicleDamageStatusUpdated |
Occurs when the OnVehicleDamageStatusUpdated(BaseVehicle, PlayerEventArgs) callback is being called.
This callback is called when a vehicle element such as doors, tires, panels, or lights get damaged.
| |
VehicleDied |
Occurs when the OnVehicleDied(BaseVehicle, PlayerEventArgs) callback is being called.
This callback is called when a vehicle is destroyed - either by exploding or becoming submerged in water.
| |
VehicleMod |
Occurs when the OnVehicleMod(BaseVehicle, VehicleModEventArgs) callback is being called.
This callback is called when a vehicle is modded.
| |
VehiclePaintjobApplied |
Occurs when the OnVehiclePaintjobApplied(BaseVehicle, VehiclePaintjobEventArgs) callback is being called.
Called when a player changes the paintjob of their vehicle (in a modshop).
| |
VehicleResprayed |
Occurs when the OnVehicleResprayed(BaseVehicle, VehicleResprayedEventArgs) callback is being called.
The callback name is deceptive, this callback is called when a player exits a mod shop, regardless of whether the
vehicle's colors were changed, and is NEVER called for pay 'n' spray garages.
| |
VehicleSirenStateChange |
Occurs when the OnVehicleSirenStateChange(BaseVehicle, SirenStateEventArgs) callback is being called.
This callback is called when a vehicle's siren is toggled.
| |
VehicleSpawned |
Occurs when the OnVehicleSpawned(BaseVehicle, EventArgs) callback is being called.
This callback is called when a vehicle respawns.
| |
VehicleStreamIn |
Occurs when the OnVehicleStreamIn(BaseVehicle, PlayerEventArgs) callback is being called.
Called when a vehicle is streamed to a player's client.
| |
VehicleStreamOut |
Occurs when the OnVehicleStreamOut(BaseVehicle, PlayerEventArgs) callback is being called.
This callback is called when a vehicle is streamed out from some player's client.
|