Wysłany: 2018-10-05, 17:30
AkossPL
Wiek: 25 Na forum: 4079 dni Posty: 140
Nick w MP: AkossPL
Piwa : 3
Siema nie respi pojazdu w pracy
SERVER:
Pojazdy = {
{- 1851.09 ,- 129.32 , 11.63 , 0.0 , 0.2 , 86.5 },
{- 1851.18 ,- 134.53 , 11.63 , 0.1 , 359.9 , 87.2 },
{- 1851.25 ,- 140.04 , 11.63 , 0.1 , 359.9 , 86.7 },
{- 1876.55 ,- 149.54 , 11.63 , 0.0 , 0.0 , 358.9 },
{- 1882.07 ,- 149.38 , 11.63 , 0.0 , 0.0 , 356.6 },
}
for i , v in ipairs ( Pojazdy ) do
local Pojazd = createVehicle ( 609 , v [ 1 ], v [ 2 ], v [ 3 ]+ 0.3 , v [ 4 ], v [ 5 ], v [ 6 ])
setElementData ( Pojazd , "pojazd_opis" , "Za?adowane Meble : 0%" )
setVehicleColor ( Pojazd , 0 , 255 , 84 )
setVehicleHandling ( Pojazd , "maxVelocity" , 100 )
setElementData ( Pojazd , "pojazdy_przebieg" , math . random ( 500 , 1000 ))
setElementData ( Pojazd , "pojazdy_paliwo" , 50 )
setElementFrozen ( Pojazd , true )
setVehicleEngineState ( Pojazd , false )
end
addEventHandler ( "onVehicleEnter" , resourceRoot , function( plr , seat )
if seat == 0 then
if getElementData ( plr , "graczPraca" ) == false then
setElementData ( plr , "graczPraca" , true )
setElementFrozen ( source , false )
outputChatBox ( "* Rozpocza?e? Prace Jako Kurier Mebli, Jed? Za?adowa? Meble!" , plr , 255 , 255 , 255 )
triggerClientEvent ( plr , "kurier_praca" , resourceRoot )
else
outputChatBox ( "* Posiadasz Ju? Aktywn? Prace!" , plr , 255 , 0 , 0 )
end
end
end )
function respawnVehicles ()
for i , v in ipairs ( getElementsByType ( "vehicle" , resourceRoot )) do
if not getVehicleOccupant ( v ) then
respawnVehicle ( v )
setElementFrozen ( v , true )
setElementData ( v , "pojazd_opis" , "Za?adowane Meble : 0%" )
setVehicleColor ( v , 0 , 255 , 84 )
setVehicleHandling ( v , "maxVelocity" , 100 )
setElementData ( v , "pojazdy_przebieg" , math . random ( 500 , 1000 ))
setElementData ( v , "pojazd_paliwo" , 50 )
setVehicleEngineState ( v , false )
end
end
end
setTimer ( respawnVehicles , 5000 , 0 )
addEvent ( "checkCars" , true )
addEventHandler ( "checkCars" , resourceRoot , respawnVehicles )
Wysłany: 2018-10-05, 18:22
Wilq
Wiek: 24 Na forum: 4428 dni Posty: 3410
Piwa : 739
Ja?niej prosz? - auta si? tworz? ale potem nie od?wie?aj? si? kiedy nikogo w nich nie ma, tak?
Je?li zgadzasz si? z powy?szym, sprawd? ten kod:
SERVER:
Pojazdy = {
{- 1851.09 ,- 129.32 , 11.63 , 0.0 , 0.2 , 86.5 },
{- 1851.18 ,- 134.53 , 11.63 , 0.1 , 359.9 , 87.2 },
{- 1851.25 ,- 140.04 , 11.63 , 0.1 , 359.9 , 86.7 },
{- 1876.55 ,- 149.54 , 11.63 , 0.0 , 0.0 , 358.9 },
{- 1882.07 ,- 149.38 , 11.63 , 0.0 , 0.0 , 356.6 },
}
for i , v in ipairs ( Pojazdy ) do
local Pojazd = createVehicle ( 609 , v [ 1 ], v [ 2 ], v [ 3 ]+ 0.3 , v [ 4 ], v [ 5 ], v [ 6 ])
setVehicleRespawnPosition ( Pojazd , v [ 1 ], v [ 2 ], v [ 3 ]+ 0.3 , v [ 4 ], v [ 5 ], v [ 6 ])
toggleVehicleRespawn ( Pojazd , true )
setElementData ( Pojazd , "pojazd_opis" , "Za?adowane Meble : 0%" )
setVehicleColor ( Pojazd , 0 , 255 , 84 )
setVehicleHandling ( Pojazd , "maxVelocity" , 100 )
setElementData ( Pojazd , "pojazdy_przebieg" , math . random ( 500 , 1000 ))
setElementData ( Pojazd , "pojazdy_paliwo" , 50 )
setElementFrozen ( Pojazd , true )
setVehicleEngineState ( Pojazd , false )
end
addEventHandler ( "onVehicleEnter" , resourceRoot , function( plr , seat )
if seat == 0 then
if getElementData ( plr , "graczPraca" ) == false then
setElementData ( plr , "graczPraca" , true )
setElementFrozen ( source , false )
outputChatBox ( "* Rozpocza?e? Prace Jako Kurier Mebli, Jed? Za?adowa? Meble!" , plr , 255 , 255 , 255 )
triggerClientEvent ( plr , "kurier_praca" , resourceRoot )
else
outputChatBox ( "* Posiadasz Ju? Aktywn? Prace!" , plr , 255 , 0 , 0 )
end
end
end )
function respawnVehicles ()
for i , v in ipairs ( getElementsByType ( "vehicle" , resourceRoot )) do
if not getVehicleOccupant ( v ) then
respawnVehicle ( v )
setElementFrozen ( v , true )
setElementData ( v , "pojazd_opis" , "Za?adowane Meble : 0%" )
setVehicleColor ( v , 0 , 255 , 84 )
setVehicleHandling ( v , "maxVelocity" , 100 )
setElementData ( v , "pojazdy_przebieg" , math . random ( 500 , 1000 ))
setElementData ( v , "pojazd_paliwo" , 50 )
setVehicleEngineState ( v , false )
end
end
end
setTimer ( respawnVehicles , 5000 , 0 )
addEvent ( "checkCars" , true )
addEventHandler ( "checkCars" , resourceRoot , respawnVehicles )
Tagi: nie :: respi :: pojazdu :: pracy
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: