| Tematy otagowane jako: ogrpg-salon |
| 1. ogrpg-salon |
Siemka . Chcia?bym aby auta po kupnie respi?y sie w wybranym miejscu i oczywiscie zeby all sie zapisywa?o w bazie danych ( w?a?ciciel,id itp.)
Kod :
[lua]
--salon_s
createBlip(1896.49, 2145.48, 10.50, 55,2,255,0,0,255,0,100)
createBlip(1999.33, 2469.13, 10.90, 55,2,255,0,0,255,0,100)
--createBlip(173.23, 618.22, 5.56, 55,2,255,0,0,255,0,100)
--createBlip(2119.67, 1397.23, 10.81, 55,2,255,0,0,255,0,100)
--createBlip(2872.42, 2264.65, 10.81, 55,2,255,0,0,255,0,100)
--createBlip(2560.42, 739.65, 10.81, 55,2,255,0,0,255,0,100)
local positionVehicles = {
--{'NAZWA',ID, math.random(0,10), CENA, 2886.20, 2257.11, 10.75, 359.36, 359.93, 43.58},
-- CYGAN
{'Moonbeam', 418, math.random(51718,82719), math.random(3800,4000), 2235.03, 2050.32, 10.91, 0.1, 0.0, 89.5},
{'Walton', 478, math.random(51718,82719), math.random(3800,4000), 2235.07, 2042.38, 10.81, 359.2, 360.0, 89.9},
{'Sadler', 543, math.random(51718,82719), math.random(8800,9000), 2246.52, 2042.51, 10.64, 359.0, 0.0, 269.8},
{'Perennial', 404, math.random(51718,82719), math.random(3800,4000), 2235.24, 2034.73, 10.56, 359.7, 0.0, 90.1},
{'Manana', 410, math.random(51718,82719), math.random(4800,5000), 2246.01, 2050.19, 10.47, 359.4, 0.0, 269.5},
{'Nebula', 516, math.random(51718,82719), math.random(10000,10200), 2246.58, 2034.83, 10.65, 360.0, 0.0, 269.9},
{'Oceanic', 467, math.random(51718,82719), math.random(14800,15000), 2233.08, 2063.76, 10.56, 0.0, 0.0,... |
| 2. ogrpg-salon limit 5 auta |
Mam problem poniewa? jest limit 5 auta pojazdu nie daje ale kas? zabiera jak kto ma 5 auta.
[lua]
addEventHandler('onVehicleEnter', resourceRoot, function(plr, seat, jacked)
if seat~=0 then return end
if source:getData('vehsell:info') and source:getData('vehsell:info').selling==1 then
plr:outputChat('* Pojazd nie jest dost?pny w sprzeda?y.', 255, 0, 0)
return
end
local data=source:getData('vehsell:info')
if not data then return end
plr:setData('vehsell:info', {
['cost']=data.cost,
['model']=data.model,
['mileage']=data.mileage,
}, false)
plr:outputChat(' Aby zakupi? ten pojazd wpisz /kuppojazd')
end)
addEventHandler('onVehicleExit', resourceRoot, function(plr, seat, jacked)
if seat~=0 then return end
local data=plr:getData('vehsell:info')
if not data then return end
plr:removeData('vehsell:info')
end)
addCommandHandler('kuppojazd', function(plr, cmd)
local data=plr:getData('vehsell:info')
if not data then return end
if getPlayerMoney(plr) < data.cost then
triggerClientEvent(plr,"addNotification",root,"Nie posiadasz wystarczajacej kwoty pieni?dzy!","error")
return
end
local vehicle=plr:getOccupiedVehicle()
if vehicle then
removePedFromVehicle(vehicle)
end
local cost=data.cost
local model=data.model
local mileage=data.mileage
local ui... |
|