BasePlayer Methods |
The BasePlayer type exposes the following members.
Name | Description | |
---|---|---|
ApplyAnimation(String, String, Single, Boolean, Boolean, Boolean, Boolean, Int32) |
Apply an animation to this BasePlayer.
| |
ApplyAnimation(String, String, Single, Boolean, Boolean, Boolean, Boolean, Int32, Boolean) |
Apply an animation to this BasePlayer.
| |
AssertNotDisposed |
Checks whether this instance has been disposed. If it has, it throws an exception.
(Inherited from Disposable.) | |
Ban |
Ban this BasePlayer. The ban will be IP-based, and be saved in the samp.ban file in the
server's root directory. Ban(String) allows you to ban with a reason, while you can ban and unban
IPs
using the RCON banip and unbanip commands.
| |
Ban(String) |
Ban this BasePlayer with a reason.
| |
CancelEdit |
Cancels object editing mode for this player.
| |
CancelSelectTextDraw |
Cancel text draw selection with the mouse for this BasePlayer.
| |
ClearAnimations |
Clears all animations for this BasePlayer.
| |
ClearAnimations(Boolean) |
Clears all animations for this BasePlayer.
| |
CreateExplosion |
Creates an explosion for a BasePlayer.
Only the specific player will see explosion and feel its effects.
This is useful when you want to isolate explosions from other players or to make them only appear in specific
virtual worlds.
| |
CreateExplosionForAll(Vector3, ExplosionType, Single) |
Create an explosion at the specified coordinates.
| |
CreateExplosionForAll(Vector3, ExplosionType, Single, Int32) |
Create an explosion at the specified coordinates.
| |
CreateExplosionForAll(Vector3, ExplosionType, Single, Int32, Int32) |
Create an explosion at the specified coordinates.
| |
DisableCheckpoint |
Disable any initialized checkpoints for this BasePlayer.
| |
DisableRaceCheckpoint |
Disable any initialized race checkpoints for this BasePlayer.
| |
DisableRemoteVehicleCollisions |
Allows you to disable collisions between vehicles for a player.
| |
Dispose |
Performs tasks associated with freeing, releasing, or resetting unmanaged resources.
(Inherited from Disposable.) | |
Dispose(Boolean) |
Removes this instance from the pool.
(Inherited from IdentifiedPoolTInstance.) | |
DoEditAttachedObject |
Enter edition mode for an attached object.
| |
EnablePlayerCameraTarget |
Toggles camera targeting functions for a player.
| |
EnableStuntBonus |
Toggle stunt bonuses for this BasePlayer.
| |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize |
Finalizes an instance of the Disposable class.
(Inherited from Disposable.) | |
ForceClassSelection |
Forces this BasePlayer to go back to class selection.
| |
GameText |
Shows 'game text' (on-screen text) for a certain length of time for this BasePlayer.
| |
GameTextForAll |
Shows 'game text' (on-screen text) for a certain length of time for all players.
| |
GetAnimationName |
Get the animation library/name this BasePlayer is playing.
| |
GetDistanceFromPoint |
Calculate the distance between this BasePlayer and a map coordinate.
| |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetKeys |
Check which keys this BasePlayer is pressing.
| |
GetLastShot |
Retrieves the start and end (hit) position of the last bullet a player fired.
| |
GetTime |
Get this BasePlayer's current game time. Set by SetWorldTime(Int32),
SetWorldTime(Int32),
or by ToggleClock(Boolean).
| |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
GetWeaponData |
Get the Weapon and ammo in this BasePlayer's weapon slot.
| |
GiveMoney |
Give money to this BasePlayer.
| |
GiveWeapon |
Give this BasePlayer a Weapon with a specified amount of ammo.
| |
Initialize |
An overloadable point for initialization logic which requires the Id to be set.
(Inherited from IdentifiedPoolTInstance.) | |
InterpolateCameraLookAt |
Interpolate this BasePlayer's camera's 'look at' point between two coordinates with a set speed.
| |
InterpolateCameraPosition |
Move this BasePlayer's camera from one position to another, within the set time.
| |
IsAttachedObjectSlotUsed |
Check if this BasePlayer has an object attached in the specified index (slot).
| |
IsInRangeOfPoint |
Check if this BasePlayer is in range of a point.
| |
IsInVehicle |
Checks if this BasePlayer is in a specific BaseVehicle.
| |
IsPlayerStreamedIn |
Checks if a BasePlayer is streamed in this BasePlayer's client.
| |
Kick |
Kicks this BasePlayer from the server. They will have to quit the game and re-connect if they wish
to
continue playing.
| |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
OnCancelClickTextDraw |
Raises the CancelClickTextDraw event.
| |
OnCleanup |
Raises the Cleanup event.
| |
OnClickMap |
Raises the ClickMap event.
| |
OnClickPlayer |
Raises the ClickPlayer event.
| |
OnClickPlayerTextDraw |
Raises the ClickPlayerTextDraw event.
| |
OnClickTextDraw |
Raises the ClickTextDraw event.
| |
OnCommandText |
Raises the CommandText event.
| |
OnConnected |
Raises the Connected event.
| |
OnDeath |
Raises the Died event.
| |
OnDialogResponse |
Raises the DialogResponse event.
| |
OnDisconnected |
Raises the Disconnected event.
| |
OnEditAttachedObject |
Raises the EditAttachedObject event.
| |
OnEditGlobalObject |
Raises the EditGlobalObject event.
| |
OnEditPlayerObject |
Raises the EditPlayerObject event.
| |
OnEnterCheckpoint |
Raises the EnterCheckpoint event.
| |
OnEnterExitModShop |
Raises the EnterExitModShop event.
| |
OnEnterRaceCheckpoint |
Raises the EnterRaceCheckpoint event.
| |
OnEnterVehicle |
Raises the EnterVehicle event.
| |
OnExitedMenu |
Raises the ExitedMenu event.
| |
OnExitVehicle |
Raises the ExitVehicle event.
| |
OnGiveDamage |
Raises the GiveDamage event.
| |
OnInteriorChanged |
Raises the InteriorChanged event.
| |
OnKeyStateChanged |
Raises the KeyStateChanged event.
| |
OnLeaveCheckpoint |
Raises the LeaveCheckpoint event.
| |
OnLeaveRaceCheckpoint |
Raises the LeaveRaceCheckpoint event.
| |
OnPickUpPickup |
Raises the PickUpPickup event.
| |
OnRequestClass |
Raises the RequestClass event.
| |
OnRequestSpawn |
Raises the RequestSpawn event.
| |
OnSelectedMenuRow |
Raises the SelectedMenuRow event.
| |
OnSelectGlobalObject |
Raises the SelectGlobalObject event.
| |
OnSelectPlayerObject |
Raises the SelectPlayerObject event.
| |
OnSpawned |
Raises the Spawned event.
| |
OnStateChanged |
Raises the StateChanged event.
| |
OnStreamIn |
Raises the StreamIn event.
| |
OnStreamOut |
Raises the StreamOut event.
| |
OnTakeDamage |
Raises the TakeDamage event.
| |
OnText |
Raises the Text event.
| |
OnUpdate |
Raises the Update event.
| |
OnWeaponShot |
Raises the WeaponShot event.
| |
PlayAudioStream(String) |
Play an 'audio stream' for this BasePlayer. Normal audio files also work (e.g. MP3).
| |
PlayAudioStream(String, Vector3, Single) |
Play an 'audio stream' for this BasePlayer. Normal audio files also work (e.g. MP3).
| |
PlayCrimeReport |
This function plays a crime report for this BasePlayer - just like in single-player when CJ commits
a
crime.
| |
PlaySound(Int32) |
Plays the specified sound for this BasePlayer.
| |
PlaySound(Int32, Vector3) |
Plays the specified sound for this BasePlayer at a specific point.
| |
PutCameraBehindPlayer |
Restore the camera to a place behind the player, after using a function like CameraPosition.
| |
PutInVehicle(BaseVehicle) |
Puts this BasePlayer in a vehicle as driver.
| |
PutInVehicle(BaseVehicle, Int32) |
Puts this BasePlayer in a BaseVehicle.
| |
RemoveAttachedObject |
Remove an attached object from this BasePlayer.
| |
RemoveFromVehicle |
Removes/ejects this BasePlayer from his vehicle.
| |
RemoveMapIcon |
Removes a map icon that was set earlier for this player using SetMapIcon(Int32, Vector3, MapIcon, Color, MapIconType).
| |
ResetMoney |
Reset this BasePlayer's money to $0.
| |
ResetWeapons |
Removes all weapons from this BasePlayer.
| |
SelectTextDraw |
Display the cursor and allow this BasePlayer to select a text draw.
| |
SendClientMessage(String) |
This function sends a message to this BasePlayer in white in the chat. The whole line in the chat
box
will be
in the set color unless color embedding is used.
| |
SendClientMessage(String, Object) |
This function sends a message to this BasePlayer in white in the chat. The whole line in the chat
box
will be
in the set color unless color embedding is used.
| |
SendClientMessage(Color, String) |
This function sends a message to this BasePlayer with a chosen color in the chat. The whole line in
the chat box will be
in the set color unless colour embedding is used.
| |
SendClientMessage(Color, String, Object) |
This function sends a message to this BasePlayer with a chosen color in the chat. The whole line in
the chatbox will be
in the set color unless color embedding is used.
| |
SendClientMessageToAll(String) |
Displays a message in white in chat to all players.
| |
SendClientMessageToAll(String, Object) |
Displays a message in white in chat to all players.
| |
SendClientMessageToAll(Color, String) |
Displays a message in chat to all players.
| |
SendClientMessageToAll(Color, String, Object) |
Displays a message in chat to all players.
| |
SendDeathMessage |
Adds a death to the kill feed on the right-hand side of the screen of this BasePlayer.
| |
SendDeathMessageToAll |
Adds a death to the kill feed on the right-hand side of the screen.
| |
SendPlayerMessageToAll |
Sends a message in the name of this BasePlayer to all other players on the server. The line will
start with the this
BasePlayer's name in their color, followed by the message in white.
| |
SendPlayerMessageToPlayer |
Sends a message in the name this BasePlayer to another player on the server. The message will appear
in the chat box
but can only be seen by receiver. The line will start with the this Player's name in his color,
followed by the message in white.
| |
SetAmmo |
Set the ammo of this BasePlayer's weapon.
| |
SetArmedWeapon |
Sets the armed weapon of this BasePlayer.
| |
SetAttachedObject |
Attach an object to a specific bone on this BasePlayer.
| |
SetCameraLookAt(Vector3) |
Set the direction this BasePlayer's camera looks at. To be used in combination with
CameraPosition.
| |
SetCameraLookAt(Vector3, CameraCut) |
Set the direction this BasePlayer's camera looks at. To be used in combination with
CameraPosition.
| |
SetChatBubble |
Creates a chat bubble above this BasePlayer's name tag.
| |
SetCheckpoint |
Sets a checkpoint (red circle) for this BasePlayer. Also shows a red blip on the radar.
| |
SetMapIcon | Place an icon/marker on this player's map. Can be used to mark locations such as banks and hospitals to players. | |
SetPlayerMarker |
Change the color of this BasePlayer's name tag and radar blip for another Player.
| |
SetPositionFindZ |
This sets this BasePlayer's position then adjusts the Player's z-coordinate to the nearest solid
ground under the
position.
| |
SetRaceCheckpoint |
Creates a race checkpoint. When this BasePlayer enters it, the EnterRaceCheckpoint
callback is called.
| |
SetShopName |
Loads or unloads an interior script for this BasePlayer. (for example the ammunation menu)
| |
SetSkillLevel |
Set the skill level of a certain weapon type for this BasePlayer.
| |
SetSpawnInfo |
This function can be used to change the spawn information of a specific player. It allows you to automatically set
someone's spawn weapons, their team, skin and spawn position, normally used in case of mini games or
automatic-spawn systems.
| |
SetTime |
Sets the clock of this BasePlayer to a specific value. This also changes the daytime. (night/day
etc.)
| |
SetWeather |
Set this BasePlayer's weather. If ToggleClock(Boolean) has been used to enable the clock,
weather changes will
interpolate (gradually change), otherwise will change instantly.
| |
SetWorldBounds |
Set the world boundaries for this BasePlayer - players can not go out of the boundaries.
| |
ShowNameTagForPlayer |
This functions allows you to toggle the drawing of player name tags, health bars and armor bars which display above
their head. For use of a similar function like this on a global level, ShowNameTags(Boolean)
function.
| |
Spawn |
(Re)Spawns a player.
| |
SpectatePlayer(BasePlayer) |
Makes this BasePlayer spectate (watch) another player.
| |
SpectatePlayer(BasePlayer, SpectateMode) |
Makes this BasePlayer spectate (watch) another player.
| |
SpectateVehicle(BaseVehicle) |
Sets this BasePlayer to spectate another vehicle, i.e. see what its driver sees.
| |
SpectateVehicle(BaseVehicle, SpectateMode) |
Sets this BasePlayer to spectate another vehicle, i.e. see what its driver sees.
| |
StartRecordingPlayerData |
Starts recording this BasePlayer's movements to a file, which can then be reproduced by an NPC.
| |
StopAudioStream |
Stops the current audio stream for this BasePlayer.
| |
StopRecordingPlayerData |
Stops all the recordings that had been started with StartRecordingPlayerData(PlayerRecordingType, String) for this
BasePlayer.
| |
ToggleClock |
Show/Hide the in-game clock (top right corner) for this BasePlayer.
| |
ToggleControllable |
Toggles whether this BasePlayer can control themselves, basically freezes them.
| |
ToggleSpectating |
Toggle this BasePlayer's spectate mode.
| |
ToString | Returns a string that represents the current object. (Inherited from Object.) |