Cze?? !
Znalaz?em na owym forum skrypt na komend? /zaparkuj i chcia?bym go przerobi? tak, ?eby po restarcie skryptu na prywatne auta te pojazdy si? zapisywa?y. Obecnie on jest na wybuchy. Chcia?bym r?wnie? doda? do tego funkcj?, kt?ra automatycznie zapisuje auta np. co 2 sekundy. Prosi?bym o pomoc:
[lua]addEventHandler ( "onVehicleExplode", root, function()
local x = getElementData ( source, "x" )
local y = getElementData ( source, "y" )
local z = getElementData ( source, "z" )
local r1 = getElementData ( source, "r1" )
local r2 = getElementData ( source, "r2" )
local r3 = getElementData ( source, "r3" )
setTimer ( setElementHealth , 1000, 1, source, 100 )
setTimer ( fixVehicle , 1000, 1, source)
setTimer ( setElementPosition , 1000, 1, source, x, y, z )
setTimer ( setElementRotation , 1000, 1, source, r1, r2, r3 )
end)
function pozycja ( player )
local auto = getPedOccupiedVehicle ( player )
if auto then
local xa,ya,za = getElementPosition ( auto )
local xr,yr,zr = getElementRotation ( auto )
setElementData ( auto, "r1", tonumber(xr) )
setElementData ( auto, "r2", tonumber(yr) )
setElementData ( auto, "r3", tonumber(zr) )
setElementData ( auto, "x", tonumber(xa) )
setElementData ( auto, "y", tonumber(ya) )
setElementData ( auto, "z", tonumber(za) )
outputChatBox ( "Pojazd i miejsce pojazdu zapisane ! Po resp... |