Chuyển tới nội dung chính

405 tài liệu đã gắn thẻ được gắn thẻ "player"

Xem tất cả thẻ

AddPlayerClassEx

This function is exactly the same as the AddPlayerClass function, with the addition of a team parameter.

AllowPlayerTeleport

Enable/Disable the teleporting ability for a player by right-clicking on the map.

Ban

Ban a player who is currently in the server.

BanEx

Ban a player with a reason.

BeginObjectEditing

Allows a player to edit an object (position and rotation) using their mouse on a GUI (Graphical User Interface).

ClearAnimations

Clears all animations for the given player (it also cancels all current tasks such as jetpacking, parachuting, entering vehicles, driving (removes player out of vehicle), swimming, etc).

DisablePlayerRaceCheckpoint

Disable any initialized race checkpoints for a specific player, since you can only have one at any given time.

EditPlayerObject

Allows players to edit a player-object (position and rotation) with a GUI and their mouse.

GameTextForPlayer

Shows 'game text' (on-screen text) for a certain length of time for a specific player.

GangZoneGetPos

Get the position of a gangzone, represented by minX, minY, maxX, maxY coordinates

GetGameText

Returns all the information on the given game text style.

GetMaxPlayers

Returns the maximum number of players that can join the server, as set by the server variable 'maxplayers' in server.

GetPlayerAmmo

Gets the amount of ammo in a player's current weapon.

GetPlayerArmour

This function stores the armour of a player into a variable.

GetPlayerCameraFrontVector

This function will return the current direction of player's aiming in 3-D space, the coords are relative to the camera position, see GetPlayerCameraPos.

GetPlayerCameraUpVector

This function returns the vector, that points to the upside of the camera's view, or, in other words, to the middle top of your screen.

GetPlayerHealth

The function GetPlayerHealth allows you to retrieve the health of a player.

GetPlayerIp

Get the specified player's IP address and store it in a string.

GetPlayerMenu

Gets the ID of the menu the player is currently viewing (shown by ShowMenuForPlayer).

GetPlayerPos

Get the position of a player, represented by X, Y and Z coordinates.

GetPlayers

Gets an array variable of the IDs of the current players on the server.

GetPlayerScore

This function returns a player's score as it was set using SetPlayerScore.

GetSpawnInfo

Return the current spawn data for a player, where they will spawn next.

HasGameText

Does the player currently have text in the given gametext style displayed?

IsPlayerConnected

Checks if a player is connected (if an ID is taken by a connected player).

IsPlayerInCheckpoint

Check if the player is currently inside a checkpoint, this could be used for properties or teleport points for example.

IsPlayerNPC

Check if a player is an actual player or an NPC.

Kick

Kicks a player from the server. They will have to quit the game and re-connect if they wish to continue playing.

OnEnterExitModShop

Callback này được gọi khi một người chơi vào hoặc ra khỏi cửa hàng độ xe.

OnPickupStreamIn

Callback này được gọi khi một pickup vào phạm vi nhìn thấy của người chơi.

OnPickupStreamOut

Callback này được gọi khi một pickup rời khỏi phạm vi nhìn thấy của người chơi.

OnPlayerClickGangZone

Callback này được gọi khi một người chơi nhấp chuột vào một gangzone trên bản đồ trong menu tạm dừng (bằng cách nhấp chuột phải).

OnPlayerClickMap

Callback này được gọi khi một người chơi đặt mục tiêu/điểm đến trên bản đồ trong menu tạm dừng (bằng cách nhấp chuột phải).

OnPlayerClickPlayer

Callback này được gọi khi một người chơi nhấp đúp vào một người chơi trên bảng điểm.

OnPlayerClickPlayerGangZone

Callback này được gọi khi một người chơi nhấp vào gangzone của người chơi trên bản đồ trong menu tạm dừng (bằng cách nhấp chuột phải).

OnPlayerClickTextDraw

Callback này được gọi khi một người chơi nhấp vào một textdraw hoặc hủy chế độ chọn bằng phím Escape.

OnPlayerCommandText

Callback này được gọi khi một người chơi nhập lệnh vào cửa sổ trò chuyện của client.

OnPlayerConnect

Callback này được gọi khi một người chơi kết nối với server.

OnPlayerDeath

Callback này được gọi khi một người chơi chết, có thể là tự sát hoặc bị giết bởi một người chơi khác.

OnPlayerDisconnect

Callback này được gọi khi một người chơi rời khỏi server.

OnPlayerEditAttachedObject

Callback này được gọi khi một người chơi kết thúc chế độ chỉnh sửa đối tượng gắn kết.

OnPlayerEditObject

Callback này được gọi khi một người chơi kết thúc việc chỉnh sửa một đối tượng ([BeginObjectEditing](../functions/BeginObjectEditing)/[BeginPlayerObjectEditing](../functions/BeginPlayerObjectEditing)).

OnPlayerEnterCheckpoint

Callback này được gọi khi một người chơi vào điểm kiểm tra được đặt cho người chơi đó.

OnPlayerEnterGangZone

Callback này được gọi khi một người chơi vào một khu vực băng nhóm.

