Hey Everyone, I am making a dice rolling script for RTRP and I have everything working EXCEPT for the animation that the command triggers… I was thinking the Jerk Off or wank animation (its as close as I can get) Was wondering if someone could help me out:
I have the script working with Animations that start with WORLD_HUMAN and PROP_HUMAN but the Jerk off animation is mp_player_int_upperwank or mp_player_int_wank_01 and have no clue how to use these.
My Code:
local purpleText = {128, 0, 128}
function diceText(text)
TriggerEvent("chatMessage", "[Dice]", purpleText, text)
end
Citizen.CreateThread(function()
while true do
Wait(0)
local dice = math.random(1, 6)
RegisterCommand("rolldice", function()
if IsEntityDead(GetPlayerPed(-1)) then
diceText("Error: Cannot roll dice when your dead...")
else
diceText("You rolled: ".. dice)
local diceAnim = "mp_player_int_wank_01"
TaskStartScenarioInPlace(GetPlayerPed(-1), diceAnim, 0, true)
end
end)
end
end)
Would love if someone could help… would make my week. Thanks in advance!
loadAnimDict( mp_player_int_upperwank )
TaskPlayAnim(GetPlayerPed(-1), mp_player_int_upperwank,mp_player_int_wank_01, 3.0, 1.0, -1, 01, 0, 0, 0, 0 )
Wait(2000)
ClearPedTasks(GetPlayerPed(-1))
function loadAnimDict(dict)
while (not HasAnimDictLoaded(dict)) do
RequestAnimDict(dict)
Citizen.Wait(5)
end
end
end
local purpleText = {128, 0, 128}
function diceText(text)
TriggerEvent("chatMessage", "[Dice]", purpleText, text)
end
Citizen.CreateThread(function()
while true do
Wait(0)
local dice = math.random(1, 6)
RegisterCommand("rolldice", function()
if IsEntityDead(GetPlayerPed(-1)) then
diceText("Error: Cannot roll dice when your dead...")
else
while (not HasAnimDictLoaded(mp_player_int_upperwank)) do
RequestAnimDict(mp_player_int_upperwank)
Citizen.Wait(5)
end
TaskPlayAnim(GetPlayerPed(-1),mp_player_int_upperwank,mp_player_int_wank_01, 3.0, 1.0, -1, 01, 0, 0, 0, 0 )
Wait(2000)
ClearPedTasks(GetPlayerPed(-1))
end
end)
end
end)
local purpleText = {128, 0, 128}
function diceText(text)
TriggerEvent("chatMessage", "[Dice]", purpleText, text)
end
Citizen.CreateThread(function()
while true do
Wait(0)
local dice = math.random(1, 6)
RegisterCommand("rolldice", function()
if IsEntityDead(GetPlayerPed(-1)) then
diceText("Error: Cannot roll dice when your dead...")
else
while (not HasAnimDictLoaded(mp_player_int_upperwank)) do
RequestAnimDict(mp_player_int_upperwank)
Citizen.Wait(5)
TaskPlayAnim(GetPlayerPed(-1),mp_player_int_upperwank,mp_player_int_wank_01, 3.0, 1.0, -1, 01, 0, 0, 0, 0 )
Wait(2000)
ClearPedTasks(GetPlayerPed(-1))
end
end
end)
end
end)
or this with the end after. ive still not quite got my head around the ends