local marker = createMarker(-2113.10571, 16.14241, 34.5,"cylinder", 3, 255, 0, 255)
function naprawa(thePlayer)
if ( isPedInVehicle ( thePlayer ) ) then
local theVehicle = getPedOccupiedVehicle ( thePlayer)
setElementFrozen (theVehicle, true)
setTimer(function()
setElementFrozen(theVehicle, false)
end, 5000, 1)
local money = getPlayerMoney(thePlayer)
if (money > 250) then
takePlayerMoney(thePlayer, 250)
local succes = fixVehicle ( theVehicle )
if ( succes ) then
outputConsole ("Pojazd naprawiony", thePlayer )
else
outputConsole ( "Nieudana pr?ba naprawy.", thePlayer)
end
else
outputConsole ( "Musisz by? w poje?dzie!", thePlayer )
end
end
end
addEventHandler("onMarkerHit", marker, naprawa)
function fix1(thePlayer)
local accName = getAccountName ( getPlayerAccount ( thePlayer ) )
if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then
local theVehicle = getPedOccupiedVehicle ( thePlayer)
local succes = fixVehicle ( theVehicle )
if ( succes ) then
outputConsole ("Pojazd naprawiony", thePlayer )
end
end
end
addCommandHandler("fix", fix1)