shrpnl 1
shrpnl
Queinn 1
Queinn
NovaLst 1
NovaLst
InfernoShade 1
InfernoShade
MysticBlade 1
MysticBlade
SolarPhantom 1
SolarPhantom
Riftas 1
Riftas
LunarWraith 1
LunarWraith
DarkHorizon 1
DarkHorizon
SLyFeLLowTR 1
SLyFeLLowTR
Scarlet 1
Scarlet
dogusarikaya 1
dogusarikaya
Hikaye Ekle

Altın Konu Fivem Telefonlar Upload Servisini Discord Olarak Kullanma

HERAKLES Otomatik Avlı kalıcı sunucu. 19 Haziran'da açılıyor. Atius & Wizard güvencesiyle hemen kayıt ol, ön kayıt ödülleri aktif. HEMEN TIKLA!

Çoğu sunucu telefonlarından kamera çekemiyor yada bazı sunucular. Bunun nedeni fotoğraf yükleme servisinin devre dışı bırakılmasından dolayıdır. Bunun kalıcı çözümü olarak discord webhook aracılığı ile yeni upload servisini discord kanalımız yapacağız.

Öncelikle gcphone/client/client.lua dosya konumuna giriyoruz ve aşağıda ki satırı buluyoruz.

[CODE title="bul"]RegisterNUICallback('takePhoto', function(data, cb)
CreateMobilePhone(1)
CellCamActivate(true, true)
takePhoto = true
Citizen.Wait(0)
if hasFocus == true then
SetNuiFocus(false, false)
hasFocus = false
end
while takePhoto do
Citizen.Wait(0)

if IsControlJustPressed(1, 27) then -- Toogle Mode
frontCam = not frontCam
CellFrontCamActivate(frontCam)
elseif IsControlJustPressed(1, 177) then -- CANCEL
DestroyMobilePhone()
CellCamActivate(false, false)
cb(json.encode({ url = nil }))
takePhoto = false
break
elseif IsControlJustPressed(1, 176) then -- TAKE.. PIC
exports['screenshot-basic']:requestScreenshotUpload(data.url, data.field, function(data)
local resp = json.decode(data)
DestroyMobilePhone()
CellCamActivate(false, false)
cb(json.encode({ url = resp.files[1].url }))
end)
takePhoto = false
end
HideHudComponentThisFrame(7)
HideHudComponentThisFrame(8)
HideHudComponentThisFrame(9)
HideHudComponentThisFrame(6)
HideHudComponentThisFrame(19)
HideHudAndRadarThisFrame()
end
Citizen.Wait(1000)
PhonePlayAnim('text', false, true)
end)[/CODE]

Bu kod satırını bulduktan sonra aşağıda ki kod ile değiştiriyoruz.


[CODE title="değiştir"]RegisterNUICallback('takePhoto', function(data, cb)
CreateMobilePhone(1)
CellCamActivate(true, true)
takePhoto = true
Citizen.Wait(0)
if hasFocus == true then
SetNuiFocus(false, false)
hasFocus = false
end
while takePhoto do
Citizen.Wait(0)

if IsControlJustPressed(1, 27) then -- Toogle Mode
frontCam = not frontCam
CellFrontCamActivate(frontCam)
elseif IsControlJustPressed(1, 177) then -- CANCEL
DestroyMobilePhone()
CellCamActivate(false, false)
cb(json.encode({ url = nil }))
takePhoto = false
break
elseif IsControlJustPressed(1, 176) then -- TAKE.. PIC
exports['screenshot-basic']:requestScreenshotUpload("WEBHOOK ", "files[]", function(data)
local resp = json.decode(data)
DestroyMobilePhone()
CellCamActivate(false, false)
cb(json.encode({ url = resp.attachments[1].proxy_url }))
end)
takePhoto = false
end
HideHudComponentThisFrame(7)
HideHudComponentThisFrame(8)
HideHudComponentThisFrame(9)
HideHudComponentThisFrame(6)
HideHudComponentThisFrame(19)
HideHudAndRadarThisFrame()
end
Citizen.Wait(1000)
PhonePlayAnim('text', false, true)
end)[/CODE]


"WEBHOOK" yazan yere discord kanalınızın webhookunu yapıştırın. Artık yükleme servisiniz discord sunucunuz olacak ve herhangi bir sorun ile karşılaşmaycaksınız.
 

Şu an konuyu görüntüleyenler (Toplam : 0, Üye: 0, Misafir: 0)

Geri
Üst