1
0
Fork 0
forked from Simnation/Main
This commit is contained in:
Nordi98 2025-08-12 17:11:44 +02:00
parent 3c2ccf49a3
commit ee396ec359
5 changed files with 0 additions and 3457 deletions

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,180 +0,0 @@
Config = {}
Config.Debug = false -- Set to true to enable debug prints, false to disable
-- Taxi Fahrzeuge und Preise
Config.TaxiVehicles = {
{
model = 'taxi',
label = 'Standard Taxi',
pricePerKm = 5,
spawnChance = 80
},
{
model = 'vstretch',
label = 'Luxus Limousine',
pricePerKm = 15,
spawnChance = 10
},
{
model = 'elegyrh7',
label = 'JDM Taxi',
pricePerKm = 15,
spawnChance = 10
},
}
-- Taxi Stationen mit festen Fahrzeugen
Config.TaxiStations = {
{
name = "Los Santos Airport Taxi",
coords = vector4(-1051.28, -2712.83, 13.68, 243.31),
blipCoords = vector3(-1051.28, -2712.83, 13.68),
vehicles = {
{
model = 'taxi',
coords = vector4(-1051.28, -2712.83, 13.68, 243.31),
pricePerKm = 5
},
{
model = 'taxi',
coords = vector4(-1041.38, -2718.65, 13.67, 239.73),
pricePerKm = 5
}
}
},
{
name = "Downtown Taxi Stand",
coords = vector4(913.97, -160.64, 74.72, 200.67),
blipCoords = vector3(913.97, -160.64, 74.72),
vehicles = {
{
model = 'taxi',
coords = vector4(913.97, -160.64, 74.72, 200.67),
pricePerKm = 5
},
{
model = 'taxi',
coords = vector4(899.74, -180.99, 73.86, 247.36),
pricePerKm = 5
}
}
},
{
name = "Paleto Bay Taxi",
coords = vector4(-339.14, 6072.48, 31.31, 225.76),
blipCoords = vector3(-339.14, 6072.48, 31.31),
vehicles = {
{
model = 'taxi',
coords = vector4(-339.14, 6072.48, 31.31, 225.76),
pricePerKm = 6
},
}
},
{
name = "Stadtpark Taxi",
coords = vector4(204.9, -846.9, 30.5, 254.69),
blipCoords = vector3(204.9, -846.9, 30.5),
vehicles = {
{
model = 'taxi',
coords = vector4(204.9, -846.9, 30.5, 254.69),
pricePerKm = 6
},
{
model = 'taxi',
coords = vector4(213.61, -849.66, 30.28, 248.6),
pricePerKm = 6
}
}
},
{
name = "Vespucci Beach Taxi",
coords = vector4(-1614.7, -857.81, 10.02, 140.47),
blipCoords = vector3(-1609.67, -862.78, 10.01),
vehicles = {
{
model = 'taxi',
coords = vector4(-1614.7, -857.81, 10.02, 140.47),
pricePerKm = 5
},
{
model = 'vstretch',
coords = vector4(-1609.67, -862.78, 10.01, 230.02),
pricePerKm = 15
}
}
}
}
-- Spawn Locations für /taxi Command (mobile Taxis)
Config.MobileTaxiSpawns = {
vector4(-1013.96, -2734.56, 13.67, 246.68),
vector4(902.33, -143.8, 76.62, 327.11),
vector4(-1277.46, -810.35, 17.13, 133.23),
vector4(1705.39, 4803.73, 41.79, 91.83),
vector4(-383.43, 6064.31, 31.5, 135.49),
vector4(136.64, 6369.87, 31.37, 28.48), -- Paleto
}
-- Bekannte Ziele mit festen Preisen
Config.KnownDestinations = {
{
name = "Los Santos International Airport",
coords = vector3(-1037.0, -2674.0, 13.8),
price = 50
},
{
name = "Vinewood Hills",
coords = vector3(120.0, 564.0, 184.0),
price = 35
},
{
name = "Del Perro Pier",
coords = vector3(-1850.0, -1230.0, 13.0),
price = 25
},
{
name = "Sandy Shores",
coords = vector3(1815.27, 3649.01, 34.25),
price = 75
},
{
name = "Paleto Bay",
coords = vector3(-296.31, 6056.98, 31.36),
price = 100
},
{
name = "Mount Chiliad",
coords = vector3(501.0, 5604.0, 797.0),
price = 120
},
{
name = "Maze Bank Tower",
coords = vector3(-46.24, -787.47, 44.14),
price = 40
},
{
name = "Vespucci Beach",
coords = vector3(-1686.28, -934.24, 7.69),
price = 30
}
}
-- Allgemeine Einstellungen
Config.MaxWaitTime = 120 -- Sekunden bis Taxi spawnt
Config.TaxiCallCooldown = 30 -- Sekunden zwischen Taxi-Rufen
Config.MinFare = 10 -- Mindestpreis
Config.PricePerKm = 5 -- Standardpreis pro Kilometer
Config.WaitingFee = 2 -- Preis pro Minute warten
Config.StationTaxiRespawnTime = 300 -- 5 Minuten bis Taxi an Station respawnt

View file

@ -1,26 +0,0 @@
fx_version 'cerulean'
game 'gta5'
author 'YourName'
description 'Taxi System with ox_lib and qb-target'
version '1.0.0'
shared_scripts {
'@ox_lib/init.lua',
'config.lua'
}
client_scripts {
'client/main.lua',
'client/stations.lua'
}
server_scripts {
'server/main.lua'
}
dependencies {
'qb-core',
'ox_lib',
'qb-target'
}

View file

@ -1,62 +0,0 @@
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)
if not Player then return end
local playerMoney = Player.PlayerData.money.cash
if playerMoney >= amount then
Player.Functions.RemoveMoney('cash', amount, 'taxi-fare')
TriggerClientEvent('QBCore:Notify', src, 'Du hast $' .. amount .. ' für die Taxifahrt bezahlt', 'success')
-- Log für Admin
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
Player.Functions.RemoveMoney('bank', amount, 'taxi-fare')
TriggerClientEvent('QBCore:Notify', src, 'Du hast $' .. amount .. ' per Karte für die Taxifahrt bezahlt', 'success')
-- Log für Admin
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
DebugPrint('^1[TAXI]^7 ' .. Player.PlayerData.name .. ' (' .. src .. ') konnte $' .. amount .. ' für eine Taxifahrt nicht bezahlen')
end
end
end)
-- Admin Command zum Respawnen aller Taxi-Stationen
QBCore.Commands.Add('respawntaxis', 'Respawne alle Taxi-Stationen (Admin Only)', {}, false, function(source, args)
local Player = QBCore.Functions.GetPlayer(source)
if Player.PlayerData.job.name == 'admin' or QBCore.Functions.HasPermission(source, 'admin') then
TriggerClientEvent('taxi:respawnAllStations', -1)
TriggerClientEvent('QBCore:Notify', source, 'Alle Taxi-Stationen wurden respawnt', 'success')
else
TriggerClientEvent('QBCore:Notify', source, 'Du hast keine Berechtigung für diesen Befehl', 'error')
end
end, 'admin')
-- Event für das Respawnen der Stationen
RegisterNetEvent('taxi:respawnAllStations', function()
-- Wird an alle Clients gesendet
end)