OnPlayerEnterVehicle

Callback này được gọi khi một người chơi bắt đầu vào một phương tiện, có nghĩa là người chơi chưa vào phương tiện vào thời điểm callback này được gọi.

OnPlayerExitedMenu

Callback này được gọi khi một người chơi thoát khỏi menu.

OnPlayerExitVehicle

Callback này được gọi khi một người chơi bắt đầu thoát khỏi một phương tiện.

OnPlayerGiveDamage

Callback này được gọi khi một người chơi gây thiệt hại cho người chơi khác.

OnPlayerGiveDamageActor

Callback này được gọi khi một người chơi gây thiệt hại cho một diễn viên.

OnPlayerKeyStateChange

This callback is called when the state of any supported key is changed (pressed/released).

OnPlayerLeaveCheckpoint

Callback này được gọi khi một người chơi rời khỏi checkpoint đã được thiết lập cho họ bởi SetPlayerCheckpoint.

OnPlayerObjectMoved

Callback này được gọi khi một đối tượng của người chơi được di chuyển sau khi MovePlayerObject (khi nó ngừng di chuyển).

OnPlayerPickUpPickup

Callback này được gọi khi một người chơi nhặt pickup được tạo ra với CreatePickup.

OnPlayerPickUpPlayerPickup

Callback này được gọi khi một người chơi nhặt pickup của người chơi được tạo ra bằng CreatePlayerPickup.

OnPlayerPickupStreamIn

Callback này được gọi khi một pickup của người chơi vào phạm vi tầm nhìn của người chơi.

OnPlayerPickupStreamOut

Callback này được gọi khi một pickup của người chơi rời khỏi phạm vi tầm nhìn của người chơi.

OnPlayerRequestClass

Callback này được gọi khi một người chơi thay đổi lớp trong chọn lớp (và khi chọn lớp xuất hiện lần đầu).

OnPlayerRequestDownload

Callback này được gọi khi một người chơi yêu cầu tải xuống mô hình tùy chỉnh.

OnPlayerRequestSpawn

Callback này được gọi khi người chơi cố gắng xuất hiện qua việc chọn lớp bằng cách nhấn SHIFT hoặc nhấp vào nút 'Spawn'.

OnPlayerSelectedMenuRow

Callback này được gọi khi người chơi chọn một mục từ menu (ShowMenuForPlayer).

OnPlayerSelectObject

Callback này được gọi khi người chơi chọn một đối tượng sau khi dùng BeginObjectSelecting.

OnPlayerSpawn

Callback này được gọi khi người chơi xuất hiện.

OnPlayerStreamIn

Callback này được gọi khi một người chơi được stream bởi client của người chơi khác.

OnPlayerStreamOut

Callback này được gọi khi một người chơi bị stream ra khỏi client của người chơi khác.

OnPlayerTakeDamage

Callback này được gọi khi một người chơi bị nhận sát thương.

OnPlayerText

Callback này được gọi khi một người chơi gửi tin nhắn trò chuyện.

OnPlayerUpdate

Callback này được gọi mỗi khi một client/người chơi cập nhật trạng thái của mình với server.

OnPlayerWeaponShot

Callback này được gọi khi một người chơi bắn từ một vũ khí.

OnScriptLoadPlayer

This callback is called for each connected player when a script is loaded.

PlayCrimeReportForPlayer

This function plays a crime report for a player - just like in single-player when CJ commits a crime.

Player States

A list of all the player states used by GetPlayerState function or OnPlayerStateChange callback.

PlayerGangZoneGetPos

Get the position of a gangzone, represented by minX, minY, maxX, maxY coordinates

PlayerTextDrawTextSize

Change the size of a player-textdraw (box if PlayerTextDrawUseBox is enabled and/or clickable area for use with PlayerTextDrawSetSelectable).

RemovePlayerMapIcon

Removes a map icon that was set earlier for a player using SetPlayerMapIcon.

SetCameraBehindPlayer

Restore the camera to a place behind the player, after using a function like SetPlayerCameraPos.

SetPlayerColor

Set the colour of a player's nametag and marker (radar blip).

SetPlayerDrunkLevel

Sets the drunk level of a player which makes the player's camera sway and vehicles hard to control.

SetPlayerPosFindZ

This sets the players position then adjusts the players z-coordinate to the nearest solid ground under the position.

SetPlayerShopName

Loads or unloads an interior script for a player (for example the ammunation menu).

SetSpawnInfo

This function can be used to change the spawn information of a specific player.

ShowPlayerNameTagForPlayer

This functions allows you to toggle the drawing of player nametags, healthbars and armor bars which display above their head.

Special Actions

A list of all the player special actions used by GetPlayerSpecialAction and SetPlayerSpecialAction functions.

StopPlayerObject

Stop a moving player-object after MovePlayerObject has been used.

StopRecordingPlayerData

Stops all the recordings that had been started with StartRecordingPlayerData for a specific player.

UsePlayerPedAnims

Uses standard player walking animation (animation of the CJ skin) instead of custom animations for every skin (e.g. skating for skater skins).