Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.
GTAONLINE.PL
Tematy otagowane jako: syrena
1. syrena
Siemka, jest jaki? spos?b ?eby usun?? te wbudowane syreny z radiowoz?w usun???
Tworz? radiowozy w kodzie i dodaje do nich funkcje

Wiêcej informacji znajdziesz w Wikipedii MTA:

removeVehicleSirens

i nie dzia?a.

Radiow?z id 596

Ma kto? jaki? spos?b?
2. Syrena PSP,OSP
Problem polega na tym, ze jak wgrywam dwie te same syreny dwa te same skrypty ze np marker w 1 skrypcie jest w LV a w drugim skrypcie jest BB to wyswietlaja sie dwa panele, ze i z tego skryptu i z tego
Blad w DB3: Dziwne, przedchwila pokazywalo w DB3 blad, tera nie wykrywa bledu choc jest, ale pamietam co pisalo ze AddEventHandler showGUI cos tam, tutaj daje kodzik: [lua]-- Pierwotny w?‚a?›ciciel i twĂłrca kodu: AmaMa
-- Zakaz uĆ„ywania / edycji kodu bez wcze?›niejszej zgody ze strony w?‚a?›ciciela
-- Zakaz wykorzystywania ca?‚ego lub fragmentĂłw kodu
-- W przypadku z?‚amania powyzszych zasad sprawa zostanie skierowana do s?…du pod zaĆ„utem: Naruszenia maj?…tkowych praw autorskich
-- Pierwotnie pe?‚ne prawo do uĆ„ywania tego kodu posiada tylko AmaMa
mojeW,mojeH = 1360,768
sW,sH = guiGetScreenSize()
width, height = (sW/mojeW), (sH/mojeH)

local wm1={
button={},
}

function gui()
exports["buttons"]:createCustomWindow("Panel alarmowania", 442*width, 138*height, 493*width, 443*height, tocolor(255, 255, 255, 255), false)
exports["buttons"]:createCustomText2("Pami?™taj, Ć„e naduĆ„ywanie syreny b?™dzie karane!", 675*width,455*height,693*width,55*height, tocolor(255, 0, 0, 255), 71, "default", "center", "center", false, false, false, false, false)
end


