Fl!k
Wiek: 26 Na forum: 3592 dni Posty: 162
Piwa : 18
Witam , potrzebuje pomocy! Chcia?bym zrobi? syrene gdy otworzy sie jedna ze skrzy? znalaz?em podobny skrypt pr?buje cos zrobic ale niezbyt wychodzi ;d
ZA POMOC DAJE PIWKO
ZNALEZIONE SERVER:
triggerClientEvent ( "serenaON" , root , boxCol [ i ])
setTimer ( updateBox , 2520000 , 1 ) -- 45 & #1084;инут
CLIENT:
addEvent ( "serenaON" , true )
addEventHandler ( "serenaON" , root , function( obj )
if obj then
local x , y , z = getElementPosition ( obj )
sirena = playSound3D ( "sirena.mp3" , x , y , z , true )
setSoundMaxDistance ( sirena , 10000 )
attachElements ( sirena , obj )
setTimer ( stopSoundSirena , 30000 , 1 , sirena )
end
end )
function stopSoundSirena ( sirena )
if isElement ( sirena ) then
destroyElement ( sirena )
end
end
KOD DO KT?REGO CHCE WKLEI?:
local ZoneBoxesSitess = {
{ 292.81 , 1814.71 , 1.01 - 0.6 },
};
function createZoneBoxesSite ()
local plr = getElementsByType ( 'player' )
if isElement ( cargoColl ) then
destroyElement ( getElementData ( cargoColl , "parent" ));
destroyElement ( cargoColl );
end
local nr = math . random ( 1 , 6 );
local x , y , z = ZoneBoxesSitess [ nr ][ 1 ], ZoneBoxesSitess [ nr ][ 2 ], ZoneBoxesSitess [ nr ][ 3 ];
for _ , v in ipairs ( getElementsByType ( "player" )) do
if ( getElementData ( v , 'pcz:language' ) == 'PL' ) then
outputChatBox ( " " , v , 255 , 255 , 255 , true )
outputChatBox ( "tu cos bedzie" , v , 255 , 255 , 255 , true )
outputChatBox ( "tu cos bedzie" , v , 255 , 255 , 255 , true )
outputChatBox ( " " , v , 255 , 255 , 255 , true )
end
end
cargobobb2 = createObject ( 1854 , x , y , z )
setElementFrozen ( cargobobb2 , true );
end
cargoColl = createColSphere ( x , y , z + 0.2 , 1.3 );
setElementData ( cargoColl , "parent" , cargobobb2 );
setElementData ( cargoColl , "helicrash" , true );
setElementData ( cargoColl , "MAX_Slots" , 0 );
setElementData ( cargoColl , "zapalniczka" , math . random ( 0 , 3 ) + math . random ( 1 , 3 ))
end
end
function create ()
local plr = getElementsByType ( 'player' )
if #plr >= playersNeed then
createZoneBoxesSite ()
end
end
createZoneBoxesSite ()
setTimer ( create , math . random ( 2400000 , 3600000 ), 0 )