Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2015-09-30, 18:11


Pumelowsky

Amator 3D






Wiek: 23
Na forum: 4182 dni
Posty: 199
Nick w MP: Pumelowsky

Piwa: 1666

Respekt: 200,5
Respekt: 200,5Respekt: 200,5

Witam tak jak w temacie nie dzia?a mi muzyka w login panel jestem zielony w lua ale pr?buje
function startMySound()
    sound playSound"files/logo.mp3"true )
end
addEventHandler"onClientPlayerJoin"getResourceRootElementgetThisResource() ), startMySound )
 
function zatrzymajMojDzwiek()
    stopSoundsound )
end
addEventHandler "onClientRender"zatrzymajMojDzwiek )


Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-09-30, 18:18


Fanciak

BOT






Wiek: 25
Na forum: 4446 dni
Posty: 728
Nick w MP: Fanciak

Piwa: 1572

Respekt: 500
Respekt: 500

function startMySound()
    sound playSound"files/logo.mp3"true )
    setSoundVolume(sound0.6)   
end
addEventHandler"onClientPlayerJoin"localPlayerstartMySound )
 
function zatrzymajMojDzwiek()
    stopSoundsound )
end
addEventHandler "onClientRender"zatrzymajMojDzwiek )



Sprobuj

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-09-30, 18:23


#404







Wiek: 26
Na forum: 4771 dni
Posty: 1438

Piwa: 2512

Respekt: 833,5
Respekt: 833,5Respekt: 833,5

Ostrzeżeń: 60%
Cytat:



function zatrzymajMojDzwiek()
    stopSoundsound )
end
addEventHandler "onClientRender"zatrzymajMojDzwiek )



Takim czym? odrazu sobie zatrzymujesz ten d?wi?k, wi?c to troch? bezsens.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-09-30, 18:29


Pumelowsky

Amator 3D






Wiek: 23
Na forum: 4182 dni
Posty: 199
Nick w MP: Pumelowsky

Piwa: 1666

Respekt: 200,5
Respekt: 200,5Respekt: 200,5

nadal nic

[ Dodano: 2015-09-30, 18:43 ]
dobrze zrobilem ?? ??
function startMySound()
    sound playSound"logo.mp3"true )
    setSoundVolume(sound0.6)   
end
addEventHandler"onClientPlayerJoin"localPlayerstartMySound )
 
function zatrzymajMojDzwiek()
    stopSoundsound )
end
addEventHandler "onPlayerLogin"zatrzymajMojDzwiek )


Podpis
Kontakt:

- Skype: live:pumapl_2
- GG: 56865468
- Discord: Pumelowsky#1126
- PW forum
[/center]
Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-09-30, 19:02


#404







Wiek: 26
Na forum: 4771 dni
Posty: 1438

Piwa: 2512

Respekt: 833,5
Respekt: 833,5Respekt: 833,5

Ostrzeżeń: 60%
PumaPL123, onPlayerLogin jest eventem po stronie serwer'a

Je?eli chcesz zatrzyma? dzwi?k po za logowaniu osobny plik i ustawiasz jego typ na server ( ten poprzedni na client) i poprzez


Więcej informacji znajdziesz w Wikipedii MTA:

triggerClientEvent

uruchamiasz funkcje kt?ra ma zatrzyma? ten dzwi?k

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-09-30, 20:22


Pumelowsky

Amator 3D






Wiek: 23
Na forum: 4182 dni
Posty: 199
Nick w MP: Pumelowsky

Piwa: 1666

Respekt: 200,5
Respekt: 200,5Respekt: 200,5

tylko dzwiek nawet sie nie wlacza

Podpis
Kontakt:

- Skype: live:pumapl_2
- GG: 56865468
- Discord: Pumelowsky#1126
- PW forum
[/center]
Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-09-30, 20:57


#404







Wiek: 26
Na forum: 4771 dni
Posty: 1438

Piwa: 2512

Respekt: 833,5
Respekt: 833,5Respekt: 833,5

Ostrzeżeń: 60%
PumaPL123, doda?e? dzwi?k do mety ? Jakie? b??dy w db3 ? Najlepiej poka? te? zawarto?? mety.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-10-04, 11:39


Hades.

Łiiiiiiiiii






Wiek: 22
Na forum: 4700 dni
Posty: 372
Nick w MP: Hades

Piwa: 3214

Respekt: 337,8
Respekt: 337,8Respekt: 337,8Respekt: 337,8

