wanna to get it work but idknow somthing about lua and i try this for server side but not work
sombody know how to fix this script to get it work ?
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
if IsControlJustPressed(1,214) than
WaypointHandle = GetFirstBlipInfoId(8)
if DoesBlipExist(WaypointHandle) than
Vector3 WaypointPos = GetBlipCoords(WaypointHandle)
Handle = GetPlayerPed(-1)
if IsPedInAnyVehicle(Handle, 0) than
Handle = GetVehiclePedIsIn(GetPlayerPed(-1), 0)
SetEntityCoords(Handle, WaypointPos, 0, 0, 0, 1)
else PRINT("~r~Please set a Waypoint!", 2000)
end
end
end
end
Blip b = GetFirstBlipInfoId(BLIP_WAYPOINT);
if(DoesBlipExist(b)) {
Vector3 v;
GetBlipCoords(b, &v);
SetCharCoordinates(ped, v.X, v.Y, v.Z);
while(v.Z == 0.0f)
{
GetGroundZFor3DCoord(v.X, v.Y, 1000, &v.Z);
Wait(0);
}
SetCharCoordinates(ped, v.X, v.Y, v.Z);
PrintStringWithLiteralStringNow2(“STRING”, “Teleported to waypoint.”, 1000, 1);
}
else
{
PrintStringWithLiteralStringNow2(“STRING”, “No way point found to teleport to.”, 1000, 1);
}
i need this funtion by pressing any keyboard button than player can teleport to waypoint … cz i want to disabled script function to prevent rom any scammer or bad modder joining server… it will make player can teleport easy to another player…