Make PlayAudioStreamForPlayer start at x time? -
mati233 - 29.05.2012
Hi guys,
I'm working in a little script that plays mp3 files from my host on my samp server, and I would like to know, if there's any way to make the music start at time 1:00 for example, and not at 0:00.
I'm using PlayAudioStreamForPlayer, I hope someone can help me with this.
Thanks
Re: Make PlayAudioStreamForPlayer start at x time? -
iGetty - 29.05.2012
Have you got a time system in your script mate?
Re: Make PlayAudioStreamForPlayer start at x time? -
mati233 - 29.05.2012
Yes I do have a time system, how can that help me mate?
Re: Make PlayAudioStreamForPlayer start at x time? -
iGetty - 29.05.2012
Well; do you have "UpdateTime" or a timer for updating the clock?
Also; variables?
It's so then I can get it to check the time it's calling.
Re: Make PlayAudioStreamForPlayer start at x time? -
mati233 - 29.05.2012
I have a variable with the time that the music should start already defined, I just need to make it start at that time.
Re: Make PlayAudioStreamForPlayer start at x time? -
iGetty - 29.05.2012
I mean, have you got a time system in your script already that shows in a textdraw/gametext?
EG: 00:00, 00:01... continuing.
Like; have you got
pawn Код:
new hour, minute, second;
or something?
Re: Make PlayAudioStreamForPlayer start at x time? -
mati233 - 29.05.2012
Yes, I do have that as well, how can that helps me?
Re: Make PlayAudioStreamForPlayer start at x time? -
iGetty - 29.05.2012
Can you post all code what includes them variables here in [pawn] tags so I can take a look and see if it can be implemented through that.
Thanks.
Re: Make PlayAudioStreamForPlayer start at x time? -
mati233 - 29.05.2012
I'm just using that to give paycheck at minute=0 and second=0, onplayerupdate, I'm sure if you can give me a tip I'll be able to implement it
Re: Make PlayAudioStreamForPlayer start at x time? -
iGetty - 29.05.2012
Well; use this in that area
pawn Код:
if(hour == 12 && minute == 30)
{
//the code
}
This will set it to play at 12:30 in game time.