Problem in a CMD
#1

Well.. As you see in this Command..

PHP код:
    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;
        }
        
tmp = strtok(cmdtext, idx);
        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;
    } 
-------- /sbm [ID] 0 Works Fine , But when i type /sbm id 1 it should show me a dialog , but it just keep showing me the USAGE not the dialog - Any help would be appreciated and rep+ - Thanks
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)