How to add alcoholic effect

how to add alcoholic effect, animation drunk. Server FX VRP

1 Like

For best results, try visiting your local liquor store.

20 Likes

LOL


2 Likes

Umm. You could try the _SET_CAM_EFFECT native (to make the screen wobble and stuff) coupled with the TASK_PLAY_ANIM native (to make the player walk as if they’re drunk) to give the effect of the player being drunk.

3 Likes

Use this for the Camera Effect:
https://runtime.fivem.net/doc/reference.html#_0xFD55E49555E017CF
Use these for the walking Style:
https://runtime.fivem.net/doc/reference.html#_0x1913FE4CBF41C463
https://runtime.fivem.net/doc/reference.html#_0xAF8A94EDE7712BEF
And use this for the Sound Effects:
https://runtime.fivem.net/doc/reference.html#_0x95D2D383D5396B8A

3 Likes

there is an example of this code? and in which file to add it. I’m only starting with FX and lua

Thats all serversided, but has to be load as a client_script, so just check any resource from the forum how it is done there

so I didn’t get this effect, does anyone have it running on the server? help Lord
Many people ask this question on the forum

1 Like
if not HasAnimSetLoaded("MOVE_M@DRUNK@VERYDRUNK") then
	RequestAnimSet("MOVE_M@DRUNK@VERYDRUNK")
	while not HasAnimSetLoaded("MOVE_M@DRUNK@VERYDRUNK") do
		Citizen.Wait(0)
	end
end

SetPedIsDrunk(GetPlayerPed(-1), true)
ShakeGameplayCam("DRUNK_SHAKE", 1.0)
SetPedConfigFlag(GetPlayerPed(-1), 100, true)
SetPedMovementClipset(GetPlayerPed(-1), "MOVE_M@DRUNK@VERYDRUNK", 1.0)

This way the ped acts like he is drunk. I will not explain how to trigger it or whatever, that depends on what you want to do with it.

2 Likes

thanks for this, bad that you can’t show an example at least “vodka”.

All the same Lord who runs an animation of the effects of alcohol, show an example based on vodka or drugs

2 Likes

function use(item)
if (ITEMS[item].quantity - 1 >= 0) then
– Nice var swap for nothing
TriggerEvent(“player:looseItem”, item, 1)
– Calling the Hunger/Thirst
if ITEMS[item].type == 2 then
TriggerEvent(“food:eat”, ITEMS[item])
elseif ITEMS[item].type == 1 then
TriggerEvent(“food:drink”, ITEMS[item])
elseif ITEMS[item].type == 3 then
Drunked()
Citizen.Wait(2000)
ClearPedTasks(GetPlayerPed(-1))
Reality()
else
– Any other type? Drugs???
Toxicated()
Citizen.Wait(3000)
ClearPedTasks(GetPlayerPed(-1))
Reality()
end
end
end


function Toxicated()
Citizen.Wait(5000)
DoScreenFadeOut(1000)
Citizen.Wait(1000)
ClearPedTasksImmediately(GetPlayerPed(-1))
SetTimecycleModifier(“spectator5”)
SetPedMotionBlur(GetPlayerPed(-1), true)
SetPedMovementClipset(GetPlayerPed(-1), “MOVE_M@DRUNK@SLIGHTLYDRUNK”, true)
SetPedIsDrunk(GetPlayerPed(-1), true)
DoScreenFadeIn(1000)
end

function Reality()
Citizen.Wait(50000)
DoScreenFadeOut(1000)
Citizen.Wait(1000)
DoScreenFadeIn(1000)
ClearTimecycleModifier()
ResetScenarioTypesEnabled()
ResetPedMovementClipset(GetPlayerPed(-1), 0)
SetPedIsDrunk(GetPlayerPed(-1), false)
SetPedMotionBlur(GetPlayerPed(-1), false)
end


function Drunked()
RequestAnimSet(“move_m@drunk@verydrunk”)
while not HasAnimSetLoaded(“move_m@drunk@verydrunk”) do
Citizen.Wait(0)
end

TaskStartScenarioInPlace(GetPlayerPed(-1), “WORLD_HUMAN_DRUG_DEALER”, 0, 1)
DoScreenFadeOut(1000)
Citizen.Wait(1000)
ClearPedTasksImmediately(GetPlayerPed(-1))
SetTimecycleModifier(“spectator5”)
SetPedMotionBlur(GetPlayerPed(-1), true)
SetPedMovementClipset(GetPlayerPed(-1), “move_m@drunk@verydrunk”, true)
SetPedIsDrunk(GetPlayerPed(-1), true)
DoScreenFadeIn(1000)
end

function reality()
DoScreenFadeOut(1000)
Citizen.Wait(1000)
DoScreenFadeIn(1000)
ClearTimecycleModifier()
ResetScenarioTypesEnabled()
ResetPedMovementClipset(GetPlayerPed(-1), 0)
SetPedIsDrunk(GetPlayerPed(-1), false)
SetPedMotionBlur(GetPlayerPed(-1), false)
– Stop the toxication
Citizen.Trace(“Retour à la réalité.\n”)
end

but also not working