a_players.inc
Description:
Include a_players.inc contains a large number of functions that are related to the game settings for the character.
This inclusion comes in the standard windows serer build |
List of functions:
- SetSpawnInfo: Used to change the spawn information of a specific player
- SpawnPlayer: (Re)Spawns a player.
- SetPlayerPos: Set a player's position.
- SetPlayerPosFindZ: Sets the players position then adjusts the players z-coordinate to the nearest solid ground under the position.
- GetPlayerPos: Get the position of a player, represented by X, Y and Z coordinates.
- SetPlayerFacingAngle: Set a player's facing angle (Z rotation).
- GetPlayerFacingAngle: Gets the angle a player is facing.
- IsPlayerInRangeOfPoint: Checks if a player is in range of a point.
- GetPlayerDistanceFromPoint: Calculate the distance between a player and a map coordinate.
- IsPlayerStreamedIn: Checks if a player is streamed in another player's client.
- SetPlayerInterior: Set a player's interior.
- GetPlayerInterior: Retrieves the player's current interior.
- SetPlayerHealth: Set the health of a player.
- GetPlayerHealth: Retrieve the health of a player.
- SetPlayerArmour: Set a player's armor level.
- GetPlayerArmour: Stores the armour of a player into a variable.
- SetPlayerAmmo: Set the ammo of a player's weapon.
- GetPlayerAmmo: Gets the amount of ammo in a player's current weapon.
- GetPlayerWeaponState: Check the state of a player's weapon.
- GetPlayerTargetPlayer: Check who a player is aiming at.
- GetPlayerTargetActor: Gets id of an actor which is aimed by certain player.
- SetPlayerTeam: Set the team of a player.
- GetPlayerTeam: Get the ID of the team the player is on.
- SetPlayerScore: Set a player's score.
- GetPlayerScore: Returns a player's score.
- GetPlayerDrunkLevel: Checks the player's level of drunkenness.
- SetPlayerDrunkLevel: Sets the drunk level of a player
- SetPlayerColor: Set the colour of a player's nametag and marker (radar blip).
- GetPlayerColor: Gets the color of the player's name and radar marker
- SetPlayerSkin: Set the skin of a player.
- GetPlayerSkin: Returns the class of the players skin.
- GivePlayerWeapon: Give a player a weapon with a specified amount of ammo.
- ResetPlayerWeapons: Removes all weapons from a player.
- SetPlayerArmedWeapon: Sets which weapon (that a player already has) the player is holding.
- GetPlayerWeaponData: Get the weapon and ammo in a specific player's weapon slot (e.g. the weapon in the 'SMG' slot).
- GivePlayerMoney: Give money to or take money from a player.
- ResetPlayerMoney: Reset a player's money to $0.
- SetPlayerName: Sets the name of a player.
- GetPlayerMoney: Retrieves the amount of money a player has.
- GetPlayerState: Get a player's current state.
- GetPlayerIp: Get the specified player's IP address and store it in a string.
- GetPlayerPing: Get the ping of a player.
- GetPlayerWeapon: Returns the ID of the weapon a player is currently holding.
- GetPlayerKeys: Check which keys a player is pressing.
- GetPlayerName: Get a player's name.
- SetPlayerTime: Sets the game time for a player.
- GetPlayerTime: Get the player's current game time.
- TogglePlayerClock: Toggle the in-game clock (top-right corner) for a specific player.
- SetPlayerWeather: Set a player's weather.
- ForceClassSelection: Forces a player to go back to class selection.
- SetPlayerWantedLevel: Set a player's wanted level (6 brown stars under HUD).
- GetPlayerWantedLevel: Gets the wanted level of a player.
- SetPlayerFightingStyle: Set a player's special fighting style
- GetPlayerFightingStyle: Get the fighting style the player currently using.
- SetPlayerVelocity: Set a player's velocity on the X, Y and Z axes.
- GetPlayerVelocity: Get the velocity (speed) of a player on the X, Y and Z axes.
- PlayCrimeReportForPlayer: Plays a crime report for a player - just like in single-player when CJ commits a crime.
- PlayAudioStreamForPlayer: Play an 'audio stream' for a player.
- StopAudioStreamForPlayer: Stops the current audio stream for a player.
- SetPlayerShopName: Loads or unloads an interior script for a player (for example the ammunation menu).
- SetPlayerSkillLevel: Set the skill level of a certain weapon type for a player.
- GetPlayerSurfingVehicleID: Get the ID of the vehicle that the player is surfing on (stuck to the roof of).
- GetPlayerSurfingObjectID: Returns the ID of the object the player is surfing on.
- RemoveBuildingForPlayer: Removes a standard San Andreas model for a single player within a specified range.
- GetPlayerLastShotVectors: Retrieves the start and end (hit) position of the last bullet a player fired.
- SetPlayerAttachedObject: Attach an object to a specific bone on a player.
- RemovePlayerAttachedObject: Remove an attached object from a player.
- IsPlayerAttachedObjectSlotUsed: Check if a player has an object attached in the specified index (slot).
- EditAttachedObject: Enter edition mode for an attached object.
- CreatePlayerTextDraw: Creates a textdraw for a single player.
- PlayerTextDrawDestroy: Destroy a player-textdraw.
- PlayerTextDrawLetterSize: Sets the width and height of the letters in a player-textdraw.
- PlayerTextDrawTextSize: Change the size of a player-textdraw.
- PlayerTextDrawAlignment: Set the text alignment of a player-textdraw.
- PlayerTextDrawColor: Sets the text color of a player-textdraw.
- PlayerTextDrawUseBox: Toggle the box on a player-textdraw.
- PlayerTextDrawBoxColor: Sets the color of a textdraw's box.
- PlayerTextDrawSetShadow: Adds a shadow to the bottom-right side of the text in a player-textdraw.
- PlayerTextDrawSetOutline: Set the outline of a player-textdraw
- PlayerTextDrawBackgroundColor: Adjust the background color of a player-textdraw.
- PlayerTextDrawFont: Change the font of a player-textdraw.
- PlayerTextDrawSetProportional: Appears to scale text spacing to a proportional ratio.
- PlayerTextDrawSetSelectable: Toggles whether a player-textdraw can be selected or not.
- PlayerTextDrawShow: Show a player-textdraw to the player it was created for.
- PlayerTextDrawHide:Hide a player-textdraw from the player it was created for.
- PlayerTextDrawSetString: Change the text of a player-textdraw.
- PlayerTextDrawSetPreviewModel: Sets a player-textdraw 2D preview sprite of a specified model ID.
- PlayerTextDrawSetPreviewRot: Sets the rotation and zoom of a 3D model preview player-textdraw.
- PlayerTextDrawSetPreviewVehCol: Set the color of a vehicle in a player-textdraw model preview.
- SetPVarInt: Set an integer player variable.
- GetPVarInt: Gets an integer player variable's value.
- SetPVarString: Saves a string into a player variable.
- GetPVarString: Gets a player variable as a string.
- SetPVarFloat: Set a float player variable's value.
- GetPVarFloat: Gets a player variable as a float.
- DeletePVar: Deletes a previously set player variable.
- GetPVarsUpperIndex: Returns the highest ID set for a player.
- GetPVarNameAtIndex: Retrieve the name of a player's pVar via the index.
- GetPVarType: Gets the type (integer, float or string) of a player variable.
- SetPlayerChatBubble: Creates a chat bubble above a player's name tag.
- PutPlayerInVehicle: Puts a player in a vehicle.
- GetPlayerVehicleID: Gets the ID of the vehicle the player is currently in.
- GetPlayerVehicleSeat: Find out which seat a player is in.
- RemovePlayerFromVehicle: Removes/ejects a player from their vehicle.
- TogglePlayerControllable: Toggles whether a player can control their character or not.
- PlayerPlaySound: Plays the specified sound for a player.
- ApplyAnimation: Apply an animation to a player.
- ClearAnimations: Clears all animations for the given player.
- GetPlayerAnimationIndex: Returns the index of any running applied animations.
- GetAnimationName: Get the animation library/name for the index.
- GetPlayerSpecialAction: Retrieves a player's current special action.
- SetPlayerSpecialAction: Set players special action.
- DisableRemoteVehicleCollisions: Disables collisions between occupied vehicles for a player.
- SetPlayerCheckpoint: Sets a checkpoint (red cylinder) for a player.
- DisablePlayerCheckpoint: Disables (hides/destroys) a player's set checkpoint.
- SetPlayerRaceCheckpoint: Creates a race checkpoint.
- DisablePlayerRaceCheckpoint: Disable any initialized race checkpoints for a specific player.
- SetPlayerWorldBounds: Set the world boundaries for a player.
- SetPlayerMarkerForPlayer: Change the colour of a player's nametag and radar blip for another player.
- ShowPlayerNameTagForPlayer: Toggle the drawing of player nametags, healthbars and armor bars which display above their head.
- SetPlayerMapIcon: Place an icon/marker on a player's map.
- RemovePlayerMapIcon: Removes a map icon that was set earlier for a player using SetPlayerMapIcon.
- AllowPlayerTeleport: Enable/disable the teleporting ability for a player by right-clicking on the map.
- SetPlayerCameraPos: Sets the camera to a specific position for a player.
- SetPlayerCameraLookAt: Set the direction a player's camera looks at.
- SetCameraBehindPlayer: Restore the camera to a place behind the player, after using a function like SetPlayerCameraPos.
- GetPlayerCameraPos: Get the position of the player's camera.
- GetPlayerCameraFrontVector: return the current direction of player's aiming in 3-D space.
- GetPlayerCameraMode: Returns the current GTA camera mode for the requested player.
- EnablePlayerCameraTarget: toggle camera targeting functions for a player
- GetPlayerCameraTargetObject: Get the ID of the object the player is looking at.
- GetPlayerCameraTargetVehicle: Get the ID of the vehicle the player is looking at.
- GetPlayerCameraTargetPlayer: Get the ID of the player the playerid is looking at.
- GetPlayerCameraTargetActor: Get the ID of the actor the player is looking at (in any).
- GetPlayerCameraAspectRatio: Get the aspect ratio of a player's camera.
- GetPlayerCameraZoom: Gets the game camera zoom level for a given player.
- AttachCameraToObject: Attach the player camera to objects.
- AttachCameraToPlayerObject: Attaches a player's camera to a player-object.
- InterpolateCameraPos: Move a player's camera from one position to another, within the set time.
- InterpolateCameraLookAt: Interpolate a player's camera's 'look at' point between two coordinates with a set speed.
- IsPlayerConnected: Checks if a player is connected.
- IsPlayerInVehicle: Checks if a player is in a specific vehicle.
- IsPlayerInAnyVehicle: Check if a player is inside any vehicle.
- IsPlayerInCheckpoint: Check if the player is currently inside a checkpoint.
- IsPlayerInRaceCheckpoint: Check if the player is inside their current set race checkpoint.
- SetPlayerVirtualWorld: Set the virtual world of a player.
- GetPlayerVirtualWorld: Get the current virtual world the player is in.
- EnableStuntBonusForPlayer: Toggle stunt bonuses for a player.
- EnableStuntBonusForAll: Enables or disables stunt bonuses for all players
- TogglePlayerSpectating: Toggle whether a player is in spectator mode or not.
- PlayerSpectatePlayer: Makes a player spectate (watch) another player.
- PlayerSpectateVehicle: Sets a player to spectate another vehicle.
- StartRecordingPlayerData: Starts recording a player's movements to a file.
- StopRecordingPlayerData: Stops all the recordings that had been started with StartRecordingPlayerData for a specific player.
- SelectTextDraw: Display the cursor and allow the player to select a textdraw.
- CancelSelectTextDraw: Cancel textdraw selection with the mouse.
- CreateExplosionForPlayer: Creates an explosion that is only visible to a single player.
List of callbacks: