AmirrezaJaberi / FIREAC

✅ FiveM Strongest Anticheat
GNU Affero General Public License v3.0
162 stars 53 forks source link

(Idea) Raycasting Coords #35

Closed Esterze closed 1 year ago

Esterze commented 1 year ago

Add a raycast that tells you the coords of where you're looking at. Could be useful.

AmirrezaJaberi commented 1 year ago

Hi @Zzeyy, FiveM doesn't have get coords of player camera .

Esterze commented 1 year ago

This feature is possible, though.

Esterze commented 1 year ago

Take inspiration from the RayCastCoords script.

Esterze commented 1 year ago

https://docs.fivem.net/natives/?_0x377906D8A31E5586 local player = PlayerPedId() local playerCoords = GetEntityCoords(player) local raycast = StartExpensiveSynchronousShapeTestLosProbe(playerCoords.x, playerCoords.y, playerCoords.z, GetOffsetFromEntityInWorldCoords(player, 0.0, 100.0, 0.0), 10, player, 0) local , , , , result = GetShapeTestResult(raycast) if result ~= nil then local hitCoords = _0x377906D8A31E5586(result) print("Hit coordinates: " .. hitCoords.x .. ", " .. hitCoords.y .. ", " .. hitCoords.z) else print("Raycast did not hit anything.") end

A little bit of formatting couldn't hurt. But yeah, something like this.

Esterze commented 1 year ago

Also instead of printing the coordinates make it copy them.

Esterze commented 1 year ago

@nutria22 You're mistaken. I am suggesting this as a new feature for the anticheat. I already use raycasts.

AmirrezaJaberi commented 1 year ago

I work on that and test it not bad idea

AmirrezaJaberi commented 1 year ago

I tested this but nothing good option for anti cheat in this code I don't have any good idea for this code