Neler yeni

Foruma hoş geldin, Ziyaretçi

Forum içeriğine ve tüm hizmetlerimize erişim sağlamak için foruma kayıt olmalı ya da giriş yapmalısınız. Foruma üye olmak tamamen ücretsizdir.

Türkiye'nin İlk ve tek FiveM forum adresi

Forum adresimize hoş geldin FiveMTürk olarak amacımız siz değerli kullanıcılarımıza en aktif fikir ve paylaşım platformu sunmak bir yana en güvenilir şekilde alışveriş yapabileceğiniz bir platform sunmaktır.
DF DF
DF DF
DF DF

Cevaplandı Tırcılık mesleğin ücretini fiyat aralıklarına belirleme

  • Konbuyu başlatan ashryper
  • Başlangıç tarihi
  • Cevaplar 13
  • Görüntüleme 718

ashryper

Üye
FT Kullanıcı
Katılım
4 yıl 1 ay 21 gün
Mesajlar
156
Selamlar başlıkla belirtmek istediğim tırcılık mesleğinde işi yaptıktan sonra verdiği parayı net olarak belirlemek yerine 30k-40k arasında bir ücret vermesini istiyorum nasıl yapabilirim.
 
Kullandığın config.lua'sında veya client'luasında money veya cash yazarak aratıp bulabilirsin
 
Kullandığın config.lua'sında veya client'luasında money veya cash yazarak aratıp bulabilirsin
fiyatlarını biliyorum fakat net fiyat var dediğim gibi 15k mesela ben bunu 15-20 arası vermesini istiyorum
 
Config.MinParaMiktar = 25
Config.MaxParaMiktar = 225
 
Server.lua'nızı paylaşırsanız yardımcı olabilirim
 
Selamlar başlıkla belirtmek istediğim tırcılık mesleğinde işi yaptıktan sonra verdiği parayı net olarak belirlemek yerine 30k-40k arasında bir ücret vermesini istiyorum nasıl yapabilirim.
scripti paylaşmanız veya görüntü vermeniz daha iyi olabilir
fakat cashi bulduğunuz yere şunu yapıştırın
örn ;
Kod:
xPlayer.addMoney(paramiktarı)
ise
Kod:
local paramiktarı = math.random(30000, 40000)
xPlayer.addMoney(paramiktarı)
şeklinde yaparsanız 30000 ila 40000 arasında bir para verir. zaten şu an kurgusal olarak konuşuyorum scripti paylaşırsanız veya görüntü paylaşırsanız ona göre yardım edebilirim
 
Kod:
ESX = nil
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)

for k, v in pairs(Config.Jobs) do
    v['taken'] = false
end

RegisterServerEvent('esx_ets:startJob')
AddEventHandler('esx_ets:startJob', function(id)
    local xPlayer, hasJob = ESX.GetPlayerFromId(source), true
    if Config.Job['jobRequired'] then
        if xPlayer.job.name == Config.Job['jobName'] then
            hasJob = true
        else
            hasJob = false
        end
    end
    if hasJob then
        if not Config.Jobs[id]['taken'] then
            Config.Jobs[id]['taken'] = true
            TriggerClientEvent('esx_ets:start', xPlayer.source, Config.Jobs[id], id)
        else
            TriggerClientEvent('esx:showNotification', xPlayer.source, Strings['somebody_doing'])
        end
    else
        TriggerClientEvent('esx:showNotification', xPlayer.source, Strings['not_job'])
    end
end)

RegisterServerEvent('esx_ets:jobMenu')
AddEventHandler('esx_ets:jobMenu', function()
    local elements, xPlayer = {}, ESX.GetPlayerFromId(source)
    for k, v in pairs(Config.Jobs) do
        if not v['taken'] then
            table.insert(elements, {label = v.title, value = k})
        end
    end
    TriggerClientEvent('esx_ets:menu', xPlayer.source, elements)
end)

RegisterServerEvent('esx_ets:jobFinished')
AddEventHandler('esx_ets:jobFinished', function(id, damages)
    local xPlayer = ESX.GetPlayerFromId(source)
    if Config.Jobs[id]['taken'] then
        local price, health = Config.Jobs[id].payment, (damages['body_health'] + damages['engine_health']) / 2
        for k, v in pairs(damages['windows']) do health = health - 30 end
        for k, v in pairs(damages['tires']) do health = health - 35 end
        for k, v in pairs(damages['doors']) do health = health - 40 end
        if health <= 900 and health > 800 then price = price - 50 elseif health <= 800 and health > 700 then price = price - 75 elseif health <= 700 and health > 600 then price = price - 100 elseif health <= 600 and health > 300 then price = price - 150 elseif health <= 300 then price = price - 350 end
        if price >= 0 then
            xPlayer.addMoney(price)
            TriggerClientEvent('esx:showNotification', xPlayer.source, (Strings['reward']):format(price))
        else
            xPlayer.removeMoney(price)
            TriggerClientEvent('esx:showNotification', xPlayer.source, (Strings['paid_damages']):format(price))
        end
        Wait(Config.ReAdd * 1000)
        Config.Jobs[id]['taken'] = false
    end
end)
 
