Get Song Time - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Get Song Time (
/showthread.php?tid=642435)
Get Song Time -
srvr07 - 30.09.2017
I want hide textdraw when song finish. Is it possible?
Re: Get Song Time -
Kaperstone - 30.09.2017
SetTimer and call
TextDrawHideForPlayer function in the callback (when it finishes)
Re: Get Song Time -
srvr07 - 30.09.2017
Quote:
Originally Posted by Kaperstone
|
I know these functions. I say is it possible SetTimer("hidetextdraws", SongTime, 0);
Getting song time and setting timer song time
Re: Get Song Time -
AbyssMorgan - 30.09.2017
GetSongTime:
Re: Get Song Time -
Kaperstone - 30.09.2017
Quote:
Originally Posted by srvr07
I know these functions. I say is it possible SetTimer("hidetextdraws", SongTime, 0);
Getting song time and setting timer song time
|
There isn't a callback for that, nor a way to get information about the song unfortunately.
There are only play and stop.
You can do this with the audio plugin
https://sampforum.blast.hk/showthread.php?tid=82162
but it will require all players to download the client.
Re: Get Song Time -
jlalt - 30.09.2017
You can make a php api which gets song length by its stream link and return it then get the data by samp http function and set timer by the returned interval.
Or maybe creating CPP plugin which gets song interval by its stream link.
[ keep in mind samp timers not accurate will need to use timer fixes. ]
Re: Get Song Time -
srvr07 - 03.10.2017
Quote:
Originally Posted by Kaperstone
There isn't a callback for that, nor a way to get information about the song unfortunately.
There are only play and stop.
You can do this with the audio plugin
https://sampforum.blast.hk/showthread.php?tid=82162
but it will require all players to download the client.
|
I looked at this but I didn't understand how I get song time. If you know can you help me?