yaqx
Wiek: 21 Na forum: 942 dni Posty: 1
Piwa : 1
Kod: sellMarker = createMarker(-2419.78247, -614.53668, 132.56250-1,"cylinder",2.0)
player = getLocalPlayer()
local tbl = {}
tbl['Banshee'] = math.random(6000,7200)
tbl['Infernus'] = math.random(6800,7200)
tbl['Bravura'] = math.random(6800,7200)
tbl['Buffalo'] = math.random(6800,7200)
tbl['Linerunner'] = math.random(6800,7200)
tbl['Perennial'] = math.random(6800,7200)
tbl['Dumper'] = math.random(6800,7200)
tbl['Sentinel'] = math.random(6800,7200)
tbl['Fire Truck'] = math.random(6800,7200)
tbl['Taxi'] = math.random(6800,7200)
tbl['Trashmaster'] = math.random(6800,7200)
tbl['Manana'] = math.random(6800,7200)
tbl['Stretch'] = math.random(6800,7200)
tbl['BF Injection'] = math.random(6800,7200)
tbl['Voodoo'] = math.random(6800,7200)
tbl['Pony'] = math.random(6800,7200)
tbl['Cheetah'] = math.random(6800,7200)
tbl['Leviathan'] = math.random(6800,7200)
tbl['Moonbeam'] = math.random(6800,7200)
tbl['Esperanto'] = math.random(6800,7200)
tbl['Washington'] = math.random(6800,7200)
tbl['Previon'] = math.random(6800,7200)
tbl['Stallion'] = math.random(6800,7200)
tbl['Rumpo'] = math.random(6800,7200)
tbl['Admiral'] = math.random(6800,7200)
tbl['Turismo'] = math.random(6800,7200)
tbl['Solair'] = math.random(6800,7200)
tbl['Yankee'] = math.random(6800,7200)
tbl['Faggio'] = math.random(6800,7200)
tbl['Glendale'] = math.random(6800,7200)
tbl['Oceanic'] = math.random(6800,7200)
tbl['Walton'] = math.random(6800,7200)
tbl['Comet'] = math.random(6800,7200)
tbl['Regina'] = math.random(6800,7200)
tbl['Burrito'] = math.random(6800,7200)
tbl['Marquis'] = math.random(6800,7200)
tbl['Blista Compact'] = math.random(6800,7200)
tbl['Mesa'] = math.random(6800,7200)
tbl['Hotring Racer 3'] = math.random(6800,7200)
tbl['Hotring Racer 2'] = math.random(6800,7200)
tbl['Buccaneer'] = math.random(6800,7200)
tbl['Majestic'] = math.random(6800,7200)
tbl['Sadler'] = math.random(6800,7200)
tbl['Intruder'] = math.random(6800,7200)
tbl['Primo'] = math.random(6800,7200)
tbl['Tampa'] = math.random(6800,7200)
tbl['Sunrise'] = math.random(6800,7200)
tbl['Merit'] = math.random(6800,7200)
tbl['Elegy'] = math.random(6800,7200)
tbl['Nevada'] = math.random(6800,7200)
tbl['Yosemite'] = math.random(6800,7200)
tbl['Windsor'] = math.random(6800,7200)
tbl['Huntley'] = math.random(6800,7200)
tbl['Mower'] = math.random(6800,7200)
tbl['Sweeper'] = math.random(6800,7200)
tbl['Broadway'] = math.random(6800,7200)
tbl['Tornado'] = math.random(6800,7200)
tbl['Club'] = math.random(6800,7200)
tbl['Ranger'] = math.random(6800,7200)
tbl['Alpha'] = math.random(6800,7200)
tbl['Sadler'] = math.random(6800,7200)
addEventHandler("onClientMarkerHit", sellMarker, function()
if isPedInVehicle(player) then
zlom = true
--setElementData(player,"zlomowisko",true)
vehicle = getPedOccupiedVehicle(player)
vehicleID = getVehicleID(vehicle)
vehicleName = getVehicleNameFromModel(vehicleID)
setElementFrozen(vehicle,true)
outputChatBox("Witamy w złomowisku, twój pojazd to: "..vehicleName..". Aby go sprzedać wpisz /sprzedaj")
outputChatBox("Cena samochodu to: "..tbl[vehicleName].."")
outputChatBox("Jeżeli nie chcesz zezłomować swojego samochodu wpisz /wyjdz")
end
end)
function sell()
if zlom == false then return end
if zlom == true then
givePlayerMoney(tbl[vehicleName])
addCommandHandler("sprzedaj", sell)
setElementFrozen(vehicle,false)
destroyElement(vehicle)
outputChatBox("Zezłomowałeś pojazd "..vehicleName.." i otrzymałeś: "..tbl[vehicleName])
end
end
addCommandHandler("sprzedaj",sell)
function quit()
if zlom == true then
setElementFrozen(vehicle,false)
zlom = false
end
end
addCommandHandler("wyjdz",quit)
^cside
Ogólnie wszystko fajnie działa, tylko, że destroyElement(vehicle), nie usuwa pojazdu a w debugu nic nie ma help