Player Methods |
The Player type exposes the following members.
Name | Description | |
---|---|---|
AddComponentT |
Adds a component of the specified type T to the entity.
(Inherited from Component.) | |
AddComponentT(Object) |
Adds a component of the specified type T to the entity with the specified constructor args.
(Inherited from Component.) | |
ApplyAnimation(String, String, Single, Boolean, Boolean, Boolean, Boolean, Int32) |
Apply an animation to this player.
| |
ApplyAnimation(String, String, Single, Boolean, Boolean, Boolean, Boolean, Int32, Boolean) |
Apply an animation to this player.
| |
AttachCameraToObject |
Attaches a player's camera to an object.
| |
Ban |
Ban this player. 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 player with a reason.
| |
CancelEdit |
Cancels object editing mode for this player.
| |
CancelSelectTextDraw |
Cancel text draw selection with the mouse for this player.
| |
ClearAnimations |
Clears all animations for this player.
| |
ClearAnimations(Boolean) |
Clears all animations for this player.
| |
CreateExplosion |
Creates an explosion for this player.
Only this 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.
| |
Destroy |
Destroys this component.
(Inherited from Component.) | |
DestroyComponentsT |
Destroys the components of the specified type T attached to the entity.
(Inherited from Component.) | |
DestroyEntity |
Destroys the entity.
(Inherited from Component.) | |
DisableCheckpoint |
Disable any initialized checkpoints for this player.
| |
DisableRaceCheckpoint |
Disable any initialized race checkpoints for this player.
| |
DisableRemoteVehicleCollisions |
Allows you to disable collisions between vehicles for a player.
| |
DoEditAttachedObject |
Enter edition mode for an attached object.
| |
Edit |
Lets this player edit the specified object.
| |
EnablePlayerCameraTarget |
Toggles camera targeting functions for a player.
| |
EnableStuntBonus |
Toggle stunt bonuses for this player.
| |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
ForceClassSelection |
Forces this player to go back to class selection.
| |
GameText |
Shows 'game text' (on-screen text) for a certain length of time for this player.
| |
GetAnimationName |
Get the animation library/name this player is playing.
| |
GetComponentT |
Gets a component of the specified type T attached to the entity.
(Inherited from Component.) | |
GetComponentInChildrenT |
Gets a component of the specified type T attached to a child entity of the entity using a depth first search.
(Inherited from Component.) | |
GetComponentInParentT |
Gets a component of the specified type T attached to a parent entity of the entity.
(Inherited from Component.) | |
GetComponentsT |
Gets all components of the specified type T attached to the entity.
(Inherited from Component.) | |
GetComponentsInChildrenT |
Gets all components of the specified type T attached to a child entity of the entity.
(Inherited from Component.) | |
GetComponentsInParentT |
Gets all components of the specified type T attached to a parent entity of the entity.
(Inherited from Component.) | |
GetDistanceFromPoint |
Calculate the distance between this player and a map coordinate.
| |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetKeys |
Check which keys this player is pressing.
| |
GetLastShot |
Retrieves the start and end (hit) position of the last bullet a player fired.
| |
GetTime |
Get this player's current game time. Set by 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 player's weapon slot.
| |
GiveMoney |
Give money to this player.
| |
GiveWeapon |
Give this player a Weapon with a specified amount of ammo.
| |
InterpolateCameraLookAt |
Interpolate this player's camera's 'look at' point between two coordinates with a set speed.
| |
InterpolateCameraPosition |
Move this player's camera from one position to another, within the set time.
| |
IsAttachedObjectSlotUsed |
Check if this player has an object attached in the specified index (slot).
| |
IsInRangeOfPoint |
Check if this player is in range of a point.
| |
IsInVehicle |
Checks if this player is in a specific vehicle.
| |
IsPlayerStreamedIn |
Checks if the specified player is streamed in this player's client.
| |
Kick |
Kicks this player from the server. They will have to quit the game and re-connect if they wish
to
continue playing.
| |
PlayAudioStream(String) |
Play an 'audio stream' for this player. Normal audio files also work (e.g. MP3).
| |
PlayAudioStream(String, Vector3, Single) |
Play an 'audio stream' for this player. Normal audio files also work (e.g. MP3).
| |
PlayCrimeReport |
This function plays a crime report for this player - just like in single-player when CJ commits
a
crime.
| |
PlaySound(Int32) |
Plays the specified sound for this player.
| |
PlaySound(Int32, Vector3) |
Plays the specified sound for this player at a specific point.
| |
PutCameraBehindPlayer |
Restore the camera to a place behind the player, after using a function like CameraPosition.
| |
PutInVehicle(EntityId) |
Puts this player in a vehicle as driver.
| |
PutInVehicle(EntityId, Int32) |
Puts this player in a vehicle.
| |
RemoveAttachedObject |
Remove an attached object from this player.
| |
RemoveBuilding |
Removes a standard San Andreas model for this player within a specified range.
| |
RemoveFromVehicle |
Removes/ejects this player from his vehicle.
| |
RemoveMapIcon |
Removes a map icon that was set earlier for this player.
| |
ResetMoney |
Reset this player's money to $0.
| |
ResetWeapons |
Removes all weapons from this player.
| |
Select |
Lets this player select an object.
| |
SelectTextDraw |
Display the cursor and allow this player to select a text draw.
| |
SendClientMessage(String) |
This function sends a message to this player 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 player 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 player with a chosen color in the chat. The whole line in
the chat box will be
in the set color unless color embedding is used.
| |
SendClientMessage(Color, String, Object) |
This function sends a message to this player with a chosen color in the chat. The whole line in the chat box will be in
the set color unless color embedding is used.
| |
SendDeathMessage |
Adds a death to the kill feed on the right-hand side of the screen of this player.
| |
SendPlayerMessageToPlayer |
Sends a message in the name the specified sender to this player. The message will appear in the
chat box but can only be seen by this player. The line will start with the the sender's name in their color, followed
by the message in white.
| |
SetAmmo |
Set the ammo of this player's weapon.
| |
SetArmedWeapon |
Sets the armed weapon of this player.
| |
SetAttachedObject |
Attach an object to a specific bone on this player.
| |
SetCameraLookAt(Vector3) |
Set the direction this player's camera looks at. To be used in combination with
CameraPosition.
| |
SetCameraLookAt(Vector3, CameraCut) |
Set the direction this player's camera looks at. To be used in combination with
CameraPosition.
| |
SetChatBubble |
Creates a chat bubble above this player's name tag.
| |
SetCheckpoint |
Sets a checkpoint (red circle) for this player. 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 player's name tag and radar blip for another Player.
| |
SetPositionFindZ |
This sets this player's position then adjusts the Player's z-coordinate to the nearest solid
ground under the
position.
| |
SetRaceCheckpoint |
Creates a race checkpoint. When this player enters it, EnterRaceCheckpoint event is called.
| |
SetShopName |
Loads or unloads an interior script for this player. (for example the Ammunation menu)
| |
SetSkillLevel |
Set the skill level of a certain weapon type for this player.
| |
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 player to a specific value. This also changes the daytime. (night/day
etc.)
| |
SetWeather |
Set this player'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 player - 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(EntityId) |
Makes this player spectate (watch) another player.
| |
SpectatePlayer(EntityId, SpectateMode) |
Makes this player spectate (watch) another player.
| |
SpectateVehicle(EntityId) |
Sets this player to spectate another vehicle, i.e. see what its driver sees.
| |
SpectateVehicle(EntityId, SpectateMode) |
Sets this player to spectate another vehicle, i.e. see what its driver sees.
| |
StartRecordingPlayerData |
Starts recording this player's movements to a file, which can then be reproduced by an NPC.
| |
StopAudioStream |
Stops the current audio stream for this player.
| |
StopRecordingPlayerData |
Stops all the recordings that had been started with StartRecordingPlayerData(PlayerRecordingType, String) for this player.
| |
ToggleClock |
Show/Hide the in-game clock (top right corner) for this player.
| |
ToggleControllable |
Toggles whether this player can control themselves, basically freezes them.
| |
ToggleSpectating |
Toggle this player's spectate mode.
| |
ToString | Returns a string that represents the current object. (Inherited from Object.) |