SetPlayerDrunkLevel
From SA-MP Wiki
Description:
Sets the drunk level of a player which makes the player's camera sway and vehicles hard to control.
(playerid, level)
playerid | The ID of the player to set the drunkenness of. |
level | The level of drunkenness to set. |
Return Values:
- 1: The function executed successfully.
- 0: The function failed to execute. This means the player is not connected.
Example Usage:
if (strcmp(cmdtext, "/drunk", true) == 0) { SetPlayerDrunkLevel (playerid, 4000); SendClientMessage(playerid, 0xFFFFFFAA, "You are now drunk; don't drink and drive!"); return 1; }
Related Functions
The following functions may be useful, as they are related to this function in one way or another.
- GetPlayerDrunkLevel: Returns the current drunk level of a player.