scripti paylaşmanız veya görüntü vermeniz daha iyi olabilir
fakat cashi bulduğunuz yere şunu yapıştırın
örn ;
Kod:
xPlayer.addMoney(paramiktarı)
ise
Kod:
local paramiktarı = math.random(30000, 40000)
xPlayer.addMoney(paramiktarı)
şeklinde yaparsanız 30000 ila 40000 arasında bir para verir. zaten şu an kurgusal olarak konuşuyorum scripti paylaşırsanız veya görüntü paylaşırsanız ona göre yardım edebilirim
hypnosis#5620 ulaşır mısın
 
scripti paylaşmanız veya görüntü vermeniz daha iyi olabilir
fakat cashi bulduğunuz yere şunu yapıştırın
örn ;
Kod:
xPlayer.addMoney(paramiktarı)
ise
Kod:
local paramiktarı = math.random(30000, 40000)
xPlayer.addMoney(paramiktarı)
şeklinde yaparsanız 30000 ila 40000 arasında bir para verir. zaten şu an kurgusal olarak konuşuyorum scripti paylaşırsanız veya görüntü paylaşırsanız ona göre yardım edebilirim
script bu hocam
 
script bu hocam
gönderdiğiniz için isteği iptal ettim son hali bu ;
server.lua
Kod:
ESX = nil
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)

for k, v in pairs(Config.Jobs) do
    v['taken'] = false
end

RegisterServerEvent('esx_ets:startJob')
AddEventHandler('esx_ets:startJob', function(id)
    local xPlayer, hasJob = ESX.GetPlayerFromId(source), true
    if Config.Job['jobRequired'] then
        if xPlayer.job.name == Config.Job['jobName'] then
            hasJob = true
        else
            hasJob = false
        end
    end
    if hasJob then
        if not Config.Jobs[id]['taken'] then
            Config.Jobs[id]['taken'] = true
            TriggerClientEvent('esx_ets:start', xPlayer.source, Config.Jobs[id], id)
        else
            TriggerClientEvent('esx:showNotification', xPlayer.source, Strings['somebody_doing'])
        end
    else
        TriggerClientEvent('esx:showNotification', xPlayer.source, Strings['not_job'])
    end
end)

RegisterServerEvent('esx_ets:jobMenu')
AddEventHandler('esx_ets:jobMenu', function()
    local elements, xPlayer = {}, ESX.GetPlayerFromId(source)
    for k, v in pairs(Config.Jobs) do
        if not v['taken'] then
            table.insert(elements, {label = v.title, value = k})
        end
    end
    TriggerClientEvent('esx_ets:menu', xPlayer.source, elements)
end)

RegisterServerEvent('esx_ets:jobFinished')
AddEventHandler('esx_ets:jobFinished', function(id, damages)
    local xPlayer = ESX.GetPlayerFromId(source)
    if Config.Jobs[id]['taken'] then
        local price, health = Config.Jobs[id].payment, (damages['body_health'] + damages['engine_health']) / 2
        for k, v in pairs(damages['windows']) do health = health - 30 end
        for k, v in pairs(damages['tires']) do health = health - 35 end
        for k, v in pairs(damages['doors']) do health = health - 40 end
        if health <= 900 and health > 800 then price = price - 50 elseif health <= 800 and health > 700 then price = price - 75 elseif health <= 700 and health > 600 then price = price - 100 elseif health <= 600 and health > 300 then price = price - 150 elseif health <= 300 then price = price - 350 end
        if price >= 0 then
            local kazanilanpara = math.random(Config.MinMoney, Config.MaxMoney)
            xPlayer.addMoney(kazanilanpara)
            TriggerClientEvent('esx:showNotification', xPlayer.source, (Strings['reward']):format(price))
        else
            xPlayer.removeMoney(price)
            TriggerClientEvent('esx:showNotification', xPlayer.source, (Strings['paid_damages']):format(price))
        end
        Wait(Config.ReAdd * 1000)
        Config.Jobs[id]['taken'] = false
    end
end)
 
