So this is inside of the client.lua and it works fine. My problem is that everybody can use it, so to solve this problem i need to turn it server sided. Can someone help me out with this because im really new to fivem scripting.
RegisterCommand("pd", function()
local ped = PlayerPedId()
local currentPos = GetEntityCoords(ped)
SetEntityCoords(ped, 436.491, -982.172, 30.699, false, false, false, false)
BeginTextCommandThefeedPost("STRING")
AddTextComponentSubstringPlayerName("~b~TELEPORTIERT~b~ " .. "zum " .. "~r~PD~r~")
EndTextCommandThefeedPostTicker(true, true)
end, true)
Sry for my english