PlayAudioStreamForPlayer
#1

I tried to make a code wich you can write in a custom URL for a internet radio station. It seems like I cant use strings nor integers to get it working, all I get is an error in Pawno.
Heres my test code.
pawn Код:
CMD:radio(playerid, params[])
{
   new station;
   if(sscanf(params,"s",station)) return SendClientMessage(playerid,0xFF0000,"Hmm...");
   else
   {
      PlayAudioStreamForPlayer(playerid,station);
   }
   return 1;
}
Reply
#2

pawn Код:
CMD:radio(playerid, params[])
{
    new station[128];
    if(sscanf(params,"s[128]",station)) return SendClientMessage(playerid,0xFF0000,"Hmm...");
    else
    {
        PlayAudioStreamForPlayer(playerid, station);
    }
    return 1;
}
This works fine for me.
Reply
#3

I don't know how to play a radio station on samp but the input must definately be a url
Reply
#4

Why would you need to use sscanf() params is already a string lol.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)