Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Citizen.CreateThread(function()
- while true do
- Citizen.Wait(0)
- for k in pairs(arms) do
- local plyCoords = GetEntityCoords(GetPlayerPed(-1), false)
- local dist = Vdist(plyCoords.x, plyCoords.y, plyCoords.z, arms[k].x, arms[k].y, arms[k].z)
- if dist <= 0.5 then
- hintToDisplay('Press ~INPUT_CONTEXT~ to exercise your ~g~arms')
- if IsControlJustPressed(0, Keys['E']) then
- if training == false then
- TriggerServerEvent('esx_gym:checkChip')
- ESX.ShowNotification("Preparing the ~g~exersice~w~...")
- Citizen.Wait(1000)
- if membership == true then
- local playerPed = GetPlayerPed(-1)
- TaskStartScenarioInPlace(playerPed, "world_human_muscle_free_weights", 0, true)
- Citizen.Wait(30000)
- ClearPedTasksImmediately(playerPed)
- ESX.ShowNotification("You need to rest ~r~60 seconds ~w~before doing another exercise.")
- --TriggerServerEvent('esx_gym:trainArms') ## COMING SOON...
- training = true
- elseif membership == false then
- ESX.ShowNotification("You need a membership in order to do a ~r~exercise")
- end
- elseif training == true then
- ESX.ShowNotification("You need to rest...")
- resting = true
- CheckTraining()
- end
- end
- end
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement