Exports
Teleports
AllowTeleport and SafeTeleport, so your scripts can move players without a TELEPORT detection.
Wrap calls in pcall so your script keeps working if HydraAC is stopped.
AllowTeleport (server)
Expects one teleport for this player in the next ms milliseconds. Call it just before your own SetEntityCoords.
exports.HydraAC:AllowTeleport(source, 5000)
SetEntityCoords(GetPlayerPed(source), x, y, z)| Argument | Type | |
|---|---|---|
source | number | The player's server id. |
ms | number | How long the allowance lasts, in milliseconds. |
SafeTeleport (server)
Allows the teleport and moves the player for you.
exports.HydraAC:SafeTeleport(source, vector3(x, y, z), heading)AllowTeleport (client)
For scripts that teleport on the client. Call it just before SetEntityCoords.
pcall(function() exports.HydraAC:AllowTeleport(5000) end)
SetEntityCoords(PlayerPedId(), x, y, z)A client-side allowance is limited, waives one teleport, and is still recorded as a log. Prefer the server export where you can: your server cannot be faked.
No code access? Use trusted spots instead.