SA-MP Forums Archive
Need help with audio stream - 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: Need help with audio stream (/showthread.php?tid=417297)



Need help with audio stream - McFellow - 20.02.2013

Hello,
I'm trying to make a command when a player types /play [station] it will play the station but it isn't working (I don't got pawno errors or warnings)
pawn Код:
CMD:play(playerid, params[])
{
    SendClientMessage(playerid, COLOR_WHITE, "Syntax: /play [station]");
    SendClientMessage(playerid, COLOR_GREY, "Stations: SlamFM");

    if(strcmp("SlamFM", true) == 0)
    {
        PlayAudioStreamForPlayer(playerid, "http://www.true.nl/streams/slamfmlivestream.pls");
        return 1;
    }
    return 1;
}



Re: Need help with audio stream - batonsa - 20.02.2013

either make it completely zcmd or completely strcmp


Re: Need help with audio stream - ryansheilds - 20.02.2013

pawn Код:
CMD:play(playerid, params[])
{
    SendClientMessage(playerid, COLOR_WHITE, "Syntax: /play [station]");
    SendClientMessage(playerid, COLOR_GREY, "Stations: SlamFM");

    if(strcmp(params, "SlamFM", true) == 0)
    {
        PlayAudioStreamForPlayer(playerid, "http://www.true.nl/streams/slamfmlivestream.pls");
        return 1;
    }
    return 1;
}
Should work.