16.03.2012, 14:45
Well.. As you see in this Command..
-------- /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
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;
}