Wysłany: 2014-06-19, 20:04
darekpo799
Wiek: 40 Na forum: 4383 dni Posty: 10
Nick w MP: darekpo799
Witajcie mam problem z respawnem aut ot?z wgl nie wiem jak za to sie zabrac a moze ktos ma juz gotowy skrypt ?
Bardzo potrzebuje tego skryptu
I przepraszam jak bym nie w dobrym miejscu wstawil ten temat poprostu jestem nowy
Za skrypt lub pomoc dam
Wysłany: 2014-06-19, 20:07
MeeShuffle
Programista/Grafik
Wiek: 32 Na forum: 4394 dni Posty: 2758
Nick w MP: Shuffle
Piwa : 8575
Kod z mojego serwera :
local respawn = 30
local r
addCommandHandler ( "unspawn" ,function( player )
local accName = getAccountName ( getPlayerAccount ( player ) )
if not isObjectInACLGroup ( "user." .. accName , aclGetGroup ( "Admin" ) ) then return end
if isTimer ( r ) then
resetTimer ( r )
outputDebugString ( "Srut" )
return
end
outputChatBox ( "Respawn pojazd?w nast?pi za 30 sekund !" , root , 255 , 255 , 255 )
outputDebugString ( "Srut" )
r = setTimer (function()
for _ , vehicle in ipairs ( getElementsByType ( "vehicle" ) ) do
if getElementData ( vehicle , "zapisany" ) then
if isEmpty ( vehicle ) then
local x = getElementData ( vehicle , "x" )
local y = getElementData ( vehicle , "y" )
local z = getElementData ( vehicle , "z" )
local r1 = getElementData ( vehicle , "r1" )
local r2 = getElementData ( vehicle , "r2" )
local r3 = getElementData ( vehicle , "r3" )
setElementPosition ( vehicle , tonumber ( x ), tonumber ( y ), tonumber ( z ) )
setElementRotation ( vehicle , tonumber ( r1 ), tonumber ( r2 ), tonumber ( r3 ) )
end
else
if isEmpty ( vehicle ) then
destroyElement ( vehicle )
end
end
end
-- end
outputDebugString ( "Jeeeb unspawn" )
outputChatBox ( "Respawn pojazd?w gotowy" , root , 255 , 255 , 255 )
end , respawn * 1000 , 1 )
end )
function isEmpty ( vehicle )
local passengers = getVehicleMaxPassengers ( vehicle )
if type ( passengers ) == 'number' then
for seat = 0 , passengers do
if getVehicleOccupant ( vehicle , seat ) then
return false
end
end
end
return true
end
Wysłany: 2014-06-20, 07:31
darekpo799
Wiek: 40 Na forum: 4383 dni Posty: 10
Nick w MP: darekpo799
aha czyli ze wpisze /unspawn i wszystkie auta znikna tak ?
Wysłany: 2014-06-20, 07:33
MeeShuffle
Programista/Grafik
Wiek: 32 Na forum: 4394 dni Posty: 2758
Nick w MP: Shuffle
Piwa : 8575
darekpo799 , wszystkie zniszczone b?d? puste.
Wysłany: 2014-06-20, 12:58
Riot
3X
Wiek: 29 Na forum: 5729 dni Posty: 1123
Nick w MP: Riot/3X
Piwa : 286
Wysłany: 2014-06-22, 12:22
Maciąg
Wiek: 26 Na forum: 4376 dni Posty: 211
Nick w MP: Dawirzo
Piwa : 149
Mogliby?cie poda? jak ma wygl?da? meta? Bo zdaje mi si? ?e ?le zrobi?em Z g?ry dzi?kuj? ! Daje
Podpis
Status prac nad Time to play RPG 25%
Wysłany: 2014-06-22, 17:25
MeeShuffle
Programista/Grafik
Wiek: 32 Na forum: 4394 dni Posty: 2758
Nick w MP: Shuffle
Piwa : 8575
<meta>
<script src="nazwa.lua"/>
</meta>
Tagi: jak :: zrobic :: skrypt :: respawn :: nie :: uzywanych :: aut
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: