ed
This commit is contained in:
parent
3279494318
commit
4f29316365
3 changed files with 53 additions and 26 deletions
|
@ -1,5 +1,19 @@
|
|||
|
||||
function DebugPrint(type, message)
|
||||
if Config.Debug then
|
||||
if type == "error" then
|
||||
print('^1[TAXI]^7 ' .. message)
|
||||
elseif type == "warning" then
|
||||
print('^3[TAXI]^7 ' .. message)
|
||||
else -- success/info
|
||||
print('^2[TAXI]^7 ' .. message)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local QBCore = exports['qb-core']:GetCoreObject()
|
||||
|
||||
|
||||
RegisterNetEvent('taxi:payFare', function(amount)
|
||||
local src = source
|
||||
local Player = QBCore.Functions.GetPlayer(src)
|
||||
|
@ -13,7 +27,7 @@ RegisterNetEvent('taxi:payFare', function(amount)
|
|||
TriggerClientEvent('QBCore:Notify', src, 'Du hast $' .. amount .. ' für die Taxifahrt bezahlt', 'success')
|
||||
|
||||
-- Log für Admin
|
||||
print('^2[TAXI]^7 ' .. Player.PlayerData.name .. ' (' .. src .. ') hat $' .. amount .. ' für eine Taxifahrt bezahlt')
|
||||
DebugPrint('^2[TAXI]^7 ' .. Player.PlayerData.name .. ' (' .. src .. ') hat $' .. amount .. ' für eine Taxifahrt bezahlt')
|
||||
else
|
||||
local bankMoney = Player.PlayerData.money.bank
|
||||
if bankMoney >= amount then
|
||||
|
@ -21,12 +35,12 @@ RegisterNetEvent('taxi:payFare', function(amount)
|
|||
TriggerClientEvent('QBCore:Notify', src, 'Du hast $' .. amount .. ' per Karte für die Taxifahrt bezahlt', 'success')
|
||||
|
||||
-- Log für Admin
|
||||
print('^2[TAXI]^7 ' .. Player.PlayerData.name .. ' (' .. src .. ') hat $' .. amount .. ' per Karte für eine Taxifahrt bezahlt')
|
||||
DebugPrint('^2[TAXI]^7 ' .. Player.PlayerData.name .. ' (' .. src .. ') hat $' .. amount .. ' per Karte für eine Taxifahrt bezahlt')
|
||||
else
|
||||
TriggerClientEvent('QBCore:Notify', src, 'Du hast nicht genug Geld für die Taxifahrt!', 'error')
|
||||
|
||||
-- Log für Admin
|
||||
print('^1[TAXI]^7 ' .. Player.PlayerData.name .. ' (' .. src .. ') konnte $' .. amount .. ' für eine Taxifahrt nicht bezahlen')
|
||||
DebugPrint('^1[TAXI]^7 ' .. Player.PlayerData.name .. ' (' .. src .. ') konnte $' .. amount .. ' für eine Taxifahrt nicht bezahlen')
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue