etrnl
CLASSIC RPG
Wiek: 26 Na forum: 2200 dni Posty: 86
Nick w MP: anonymous
Piwa : 57
Kod:
local zablokowane ={
['hydra'] = true,
['rhino'] = true,
['hunter'] = true,
['Trailer 1'] = true,
['Trailer 2'] = true,
['Trailer 3'] = true,
['Trailer 3'] = true,
['Box Freight'] = true,
['Box Freight'] = true,
}
function cv(plr, cmd, ...)
if getElementData(plr,"player:admin") ~= true then return end
if getElementData(plr, "player:level") == 4 or 3 then
if (not ...) then
outputChatBox("#FF0000* #FFFFFFPoprawne u?ycie: /cv <model>", plr,0,0,0,true)
return
end
local model = table.concat ( { ... }, " " )
if tonumber(model) ~= nil then
outputChatBox("#FF0000* #FFFFFFWpisz model a nie ID!", plr,0,0,0,true)
return end
local model = model:lower()
if zablokowane[model] then
outputChatBox("#FF0000* #FFFFFFTen pojazd jest zablokowany!", plr,0,0,0,true)
return end
local dim = getElementDimension(plr)
local int = getElementInterior(plr)
local x,y,z = getElementPosition(plr)
local r1,r2,r3 = getElementRotation(plr)
local model = getVehicleModelFromName(model)
if not model then outputChatBox("#FF0000* #FFFFFFNie ma takiego pojazdu!", plr,0,0,0,true) return end
local vehicle = getPedOccupiedVehicle(plr)
if getPedOccupiedVehicle(plr) then
outputChatBox("#FF0000* #FFFFFFNajpierw wysi?d? z pojazdu!", plr,0,0,0,true)
else
pojazd = createVehicle(model, x, y, z, r1, r2, r3)
setElementDimension(pojazd, dim)
setElementInterior(pojazd, int)
setElementPosition(plr,x, y, z+1.5)
warpPedIntoVehicle(plr, pojazd)
setVehiclePlateText(pojazd, "ZRESPIONY")
outputChatBox("#FF0000* #FFFFFFPojazd zosta? zrespiony!", plr,0,0,0,true)
function usuwam(plr,seat)
if seat ~= 0 then return end
destroyElement(source)
end
setTimer(usuwam,5000, 1)
addEventHandler("onVehicleExit", pojazd, usuwam)
end
end
end
addCommandHandler("cv", cv)
Jak poprawnie podpi?? timer na usuwanie auta? kmini? i kminie i nie moge wykmini?, ten nie dzia?a.
Przy okazji onPlayerQuit i onPlayerWasted jakby tu podpi?? pod respione?
Z g?ry dzi?ki, stawiam piwko za pomoc! :_)