Lua
elseif
getDistanceBetweenPoints3D(px,py,pz,758,-1036.8,23.5) < 250 then ---Richman Los Santos
outputChatBox ("Ihr Fahrzeug wurde in ihrer nähe abgestellt!", thePlayer, 0, 255, 0)
outputChatBox ("Es wurde ihnen "..preis.." $ abgezogen", thePlayer, 0, 255, 0)
takePlayerMoney ( thePlayer, preis)
rent_car = createVehicle(carid,758,-1036.8,23.5,0,0,0)
rent_car_blip = createBlipAttachedTo(rent_car,55)
local crt = setTimer(function()
if (isPedInVehicle(thePlayer)) and (getPedOccupiedVehicle(thePlayer) == rent_car) then
if (crt) and (isTimer(crt)) then
takePlayerMoney ( thePlayer, preis)
outputChatBox ("Ihr Vertrag wurde um 60min verlängert!", thePlayer, 0, 255, 0)
resetTimer(crt)
end
else
if (crt) and (isTimer(crt)) then
killTimer(crt)
end
end
rent_car_health = getElementHealth(rent_car)
rent_car_health_preis = 1000 - rent_car_health
rent_car_health_preis2 = rent_car_health_preis * schaden_preis
takePlayerMoney(thePlayer, rent_car_health_preis2)
destroyElement(rent_car)
destroyElement(rent_car_blip)
outputChatBox ("Es wurde ihnen "..rent_car_health_preis2.." $ für reperaturen des Fahrzeugs abgezogen", thePlayer, 0, 255, 0)
end,1000*60*60,1)
elseif
Alles anzeigen
so in etwa ??