Get Song Time
#1

I want hide textdraw when song finish. Is it possible?
Reply
#2

SetTimer and call TextDrawHideForPlayer function in the callback (when it finishes)
Reply
#3

Quote:
Originally Posted by Kaperstone
Посмотреть сообщение
SetTimer and call TextDrawHideForPlayer function in the callback (when it finishes)
I know these functions. I say is it possible SetTimer("hidetextdraws", SongTime, 0);
Getting song time and setting timer song time
Reply
#4

GetSongTime:
Reply
#5

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.
Reply
#6

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. ]
Reply
#7

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?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)