Problem in a CMD
#4

sorry i misread this,
its hard for me when i dont use strokk

this should work,

pawn Код:
if(strcmp(cmd, "/sbm", true) == 0)
    {
        if(PlayerInfo[playerid][pAdmin] < 1339)
        {
            return SendClientMessage(playerid, COLOR_GREY," You're not authorized to use that command !");
        }
        new rtoggle, bid;
        tmp = strtok(cmdtext, idx);
        bid = strvalEx(tmp);
        tmp = strtok(cmdtext, idx);
        rtoggle = strvalEx(tmp);
        if(bid <= 0 || bid >= MAX_BUILDINGS)
        {
            return SendClientMessage(playerid, COLOR_GREY," USAGE: /sbm [buildingid] [0/1]");
        }
        if(rtoggle < 1)
        {
                BInfo[bid][buRadio] = 0;
                SendClientMessage(playerid, COLOR_GREY," You've turned off the radio in that building.");
                for(new i=0;i<MAX_PLAYERS;i++)
                {
                    if(PlayerInfo[i][InBuilding] == bid)
                    {
                        StopAudioStreamForPlayer(i);
                    }
                }
                return 1;
        }  
        if(rtoggle > 1)
        {
            return SendClientMessage(playerid, COLOR_GREY," USAGE: /sbm [buildingid] [0/1]");
        }
        ShowPlayerDialog(playerid, 7331, DIALOG_STYLE_INPUT, "Enter the URL", "Type in the link for the audio stream", "Stream it", "Cancel");
        bEditing[playerid] = bid;
        return 1;
    }
Reply


Messages In This Thread
Problem in a CMD - by -CaRRoT - 16.03.2012, 14:45
Re: Problem in a CMD - by Jonny5 - 16.03.2012, 15:36
Re: Problem in a CMD - by -CaRRoT - 16.03.2012, 16:35
Re: Problem in a CMD - by Jonny5 - 16.03.2012, 16:53

Forum Jump:


Users browsing this thread: 1 Guest(s)