Jump to content
  • 0

pomoc Hudba na začátku


Dave6859

Dotaz

5 odpovědí na tuto otázku

Recommended Posts

  • 2
před 17hodinami, Dave6859 said:

warning 239: literal array/string passed to a non-const parameter

Toto vidíš pravdepodobne kvôli tomu, že používaš pawn compiler od Zeexa, kde sa rieši const-correctness (https://github.com/pawn-lang/compiler/wiki/Const-Correctness), ale používaš a_samp.inc od samp teamu bez nejakých úprav. Pokojne otvor ten include, nájdi v ňom PlayAudioStreamForPlayer a pred druhý parameter (pole s url) dopíš "const".

Tento warning inak nesúvisí s problémom, že sa ti neprehráva hudba. Ako píše Hip, PlayAudioStreamForPlayer očakáva link na nejaký zvukový súbor (.mp3, .ogg, ...). Ak chceš prehrať niečo z youtube, musíš to prekonvertovať napr. na mp3, nahrať to niekam na internet a použiť link k tomuto nahranému súboru.

 

  • Líbí se mi to! (+1) 1
Link to comment
Share on other sites

  • 1
On 10. 12. 2022 at 15:45, Dave6859 said:

Když napíšu třeba PlayAudioStreamForPlayer(playerid, "https://www.youtube.com/watch?v=pNzNDjqTa_U&t=3s");           

(do OnPlayerConnect) tak mi to vyhodí tento warning: estxd.pwn(64) : warning 239: literal array/string passed to a non-const parameter

načo tam ideš dať ten url link na tuto pesničku ked táto zvučka je zabudovaná v sa-mp  "https://www.open.mp/docs/scripting/resources/sound-ids"

najdeš ju pod číslom 1185 :)  napr to spravíš takto: PlayerPlaySound(playerid, 1185, x.x, y.y, z.z);  tie pismená je pozicia hudby kde ju budeš pocut a tak :D 

 

Link to comment
Share on other sites

  • 0
  • Globální moderátor

Absolutně nechápu problém. https na http změníš odebráním "s". Ovšem musí to web podporovat. Pokud někdo podporuje https, většinou nepodporuje http. 

Link to comment
Share on other sites

  • 0
před 5hodinami, Hip said:

Absolutně nechápu problém. https na http změníš odebráním "s". Ovšem musí to web podporovat. Pokud někdo podporuje https, většinou nepodporuje http. 

Když napíšu třeba PlayAudioStreamForPlayer(playerid, "https://www.youtube.com/watch?v=pNzNDjqTa_U&t=3s");           

(do OnPlayerConnect) tak mi to vyhodí tento warning: estxd.pwn(64) : warning 239: literal array/string passed to a non-const parameter

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...