SetPlayerCanDoDriveBy
DocsSetPlayerCanDoDriveBy(player, toggle)Description
Sets whether the player is able to do drive-bys in vehicle (shooting & aiming in vehicles), this also includes middle finger taunts.
This is a toggle, it does not have to be ran every frame.
Parameters
| Name | Type | Description |
|---|---|---|
player | Player | The player to target. |
toggle | BOOL | If set to false, disables the players ability to do drive bys. |
Quick Snippet: Get Playerplayer
playerUse this to get the local player ID or a target player's server ID.
-- Get the local player index (client-side)
local playerId = PlayerId()
-- Get the local player's server ID (for server events)
local serverId = GetPlayerServerId(playerId)
print("Player ID: " .. playerId)
print("Server ID: " .. serverId)
-- Get player ped from a server ID:
-- local targetPed = GetPlayerPed(GetPlayerFromServerId(targetServerId))Returns
voidThis native does not return a value.