Selam arkadaşlar bugün paylaşıcağım şeyle telefonlarda fotoğraf servisine gerek kalmıcak çünkü bu işlemden sonra fotoğrafları webhooka atıcaksınız çok kolay bişekilde Ozaman başlayalım
İlk öncelikle gcphone/client/client.lua klasör konumuna girin
Bu satırı bulup şimdi atıcağım kod bloğu ile değiştirin
İşlem bu kadardı artık tek yapmanız gereken WEBHOOK URL yazan kısma discord webhook oluşturup yapıştırmak olcaktır. Sunucunuza restart attıkdan sonra kullanabilirsiniz
Discord webhook oluşturmayı bilmeyenler için aşşağıya link bırakıcam ordan nasıl oluşturulduğuna bakabilirisiz
İlk öncelikle gcphone/client/client.lua klasör konumuna girin
Kod:
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.. ***
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)
Kod:
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.. ***
exports['screenshot-basic']:requestScreenshotUpload("WEBHOOK URL", "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)
Discord webhook oluşturmayı bilmeyenler için aşşağıya link bırakıcam ordan nasıl oluşturulduğuna bakabilirisiz
Bu paylaşımı görmeye yetkiniz bulunmamaktadır. Lütfen,
Giriş yap veya üye ol.
- Paylaşım Şifresi
- Yok
- Paylaşımınızın kullanım alanını yazınız
- Fivem