isteğiniz gelmedi hocam
Confige ise ;
Kod:
Config = {
    JobCenter = vector3(-35.98, -2096.25, 15.94),
    ReAdd = 60, -- seconds after a job is finished until its shown again
    Job = {
        ['jobRequired'] = false, -- if true: only players with the specified job can work, false everyone can work
        ['jobName'] = 'trucker',
    },
    Jobs = {
        -- {title = 'title', payment = reward, vehicles = {'truck', 'trailer'}, start = {vector3(x, y, z), heading}, trailer = {vector3(x, y, z), heading}, arrive = vector3(x, y, z)}
        {title = 'IKEA (UZUN MENZIL)', payment = 30000, vehicles = {'daf', 'trailers'}, start = {vector3(-25.87, -2079.01, 15.7), 108.51}, trailer = {vector3(-72.21, -2095.72, 16.7), 108.89}, arrive = vector3(2671.0, 3530.35, 51.26)},
        {title = 'SUPERMARKET (KISA MENZIL)', payment = 3000, vehicles = {'daf', 'trailers2'}, start = {vector3(-24.97, -2082.83, 15.79), 109.24}, trailer = {vector3(-75.22, -2101.08, 16.7), 106.66}, arrive = vector3(103.57, -1819.37, 25.56)},
        {title = 'BENZİN TANKERI (UZUN MENZIL)', payment = 30000, vehicles = {'daf', 'tanker2'}, start = {vector3(-23.48, -2086.18, 15.79), 108.62}, trailer = {vector3(-124.14, -2113.7, 16.77), 108.61}, arrive = vector3(2655.59, 3264.27, 55.24)},
        {title = 'GALERİ ARAÇLARI (KISA MENZIL)', payment = 6200, vehicles = {'daf', 'tr4'}, start = {vector3(-22.5, -2089.98, 15.79), 102.22}, trailer = {vector3(-121.88, -2117.36, 16.77), 109.86}, arrive = vector3(-9.99, -1088.02, 26.75)},
        {title = 'DONMUŞ BALIK (ORTA MENZIL)', payment = 10000, vehicles = {'daf', 'trailers2'}, start = {vector3(-21.94, -2094.01, 15.79), 98.64}, trailer = {vector3(-43.04, -2107.23, 16.77), 110.15}, arrive = vector3(-1044.94, -1425.06, 5.43)},
        {title = 'KÜTÜK YIĞINI (ORTA MENZIL)', payment = 10000, vehicles = {'daf', 'trailerlogs'}, start = {vector3(-22.02, -2097.81, 15.79), 87.33}, trailer = {vector3(-43.67, -2112.37, 16.77), 109.13}, arrive = vector3(1388.48,-727.21, 67.27)},
        {title = 'YAT PARÇALARI KONTEYNER (KISA MENZIL)', payment = 7800, vehicles = {'daf', 'docktrailer'}, start = {vector3(-22.51, -2101.69, 15.79), 73.6}, trailer = {vector3(-72.0, -2118.37, 16.77), 109.46}, arrive = vector3(-708.78,-1283.47, 5.0)},
        {title = 'UÇAK TEKERLEKLERİ (UZUN MENZIL)', payment = 32000, vehicles = {'daf', 'trailers'}, start = {vector3(-23.78, -2105.35, 15.79), 60.08}, trailer = {vector3(-70.5, -2122.15, 16.77), 110.31}, arrive = vector3(1740.85,3288.53, 41.19)}
    },
}
Config.MinMoney = 40000
Config.MaxMoney = 50000

Strings = {
    ['not_job'] = "Kamyoncu işine sahip değilsin!",
    ['somebody_doing'] = 'Biri zaten bu işi yapıyor, lütfen başka bir tane seçin!',
    ['menu_title'] = 'Tırcılık - iş seçin',
    ['e_browse_jobs'] = 'Mevcut işlere göz atmak için ~INPUT_CONTEXT~ Basın',
    ['start_job'] = 'Tırcılık Mesleği',
    ['truck'] = 'Kamyon',
    ['trailer'] = 'Dorse',
    ['get_to_truck'] = 'Binin ~y~Kamyon~w~!',
    ['get_to_trailer'] = 'Dorseye Gidin ~y~Dorse~w~ Takın!',
    ['destination'] = 'Hedef',
    ['get_out'] = 'İnin ~y~Kamyon~w~!',
    ['park'] = 'Park et ~y~Dorse~w~ hedefte.',
    ['park_truck'] = 'Hedefe Park Edin ~y~Kamyon~w~ .',
    ['drive_destination'] = 'Şuraya sürün ~b~hedef~w~.',
    ['reward'] = 'Aferin! Teslim Ettin ~g~$~w~%s',
    ['paid_damages'] = 'Bir dahaki sefere daha iyi sür! Ödedin ~r~$~w~%s neden olunan hasarlar için!',
    ['drive_back'] = ' ~y~Kamyonu ~w~aldığınız yere geri dönün.',
    ['detach'] = 'Dorseyi Ayırın.'
}
şeklinde kodu yapıştırın. Sadece Config.MinMoney ve MaxMoney kısmını ekledim değiştirdiyseniz sadece onu eklemeniz yeter
 
Sorununuzun cevabını bulabildiniz mi?
 

Forumdan daha fazla yararlanmak için giriş yapın yada üye olun!

Forumdan daha fazla yararlanmak için giriş yapın veya kayıt olun!

Kayıt ol

Forumda bir hesap oluşturmak tamamen ücretsizdir.

Şimdi kayıt ol
Giriş yap

Eğer bir hesabınız var ise lütfen giriş yapın

Giriş yap

Bu konuyu görüntüleyen kullanıcılar

Tema düzenleyici

Tema özelletirmeleri

Granit arka planlar

Lütfen Javascript'i etkinleştirin!Javascript'i etkinleştirin!