Fivem.com.tr

Fivem.com.tr
Katılım
1 Eki 2022
Mesajlar
5,891
Tepki
80
Merhabalar bazı sunucularda telefon elinde kalıyor ve çok sinir bozucu ve bende yaşıyordum böyle bir kod yazdım ve sizinle paylaşıyorum umarım işinize yarar.



gcphone\client\client.lua'nın içine:





Kod:


Kod:
Citizen.CreateThread(function()

  while true do

    Citizen.Wait(0)

    if takePhoto ~= true then

      if IsControlJustPressed(1, KeyOpenClose) then

        ExecuteCommand("telfix")

        TooglePhone()

      end

      if menuIsOpen == true then

        for _, value in ipairs(KeyToucheCloseEvent) do

          if IsControlJustPressed(1, value.code) then

            SendNUIMessage({keyUp = value.event})

          end

        end

        if useMouse == true and hasFocus == ignoreFocus then

          local nuiFocus = not hasFocus

          SetNuiFocus(nuiFocus, nuiFocus)

          hasFocus = nuiFocus

        elseif useMouse == false and hasFocus == true then

          SetNuiFocus(false, false)

          hasFocus = false

        end

      else

        if hasFocus == true then

          SetNuiFocus(false, false)

          hasFocus = false

        end

      end

    end

  end

end)



gcphone\server\server.lua içine:







Kod:


Kod:
RegisterCommand('telfix', function(source)

    xPlayer = ESX.GetPlayerFromId(source)

    TriggerEvent('crew:eek:nPlayerLoaded', source)



    xPlayer.removeAccountMoney('bank', 1)

    xPlayer.addAccountMoney('bank', 1)

end)







-- /telfix


Başarısızlık da bir seçenektir. Eğer ki başarısız olmuyorsanız, yeterince girişimde bulunmuyorsunuz demektir!

Konu alıntıdır, yanlış veya hatalı bir bilgi/paylaşım var ise yanıtlayabilir veya bizimle iletişime geçebilirsiniz.
 

Şu anda bu konu'yu okuyan kullanıcılar

Benzer konular

Üst