Hi all,
I am new to scripting for GTA, but have done some basic scripting in other platforms. I am trying to modify an existing script with a lot of nested if/then statements that can be a little hard to follow. So as part of the if/then statement I want to create a line that echos a line of text in the game… When I have tried to do that it has failed. This is the statement where I want to add it:
if QBCore.Functions.GetPlayerData().job.name == “police” then
–TaskPlayAnim(ped, “rcmjosh4”, “josh_leadout_cop2”, 8.0, 2.0, -1, 48, 10, 0, 0, 0 )
canFire = false
currentHoldster = GetPedDrawableVariation(ped, 7)
TaskPlayAnimAdvanced(ped, “rcmjosh4”, “josh_leadout_cop2”, GetEntityCoords(ped, true), 0, 0, rot, 3.0, 3.0, -1, 50, 0, 0, 0)
Wait(1000)
SetCurrentPedWeapon(ped, newWeap, true)
You need to request the animation dictionary here RequestAnimDict - FiveM Natives @ Cfx.re Docs
I am confused. Why do I need that?? I just want to have the game echo a line of text into the game as part of the if/then statement just so I know which if/then statement is being used at a specific time.
print("YOUR LINE OF TEXT")
This will show in the F8 console
Thanks! Is there a way to show it on the game screen vs the F8 console?