Help me please... -
Код:
switch(dialogid)
{
case DIALOG_FACOD:
{
if(!response) return 0;
new str[128];
if(listitem == 0)
{
for(new i=0;i<MAX_PLAYERS;i++)
{
if(IsPlayerConnected(id) && PlayerInfo[playerid][pFaction] == 1)
{
if(GetPVarInt(i, "OnDuty") == 1)
{
format(str, sizeof(str), "%s\n",str,GetPlayerName(i));
}
}
}
ShowPlayerDialog(playerid, DIALOG_ONDUTY, DIALOG_STYLE_MSGBOX, "Police on duty", string, "Ok", "");
}
else if(listitem == 1)
{
for(new i=0;i<MAX_PLAYERS;i++)
{
if(PlayerInfo[playerid][pFaction] == 2)
{
if(GetPVarInt(i, "OnDuty") == 1)
{
format(str, sizeof(str), "%s\n",str,GePlayertName(i));
}
}
}
ShowPlayerDialog(playerid, DIALOG_ONDUTY, DIALOG_STYLE_MSGBOX, "Medics on duty", str, "Ok", "");
}
}
}
Код:
if(strcmp(cmd, "/fazioni", true) == 0)
{
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Select a Faction", "Police \nMedic", "Ok", "Cancel");
return 1;
}
Re: Help me please... -