Class Player
Class for a player in the MTA server
Assembly: SlipeServer.dll
Syntax
[DefaultElementClass(ElementType.Player)]
public class Player : Ped
Properties
|
Improve this Doc
View Source
Account
This function returns the specified player's account object.
Declaration
public Account Account { get; }
Property Value
|
Improve this Doc
View Source
Alive
Get an array of all alive players in the server
Declaration
public static Player[] Alive { get; }
Property Value
|
Improve this Doc
View Source
All
Get an array of all players in the server
Declaration
public static Player[] All { get; }
Property Value
|
Improve this Doc
View Source
BlurLevel
Get and set the motion blur level of the player
Declaration
public int BlurLevel { get; set; }
Property Value
|
Improve this Doc
View Source
Camera
Get the camera of the player
Declaration
public Camera Camera { get; }
Property Value
|
Improve this Doc
View Source
Count
Get the total amount of players in the server
Declaration
public static int Count { get; }
Property Value
|
Improve this Doc
View Source
Dead
Get an array of all dead players in the server
Declaration
public static Player[] Dead { get; }
Property Value
|
Improve this Doc
View Source
ForceMap
Get and set if the player map forcefuly shows
Declaration
public bool ForceMap { get; set; }
Property Value
|
Improve this Doc
View Source
IdleTime
Get the amount of time in milliseconds that a players position has not changed.
Declaration
public int IdleTime { get; }
Property Value
|
Improve this Doc
View Source
IP
Returns a string containing the IP address of the player.
Declaration
public string IP { get; }
Property Value
|
Improve this Doc
View Source
Money
Get and set the money of the player
Declaration
public int Money { get; set; }
Property Value
|
Improve this Doc
View Source
Muted
Get and set if the player is muted
Declaration
public bool Muted { get; set; }
Property Value
|
Improve this Doc
View Source
Name
Get and set the name of the player
Declaration
public string Name { get; set; }
Property Value
|
Improve this Doc
View Source
Get and set the color of the player's nametag
Declaration
public Color NametagColor { get; set; }
Property Value
|
Improve this Doc
View Source
Get and set wether the nametag is visible
Declaration
public bool NametagShowing { get; set; }
Property Value
|
Improve this Doc
View Source
NametagText
This will change the text of a player's nickname in the world to something besides the nickname he chose. This will not change the player's actual nickname, it only changes the visible aspect inside the world
Declaration
public string NametagText { get; set; }
Property Value
|
Improve this Doc
View Source
Ping
Get the ping in milliseconds
Declaration
Property Value
|
Improve this Doc
View Source
Random
Declaration
public static Player Random { get; }
Property Value
|
Improve this Doc
View Source
Serial
Get the serial of the player
Declaration
public string Serial { get; }
Property Value
|
Improve this Doc
View Source
Team
Get and set the team of the player
Declaration
public Team Team { get; set; }
Property Value
|
Improve this Doc
View Source
Version
This function gets the client version of the specified player as a sortable string.
Declaration
public string Version { get; }
Property Value
|
Improve this Doc
View Source
WantedLevel
Get and set the wanted level of the player
Declaration
public int WantedLevel { get; set; }
Property Value
Methods
|
Improve this Doc
View Source
DetonateSatchels()
Detonate the satchels this player has laid
Declaration
public bool DetonateSatchels()
Returns
|
Improve this Doc
View Source
GetAnnounceValue(String)
This function retrieves a players ASE announce value under a certain key.
Declaration
public string GetAnnounceValue(string key)
Parameters
Type |
Name |
Description |
String |
key |
|
Returns
|
Improve this Doc
View Source
GetFromName(String)
Retrieves a player class instance from a specified player name
Declaration
public static Player GetFromName(string name)
Parameters
Type |
Name |
Description |
String |
name |
|
Returns
|
Improve this Doc
View Source
GiveMoney(Int32)
Adds money to the player's money
Declaration
public bool GiveMoney(int amount)
Parameters
Type |
Name |
Description |
Int32 |
amount |
|
Returns
|
Improve this Doc
View Source
IsDisplayObserver(Display)
Check if this palyer can observe a certain display
Declaration
public bool IsDisplayObserver(Display display)
Parameters
Type |
Name |
Description |
Display |
display |
|
Returns
|
Improve this Doc
View Source
Kick(String, Player)
Kicks a player from the server
Declaration
public bool Kick(string reason, Player responsiblePlayer = null)
Parameters
Type |
Name |
Description |
String |
reason |
|
Player |
responsiblePlayer |
|
Returns
|
Improve this Doc
View Source
Kick(String, String)
Kicks a player from the server
Declaration
public bool Kick(string reason, string responsiblePlayer = null)
Parameters
Type |
Name |
Description |
String |
reason |
|
String |
responsiblePlayer |
|
Returns
|
Improve this Doc
View Source
Login(Account, String)
Logs the player into an account
Declaration
public bool Login(Account account, string password)
Parameters
Returns
|
Improve this Doc
View Source
LogOut()
Logs the player out of the account they're currently logged on
Declaration
Returns
|
Improve this Doc
View Source
PlaySoundFrontEnd(FrontEndSound)
Play an internal GTA sound to this player
Declaration
public bool PlaySoundFrontEnd(FrontEndSound frontEndSound)
Parameters
Returns
|
Improve this Doc
View Source
Redirect(String, Int32, String)
Redirects the player to a different server
Declaration
public bool Redirect(string serverIP, int serverPort = 0, string serverPassword = "")
Parameters
Returns
|
Improve this Doc
View Source
ResendACInfo()
This function will force the specified player to resend their AC info, triggering the onPlayerACInfo event again.
Declaration
public bool ResendACInfo()
Returns
|
Improve this Doc
View Source
ResendModInfo()
This function will force the specified player to resend their mod info, triggering the onPlayerModInfo event again.
Declaration
public bool ResendModInfo()
Returns
|
Improve this Doc
View Source
SetAnnounceValue(String, String)
This function allows you to change ASE announce values for any player using a specified key. As an example this can be used to change the "score" value which will be shown at game-monitor.com's server list.
Declaration
public bool SetAnnounceValue(string key, string value)
Parameters
Returns
|
Improve this Doc
View Source
SetHudComponentVisible(HudComponent, Boolean)
Set the visibility of a Hud component
Declaration
public bool SetHudComponentVisible(HudComponent component, bool visible)
Parameters
Returns
|
Improve this Doc
View Source
SetVoiceBroadCastTo(Element[])
This function allows you to change who can hear the voice of a player.
Declaration
public bool SetVoiceBroadCastTo(Element[] targets)
Parameters
Type |
Name |
Description |
Element[] |
targets |
|
Returns
|
Improve this Doc
View Source
SetVoiceIgnoreFrom(Element[])
This function allows you to mute voices for a player
Declaration
public bool SetVoiceIgnoreFrom(Element[] targets)
Parameters
Type |
Name |
Description |
Element[] |
targets |
|
Returns
|
Improve this Doc
View Source
Spawn(Vector3, PedModel, Int32, Int32, Int32, Team)
Spawn the player at a certain position
Declaration
public void Spawn(Vector3 position, PedModel skin, int rotation = 0, int interior = 0, int dimension = 0, Team team = null)
Parameters
|
Improve this Doc
View Source
TakeMoney(Int32)
Substract money from the player
Declaration
public bool TakeMoney(int amount)
Parameters
Type |
Name |
Description |
Int32 |
amount |
|
Returns
|
Improve this Doc
View Source
TakeScreenShot(Vector2, String, Int32, Int32, Int32)
This function forces a client to capture the current screen output and send it back to the server. The image will contain the GTA HUD and the output of any dxDraw functions that are not flagged as 'post GUI'. The image specifically excludes the chat box and all GUI (including the client console). The result is received with the event onPlayerScreenShot.
Declaration
public bool TakeScreenShot(Vector2 dimensions, string tag = "", int quality = 30, int maxBandwith = 5000, int maxPacketSize = 500)
Parameters
Returns
Events
|
Improve this Doc
View Source
OnAcInfo
Declaration
public event Player.OnAcInfoHandler OnAcInfo
Event Type
|
Improve this Doc
View Source
OnBanAdded
Declaration
public event Player.OnBanAddedHandler OnBanAdded
Event Type
|
Improve this Doc
View Source
OnBanned
Declaration
public event Player.OnBannedHandler OnBanned
Event Type
|
Improve this Doc
View Source
OnChat
Declaration
public event Player.OnChatHandler OnChat
Event Type
|
Improve this Doc
View Source
OnClick
Declaration
public event Player.OnClickHandler OnClick
Event Type
|
Improve this Doc
View Source
OnCollisionShapeHit
Declaration
public event Player.OnCollisionShapeHitHandler OnCollisionShapeHit
Event Type
|
Improve this Doc
View Source
OnCollisionShapeLeave
Declaration
public event Player.OnCollisionShapeLeaveHandler OnCollisionShapeLeave
Event Type
|
Improve this Doc
View Source
OnCommand
Declaration
public event Player.OnCommandHandler OnCommand
Event Type
|
Improve this Doc
View Source
OnConsole
Declaration
public event Player.OnConsoleHandler OnConsole
Event Type
|
Improve this Doc
View Source
Declaration
public event Player.OnContactHandler OnContact
Event Type
|
Improve this Doc
View Source
OnDamage
Declaration
public event Player.OnDamageHandler OnDamage
Event Type
|
Improve this Doc
View Source
OnJoin
Declaration
public static event Player.OnJoinHandler OnJoin
Event Type
|
Improve this Doc
View Source
OnLogin
Declaration
public event Player.OnLoginHandler OnLogin
Event Type
|
Improve this Doc
View Source
OnLogout
Declaration
public event Player.OnLogoutHandler OnLogout
Event Type
|
Improve this Doc
View Source
OnMarkerHit
Declaration
public event Player.OnMarkerHitHandler OnMarkerHit
Event Type
|
Improve this Doc
View Source
OnMarkerLeave
Declaration
public event Player.OnMarkerLeaveHandler OnMarkerLeave
Event Type
|
Improve this Doc
View Source
OnModInfo
Declaration
public event Player.OnModInfoHandler OnModInfo
Event Type
|
Improve this Doc
View Source
OnMuted
Declaration
public event Player.OnMutedHandler OnMuted
Event Type
|
Improve this Doc
View Source
OnNetworkInteruption
Declaration
public event Player.OnNetworkInteruptionHandler OnNetworkInteruption
Event Type
|
Improve this Doc
View Source
OnNicknameChanged
Declaration
public event Player.OnNicknameChangedHandler OnNicknameChanged
Event Type
|
Improve this Doc
View Source
OnPickupHit
Declaration
public event Player.OnPickupHitHandler OnPickupHit
Event Type
|
Improve this Doc
View Source
OnPickupLeave
Declaration
public event Player.OnPickupLeaveHandler OnPickupLeave
Event Type
|
Improve this Doc
View Source
OnPickupUse
Declaration
public event Player.OnPickupUseHandler OnPickupUse
Event Type
|
Improve this Doc
View Source
OnPrivateMessage
Declaration
public event Player.OnPrivateMessageHandler OnPrivateMessage
Event Type
|
Improve this Doc
View Source
OnQuit
Declaration
public event Player.OnQuitHandler OnQuit
Event Type
|
Improve this Doc
View Source
OnScreenShot
Declaration
public event Player.OnScreenShotHandler OnScreenShot
Event Type
|
Improve this Doc
View Source
OnSpawn
Declaration
public event Player.OnSpawnHandler OnSpawn
Event Type
|
Improve this Doc
View Source
OnStealthKill
Declaration
public event Player.OnStealthKillHandler OnStealthKill
Event Type
|
Improve this Doc
View Source
OnTarget
Declaration
public event Player.OnTargetHandler OnTarget
Event Type
|
Improve this Doc
View Source
OnUnmuted
Declaration
public event Player.OnUnmutedHandler OnUnmuted
Event Type
|
Improve this Doc
View Source
OnVehicleEnter
Declaration
public event Player.OnVehicleEnterHandler OnVehicleEnter
Event Type
|
Improve this Doc
View Source
OnVehicleExit
Declaration
public event Player.OnVehicleExitHandler OnVehicleExit
Event Type
|
Improve this Doc
View Source
OnVoiceStart
Declaration
public event Player.OnVoiceStartHandler OnVoiceStart
Event Type
|
Improve this Doc
View Source
OnVoiceStop
Declaration
public event Player.OnVoiceStopHandler OnVoiceStop
Event Type
|
Improve this Doc
View Source
OnWeaponFire
Declaration
public event Player.OnWeaponFireHandler OnWeaponFire
Event Type
Extension Methods