wm1.button[1]=guiCreateButton(0.42, 0.39, 0.18, 0.08, "Syrena OSP&...
3. Syrena PSP
Witam mam syrene PSP ale niewiem jak mam zrobi? ?eby tylko frakcja PSP mog?a j? odpala?

marker createMarker(-2124.37,-6.27,45.20-0.9"cylinder"1000170)
addEventHandler("onMarkerHit"marker, function(he)
    if 
getElementType(he) == "player" then
    triggerClientEvent
(he"showGUI"he)
    
end
end
)

addEvent("playSyrena_s"true)
addEventHandler("playSyrena_s"getRootElement(), function()
triggerClientEvent("playSyrena_c"getRootElement())
    for 
k,v in ipairs(getElementsByType("player")) do
        if 
isObjectInACLGroup("user."..getAccountName(getPlayerAccount(v)), aclGetGroup("Straz Pozarna")) then
        outputChatBox
(" ",v)
        
outputChatBox(" ",v)
        
outputChatBox("* #FF0000Niedaleko Ciebie rozlega si? d?wi?k #14FF00SYRENY #FF0000alarmowej stra?y #006E03PO?ARNEJ, #FF0000jeste? stra?akiem Jedz do #6500FFREMIZY!*",v255255255true)
        
outputChatBox(" ",v)
        
outputChatBox(" ",v)
        
end
    end
end
)
4. Syrena pod ACL
Witam, mam skrypt na syren? OSP ale ka?dy mo?e uruchomi? t? syren?. Za pomoc piwo i respekt

addEventHandler
("playSyrena_s"resourceRoot, function(plr,seat)
if 
seat == 0 then
local accountName
=getAccountName(getPlayerAccount(plr))
if 
isObjectInACLGroup("user."..accountNameaclGetGroup("PSP")) then return end
outputChatBox
("Nie jestes pracownikiem Pa?stwowej Stra?y Po?arnej"plr25500)
cancelEvent()
return
end
end
)


[ Dodano: 2018-05-07, 06:08 ]
Dodam, ?e jest pod zapisane po stronie serwera.
5. Syrena w OSP
Witam potrzebuj? pomocy w napisaniu skryptu na syrene OSP w??czan? przez grup? ACL. Chc? by s?ysz? j? ka?dy gracz. Za pomoc standardowo :piwo: i R*
6. Syrena alarmowa i powódŒ
Witam chc? zrobi? skrypt na syrene, kt?r? b?d? s?yszelu wszyscy gracze na serwerze.((Oczywi?cie mam ju? syrene tylko niewiem co zrobi?, ?eby ona dzia?a?a na serwerze.))

I skrypt na pow?d? za pomoca daje piwko i respekty.((I chodzi oto ?eby woda si? podnosi?a prawie czubka mont chillad))

Oczywi?cie pierwszej osobie, kt?ra pomorze.
7. Syrena na przycisk nie działa
S:
marker createMarker(2419.49219, -1398.1453923.00038"cylinder"1.50255100)

function 
bind (plr)  
if (
markerthen
triggerClientEvent
("dzwiek"markergetRootElement(), plr)
end
end

addEventHandler
("onPlayerJoin"root, function()
bindKey(source"e""down"bind)
end)

C:
addEvent("dzwiek"true)
addEventHandler("dzwiek"root, function()
    
        
dzwiek playSound3D("sounds/syrena.mp3"2419.49219, -1398.1453923.00038)
        
outputChatBox("Uruchomi?e? syren? OSP!")
        
setSoundMaxDistancedzwiek100 )
        
setSoundVolume(dzwiek1)
        
triggerServerEvent("wiadomosc"localPlayer)      
end)

META:
<file src="sounds/syrena.mp3" type="client" />

Po wej?ciu do markera i wci?niejciu przycisku e nic si? nie dzieje.
8. OSP Syrena
Witam, m?g?by kto? powiedzie? jak to zrobi?, by wy?wietla?o si? outputchatbox do gracza kt?ry wejdzie w marker?

function PlayerHaveLevelosp( )
    
myPlayer getAccountName(getAccount(PlayerName)) 
    
local accName getAccountName getPlayerAccount source ) )
    if ( 
isObjectInACLGroup ("user."..accNameaclGetGroup "Admin" ) ) ) then
        triggerClientEvent
(source"ShowSyrenaPanelosp"source )
    else
        
outputChatBox("Nie Jeste? W OSP!"myPlayer)
    
end
end

triggerClientEvent
("playSoundForAllPlayers"root

addEvent"ClientHaveLevelosp"true )
addEventHandler"ClientHaveLevelosp"getRootElement(), PlayerHaveLevelosp )


Dodaje znaczniki lua//Emm
9. syrena psp
Witam chcia?bym Przerobi? Owy skrypt Aby By?a Syrena Dla PSP pod Mysqol a nie ACL i
chc? ?eby mia?a jaki? d?wi?k
x,y = guiGetScreenSize()
button = guiCreateButton(627/1440*x, 510/900*y, 209/1440*x, 123/900*y, "Uruchom Syrene", false)
guiSetProperty(button, "NormalTextColour", "FFAAAAAA")
guiSetVisible(button, false)

function drawSyrena()
dxDrawRectangle(600/1440*x, 278/900*y, 261/1440*x, 372/900*y, tocolor(0, 0, 33, 184), false)
dxDrawRectangle(590/1440*x, 265/900*y, 289/1440*x, 16/900*y, tocolor(187, 0, 0, 255), false)
dxDrawText("Syrena Strazy Po?arnej", 616/1440*x, 346/900*y, 851/1440*x, 445/900*y, tocolor(255, 255, 255, 255), 3.00, "default", "center", "center", false, false, false, false, false)
end

addEvent("showGUI", true)
addEventHandler("showGUI", getRootElement(), function()
guiSetVisible(button, true)
addEventHandler("onClientRender", getRootElement(), drawSyrena)
showCursor(true)
end)

addEventHandler("onClientGUIClick", button, function()
triggerServerEvent("playSyrena_s", getLocalPlayer())
guiSetVisible(button, false)
removeEventHandler("onClientRender", getRootElement(), drawSyrena)
showCursor(false)
end, false)

