Need help with audio stream
#1

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;
}
Reply
#2

either make it completely zcmd or completely strcmp
Reply
#3

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


Forum Jump:


Users browsing this thread: 1 Guest(s)