HELP - Members Faction Online -
Steveproxy5 - 03.08.2014
#define DIALOG_FACOD 565
#define DIALOG_ONDUTY 566
//UNDER ONDIALOGRESPONSIVE
Код:
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", "");
}
}
}
//UNDER ONPLAYERCOMMANDTEXT
Код:
if(strcmp(cmd, "/fazioni", true) == 0)
{
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Select a Faction", "Police \nMedic", "Ok", "Cancel");
return 1;
}
(27211) : warning 202: number of arguments does not match definition: format(str, sizeof(str), "%s\n",GetPlayerName(i));
(27225) : warning 202: number of arguments does not match definition: format(str, sizeof(str), "%s\n",GetPlayerName(i));
Re: HELP - Members Faction Online -
David (Sabljak) - 03.08.2014
Код:
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",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",GePlayertName(i));
}
}
}
ShowPlayerDialog(playerid, DIALOG_ONDUTY, DIALOG_STYLE_MSGBOX, "Medics on duty", str, "Ok", "");
}
}
}
now will work...
Re: HELP - Members Faction Online -
Steveproxy5 - 03.08.2014
I tried so
Код:
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(playerid) && PlayerInfo[playerid][pFaction] == 1)
{
if(GetPVarInt(i, "OnDuty") == 1)
{
format(str, sizeof(str), "%s \n", GetPlayerName(i));
}
}
}
ShowPlayerDialog(playerid, DIALOG_ONDUTY, DIALOG_STYLE_MSGBOX, "Police on duty", str, "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",GetPlayerName(i));
}
}
}
ShowPlayerDialog(playerid, DIALOG_ONDUTY, DIALOG_STYLE_MSGBOX, "Medics on duty", str, "Ok", "");
}
}
}
but it doesn't work
Re: HELP - Members Faction Online -
David (Sabljak) - 03.08.2014
Dialog is empty? Screenshot it
Re: HELP - Members Faction Online -
SlimDkhili - 03.08.2014
PHP код:
new name[128];
GetPlayerName(i ,name, sizeof(name));
Rep +