Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.
GTAONLINE.PL
Tematy otagowane jako: fixvehicle
1. fixVehicle a cena * uszkodzenie
Witam,funkcja ma za zadanie naprawi? auto i pobra? dan? op?at? zale?n? od stanu auta.

function naprawa()
local theVehicle=GetPedOccupiedVehicle (source)
local cena=takePlayerMoney(source,10)
local cena2=getElementHealth(theVehicle)
if (
cena2 90then (cena 20)
fixVehicle(theVehicle)
end
end
addEvent
("naprawa"true)
addEventHandler("naprawa"getRootElement(), naprawa)

Jak? tutaj gaf? strzeli?em ? >.<
2. FixVehicle i setVehicleColor
function napraw (vehicle,plr)
   if 
sprawdz ~= team1 then
 local vehicle
=getPedOccupiedVehicle(vehicle)
        if 
isElementWithinMarker(vehiclemarker2then 
            fixVehicle 
vehicle )
              else
                
cancelEvent()
        
end
    end
    end


Witam,chcia?bym wiedzie? jak przerobi? t? funkcj? tak ?eby mo?na by?o fixowa? auto gracza za pomoc? /napraw nick , grasz musi by? w marker2,naprawiaj?cy musi by? w marker..


drug? spraw? jest komenda ustawiaj?ca kolor auta

function ustawkolor(vehicle,r,g,b,plr)
   if 
sprawdz ~= team1 then
 local vehicle
=getPedOccupiedVehicle(vehicle)
        if 
isElementWithinMarker(vehiclemarker2then 
            setVehicleColor
(vehicle,r,g,b)
              else
                
cancelEvent()
        
end
    end
    end


Chcia?bym wiedzie? co zrobi?em nie tak (ustawia kolor ?le,nie wed?ug systemu r,g,b) i chcia?bym ?eby komenda funkcjonowa?a tak samo jak ta pierwsza,gracz wjedzie do marker2,maluj?cy musi by? w marker .. :)

za pomoc daje du?e zimne piwo :3