PumaPL123,

Nie potrzeba funckji do tego wystarczy to zrobi? tak:

To wklejasz na g?rze w kodzie:
sound playSound("muza.mp3"true)


A Gdzie? na dole kodu to:
stopSound(sound)


Meta wygl?da tak:

<meta>
<script src="client.lua" type="client" />
<script src="server.lua" type="server" />
<script src="muza.mp3" type="client" />
</meta>


Na 100% powinno dzia?a?.

Podpis
Skrypty/Grafiki na zamówienie!
Kontakt: Discord R35#5507

Discord związany z pomocą: https://discord.gg/ttkQTsc
Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-10-04, 12:38


#404







Wiek: 26
Na forum: 4771 dni
Posty: 1438

Piwa: 2512

Respekt: 833,5
Respekt: 833,5Respekt: 833,5

Ostrzeżeń: 60%
Damian2511, co prosz??

Kod:


<script src="muza.mp3" type="client" />


Jak Ci takie co? dzia?a to gratuluj?, powinno by? file

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-10-04, 12:52


Pumelowsky

Amator 3D






Wiek: 23
Na forum: 4182 dni
Posty: 199
Nick w MP: Pumelowsky

Piwa: 1666

Respekt: 200,5
Respekt: 200,5Respekt: 200,5

Nie dzia?a mi :C
ale mete mam

<file src="logo.mp3"/>

Podpis
Kontakt:

- Skype: live:pumapl_2
- GG: 56865468
- Discord: Pumelowsky#1126
- PW forum
[/center]
Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-10-07, 14:43


MIKAELmta







Wiek: 24
Na forum: 3979 dni
Posty: 311

Piwa: 10617

Respekt: 355,3
Respekt: 355,3Respekt: 355,3Respekt: 355,3Respekt: 355,3

Masz mo?e t? muzyk? w jakim? folderze ?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-10-07, 15:59


Pumelowsky

Amator 3D






Wiek: 23
Na forum: 4182 dni
Posty: 199
Nick w MP: Pumelowsky

Piwa: 1666

Respekt: 200,5
Respekt: 200,5Respekt: 200,5

ta

[ Dodano: 2015-10-07, 16:00 ]
tak mam

Podpis
Kontakt:

- Skype: live:pumapl_2
- GG: 56865468
- Discord: Pumelowsky#1126
- PW forum
[/center]
Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-10-07, 16:02


#404







Wiek: 26
Na forum: 4771 dni
Posty: 1438

Piwa: 2512

Respekt: 833,5
Respekt: 833,5Respekt: 833,5

Ostrzeżeń: 60%
PumaPL123, w takim razie w playSound musisz nie tylko uwzgl?dni? nazw? pliku, ale tak?e i folder.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-10-09, 19:41


Pumelowsky

Amator 3D






Wiek: 23
Na forum: 4182 dni
Posty: 199
Nick w MP: Pumelowsky

Piwa: 1666

Respekt: 200,5
Respekt: 200,5Respekt: 200,5

nadal nic

[ Dodano: 2015-10-12, 12:05 ]
function interSound ( type )
if type == 0 then
muzyka = playSound ( "files/muzyka.mp3" )
elseif type == 1 then
stopSound ( muzyka )
end
end


function wycisz ()
if getSoundVolume ( muzyka ) <= 0 then
stopSound ( muzyka )
killTimer ( timer )
return end
volume = tonumber ( getSoundVolume ( muzyka ) )
volume = volume - 0.05
setSoundVolume ( muzyka, volume )
end

Podpis
Kontakt:

- Skype: live:pumapl_2
- GG: 56865468
- Discord: Pumelowsky#1126
- PW forum
[/center]
Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-10-13, 13:34


MIKAELmta







Wiek: 24
Na forum: 3979 dni
Posty: 311

Piwa: 10617

Respekt: 355,3
Respekt: 355,3Respekt: 355,3Respekt: 355,3Respekt: 355,3

W mecie tak?e uwzgl?dnij folder.

[ Dodano: 2015-10-13, 13:52 ]
Kod:

<meta>
<script src="client.lua" type="client" />
<script src="server.lua" type="server" />
<script src="files/muza.mp3" type="client" />
</meta>


I ten folder rzecz jasna musi by? w zasobie.. :D

Postaw piwo autorowi tego posta
 

 
Tagi: muzyka :: przy :: logowaniu
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku