gpt-4-0314· OpenAI
WildChat-4.8M (AI2)
fivem scripting TaskTurnPedToFaceEntity(PlayerPedId(), car, 1000) but make it so the ped…
- User
fivem scripting TaskTurnPedToFaceEntity(PlayerPedId(), car, 1000) but make it so the ped has his back to the entity looking away from it
- Assistant
You can achieve this by adjusting the ped's heading after turning them to face the entity. Here's the script with the changes:
TaskTurnPedToFaceEntity(PlayerPedId(), car, 1000) -- Wait for the ped to turn towards the entity Citizen.Wait(1000) -- Calculate the new heading where the ped is facing away from the entity local ped = PlayerPedId() local carCoords = GetEntityCoords(car) local pedCoords = GetEntityCoords(ped) local heading = GetEntityHeading(ped) local desiredHeading = heading + 180 if desiredHeading > 360 then desiredHeading = desiredHeading - 360 end -- Rotate the ped to face away from the entity SetEntityHeading(ped, desiredHeading)This script first turns the ped to face the entity using TaskTurnPedToFaceEntity, waits for the specified duration, then adds 180 degrees to the ped's current heading, effectively making them face the opposite direction (with their back towards the entity).
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.