Hi, I think very important thing is to create new handlers to detect some actions:
- WantedLevel (check source (clientId))
- AttachSomething (check source (clientId))
- Explosion (check source (clientId))
- CreateEntity (check source (clientId))
- SpawnCar (check source (clientId))
- SpawnPed (check source (clientId)
If that will be implemented, I can create the best anticheat ever… but currently I dont know who is spawning somehting… who did explosion on server, who creates any object, who set wanted level…
These actions are ClientSide, so it is very important to check who is responsible for creating them.
This can be possible if you made your own client script to create the object but I see what you are talking about. So when a player calls the native calls CreateVehicle it triggers a server event showing you what they created so you can track it?
like… onWantedLevelChange? or are you literally just asking for GetPlayerWantedLevel
local oldWanted = 0
Citizen.CreateThread(function()
while true do
Citizen.Wait(10)
local newWanted = GetPlayerWantedLevel(PlayerId())
if newWanted ~= oldWanted then
TriggerEvent("onWantedLevelChange", newWanted,oldWanted)
end
oldWanted=newWanted
end
end)
the rest is not really that do-able without adding completely new natives ( that i know of )
I believe he is talking about like… when CreateVehicle is triggered it triggers the onCreateVehicle Event.
This code only returns current client wanted level, but there is no way to check WHO SET This wanted level.
Exactly, with source (clientId) - this same for others onPlayerExploded (by who?) OnCreateObject( again by who?)
This will likely be done together with OneSync. Doing a separate implementation beforehand would be counterproductive for many reasons, mainly since there’s insane overlap in the code needed for either.
2 Likes
In addition, if you don’t mind client events for ‘complete’ security and all (but to catch idiots), perhaps a local script event could be added to the game on shorter notice to at least prevent people who don’t intercept events from doing anything bad.
1 Like
That will be great - I am waiting ;p also waiting for OneSync ;p
2 Likes