addEvent("playSyrena_c", true)
addEventHandler("playSyrena_c", getRootElement(), function()
local syrena = playSound3D("AsA.ogg", -2123.45,-12.66,46.50, true)
se...
10. Syrena PSP
Witam mam taki problem i? po za??czeniu syreny w PSP s?yszy j? tylko osoba za??czaj?ca j?:
Kod:

function syrenaOSP ()
if source == alarm2 then
local syrena = playSound3D("syrena2.mp3", -2113.81934, -24.76694, 42.65699, false)
setSoundVolume(syrena,300)
setSoundMaxDistance(syrena, 350)
outputChatBox ("Uruchomi?e? alarm w PSP.")
end
end
addEventHandler("onClientGUIClick", root, syrenaOSP)
11. Syrena OSP
Co trzeba zrobic zeby wszyscy gracze s?yszeli dziek syreny Prosze o pomoc


function syrenaOSP ()
if source == alarm then
local syrena = playSound3D("syrena.mp3", -317.2001953125, 1039.5, 25.700000762939, false)
setSoundVolume(syrena,300)
setSoundMaxDistance(syrena, 350)
outputChatBox ("Uruchomi?e? syren? alarmow? OSP.")
end
end
addEventHandler("onClientGUIClick", root, syrenaOSP)

12. Syrena w koszarach
Witam chce po??czyc plik *.mp3 ze skryptem ze po wpisaniu komendy odtwarza dzwi?k
13. Syrena PSP
Zrobi?em funkcje do gui ale jak w??cz? t? syren? to s?yszy j? tylko ten co j? uruchomi? prosi? bym o szczeg??ow? pomoc b?d? przerobienie .

function syrenaPSP () 
if 
source == alarm then
local syrena 
playSound3D("syrena.mp3", -2384.3974609375, -94.3945312542.644439697266false
setSoundVolume(syrena,300)
setSoundMaxDistance(syrena350)
outputChatBox ("Uruchomi?e? syren? alarmow? PSP.")
end 
end
addEventHandler
("onClientGUIClick"rootsyrenaPSP)
14. Syrena
Witam szukam kogo? kto zrobi?by mi skrypt a raczej przerobi? mo?na powiedzie? na syrene dok?adnie :


Kod na kt?rym dzia?a syrena poprzez start w panelu

addEventHandler'onClientResourceStart'resourceRoot,
    function( )
        
local uSound playSound3D'musica.mp3', -2361.28784, -110.7435246.00602 
        
setSoundMaxDistanceuSound100 )
    
end

Kod na kt?rym dzia?a syrena na komende:

function alarmon()
    
local sound playSound("musica.mp3",false
end
addCommandHandler
("syrena",alarmon )


A generalnie mi chodzi o to aby te syrene s?ysza? ka?dy bo w tym drugim kodzie s?yszy j? tylko ten kto wpisze /syrena a inni nie Z g?ry dzi?kuje daje browca i repke
15. syrena PSP
Witam,
postanowi?em zaj?? si? Frakcj? PSP.
Musz? zrobi? syren? kt?ra b?dzie uruchamiana z GUI, button'em oraz na ACL PSP.

Dam moje GUI:
[lua]
GUIEditor = {
button = {}
}
addEventHandler("onClientResourceStart", resourceRoot,
function()
wlacz = guiCreateButton(565, 609, 207, 92, "W??cz syrene", false)
guiSetFont(GUIEditor.button[1], "default-bold-small")
guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA")
end
)

addEventHandler("onClientRender", root,
function()
dxDrawLine(471 - 1, 342 - 1, 471 - 1, 400, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine(858, 342 - 1, 471 - 1, 342 - 1, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine(471 - 1, 400, 858, 400, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine(858, 400, 858, 342 - 1, tocolor(0, 0, 0, 255), 1, false)
dxDrawRectangle(471, 342, 387, 58, tocolor(255, 255, 255, 255), false)
dxDrawText(" Syrena PSP", 481, 340, 848, 400, tocolor(249, 0, 0, 255), 2.00, "pricedown", "left", "top", false, false, false, false, false)
dxDrawLine(497 - 1, 400 - 1, 497 - 1, 711, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine(838, 400 - 1, 497 - 1, 400 - 1, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine(497 - 1, 711, 838, 711, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine(838, 711, 838, 400 - 1, tocol...
16. Syrena
Mam takie co?:
Kod:

if(strcmp(cmdtext, "/998", true)==0){
new nazwa[256];
new str[256];
nazwa = Player(playerid);
new Float:Poz[3];

format(str, 256, "{FF7F50}~~~~ {00FFFF}Pan {FF0000}%s {00FFFF}Wzywa {FF0000}Stra? Po?arn? ! {FF7F50}~~~~", PlayerName(playerid));
SendClientMessageToAll(0x77FF77FF, str);
GetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]); //pobierasz pozycj? gracza do markera (X,y,z)
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(gTeam[i] == TEAM_SP)
{
SetPlayerCP(i, Poz[0], Poz[1], Poz[2], 10);
SendClientMessage(i, -1, "Uwaga! Uwaga! Wezwanie, przygotowa? si? do wyjazdu!");
}
}
return 1;
}


I dodatkowo po wys?aniu tekstu "Uwaga! Uwaga! Wezwanie, przygotowa? si? do wyjazdu!" chcia?bym aby lecia?a dla stra?ak?w ta syrena
http://chomikuj.pl/pawelko85/Dzwonki_Stra*c5*bc+po*c5*bcarna+_+JRG+7+Warszawa+-+Wyjazd+do+akcji!,1871015068.mp3

da rade tak?
17. syrena
Witajcie chcia?em zapyta? jak uruchomi? syrene kod:


addEventHandler 
("onClientResourceStart"resourceRoot,
function ()
outputChatBox ("Start Syrenka")
auto getPedOccupiedVehicle getLocalPlayer() )
setVehicleSirens(auto201.10.600255191.3191.3)
end)
18. Syrena
Witam serdecznie. Co jest nie tak, ?e jak w??czam pod bindem 1 syren? to zamiast w??czy? si? jedna syrena w??czaj? si? dwie. Tak samo mam jak przycisn? bind 2. W??cza si? druga jak i pierwsza. Za pomoc oczywi?cie :arrow: :piwo:

C-side:
[lua]
addEvent("onPlaySound3D",true)
addEventHandler("onPlaySound3D",root,function(veh)
for _, player in ipairs(getElementsByType("player")) do
local x,y,z = getElementPosition(veh)
snd = playSound3D ("GCBA/syrena1.mp3", x, y, z)
setSoundMaxDistance(snd, 350)
attachElements(snd,veh)
end
end
)


addEvent("onPlaySound3D",true)
addEventHandler("onPlaySound3D",root,function(auto)
for _, player in ipairs(getElementsByType("player")) do
local x,y,z = getElementPosition(auto)
cnd = playSound3D ("GCBA/syrena3.mp3", x, y, z)
setSoundMaxDistance(cnd, 350)
attachElements(cnd,auto)
end
end
)
[/lua]

S-side:
[lua]
auta = { [407] = true }

addEventHandler("onPlayerVehicleEnter", root, function(pojazd)
if auta[getElementModel(pojazd)] then
bindKey(source, "1", "down", dzwiek, source)
end
end)


function dzwiek(gracz)
local veh = getPedOccupiedVehicle(gracz)
triggerClientEvent("onPlaySound3D",root,veh)
end



addEventHandler("onPlayerVehicleEnter", root, function(pojazd)
if auta[getElementModel(...
19. Zrób to sam: Realistyczne odgłosy broni + syrena alarmowa.
Witam, dzisiaj chcia?bym pokaza? niekt?rym osobom ?eby nauczy?y si? tworzy? takie skrypty tak jak wy?ej. tjw.
Kody Client Side.

[lua]
local function playGunfireSound(weaponID)
local muzzleX, muzzleY, muzzleZ = getPedWeaponMuzzlePosition(source)
local px, py, pz = getElementPosition ( source )
if weaponID == 25 then--shotgun
local sound = playSound3D("shoot1.wav", muzzleX, muzzleY, muzzleZ, false)
setSoundMaxDistance(sound, 40)
elseif weaponID == 34 then--sniper
local sound = playSound3D("shoot.wav", muzzleX, muzzleY, muzzleZ, false)
setSoundMaxDistance(sound, 40)
elseif weaponID == 38 then--minigun
local sound = playSound3D("shoot2.wav", muzzleX, muzzleY, muzzleZ, false)
setSoundMaxDistance(sound, 40)
end
end
addEventHandler("onClientPlayerWeaponFire", root, playGunfireSound)
[/lua]

Linki:
http://freesound.org/peop...o/sounds/52593/ zmien nazwe na shoot.wav
http://freesound.org/peop...e/sounds/84254/ zmien nazwe na shoot1.wav
http://freesound.org/people/cydon/sounds/126507/ zmien nazwe na shoot2.wav


BONUS:
Link syreny alarmowej:
http://freesound.org/people/HootOwl/sounds/58927/ zmien nazwe na alarm.wav

kod:
[lua]
function alarm()
local veh = createVehicle(582,0,0,3)
local siren = local sound = playSound3D("alarm.wav", 0, 0, 3, true)
attachElements(siren,veh)
setSoundMaxDistance( siren, 20...
20. Syrena
Witam stworzy?em takie co? do mojego RPG i co? mi nie dzia?a

klient

Kod:

function syrena()
local vehicle = getPedOccupiedVehicle(player)
local model = getElementModel(vehicle)
if not (model == 416) or (model == 433) or (model == 427) or (model == 490) or (model == 528) or (model == 407) or (model == 523) or (model == 596) or (model == 597) or (model == 598) or (model == 599) or (model == 601) then
guiSetEnabled(syren,false)
else
if (model == 416) or (model == 433) or (model == 427) or (model == 490) or (model == 528) or (model == 407) or (model == 523) or (model == 596) or (model == 597) or (model == 598) or (model == 599) or (model == 601) then
guiSetEnabled(siren,true)
end
end
end
addEventHandler("onClientPlayerVehicleEnter", getLocalPlayer(),syrena)


Kod:

function sirena1()
triggerServerEvent("siren", getLocalPlayer())
end
addEventHandler("onClientGUIClick",siren,sirenon,false)


Serwer


Kod:

function serena()
local vehicle = getPedOccupiedVehicle(source)
if (getVehicleOverrideLights(vehicle) == 2) then
setVehicleSirensOn ( vehicle, 1 )
else
setVehicleSirensOn ( vehicle, 2 )
end
end
addEvent( "siren", true )
addEventHandler ( "siren", getRootElement(), serena)



Co z?e
21. [DM] Syrena Pojazdu
Witam mam ma?y problem z pewn? cmd. oto code:


[code]

enum Coords
{
SPU,
VehicleID,
Float:sX,
Float:sY,
Float:sZ,
};

new SyrenaPos[33][Coords] = {
{1, 560, 0.398071289,0.75390625,0.43879509},
{2, 560, -0.35644531250, 0.0388183593, 0.863788605},
{3, 415, 0.409729004, 0.526367188, 0.206963539},
{4, 415, -0.290039062, -0.284179688, 0.631957054},
{5, 421, 0.421691895, 0.804931641, 0.256482124},
{6, 421, -0.323303223, 0.0207519532, 0.731482506},
{7, 426, 0.575378418, 0.786132812, 0.361483574},
{8, 426, -0.455505371, -0.143066406, 0.861475945},
{9, 579, 0.454345703, 0.575683594, 0.645122528},
{10, 579, -0.442626953, -0.269042969, 1.27014542},
{11, 402, 0.53515625, 0.562988281, 0.278743744},
{12, 402, -0.412841797, -0.474365234, 0.778804779},
{13, 596, 0.53515625, 0.771728516, 0.373809814},
{14, 596, -0.0048828125, -0.860107422, 0.848770142},
{15, 597, 0.53515625, 0.771728516, 0.373809814},
{16, 597, -0.0048828125, -0.860107422, 0.848770142},
{17, 598, 0.406738281, 0.696777344, 0.398208618},
{18, 598, -0.0048828125, -0.860107422, 0.848770142},
{19, 544, 0.522338867, 2.5925293, 1.46867275},
{20, 528, 0.563842773, 0.754882812, 0.487258911},
{21, 525, -0.0089111328, 0.273193359, 1.4037838},
{22, 409, 0.420776367, 1.80236816, 0.368680954},
{23, 409, -0.439941406, 0.824829102, 0.842817307},
{24, 461, 0.00000000, -0.932861328, 0.494509697},
{25, 521, 0.00000000, -0.928955078, 0.558652878},
{26, 586, 0.00000000, -1.2...