new
pID[MAX_PLAYERS],
pName[MAX_PLAYER_NAME],
str[128],
count;
#define ADMINOK 5555
#define PM 5556
CMD:adminok(playerid)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(IsPlayerLAdmin(playerid))
{
GetPlayerName(i,pName,sizeof(pName));
format(str,sizeof(str),\"%s%s\\n\", str, pName);
pID;
count++;
}
}
}
if(count == 0){
ShowPlayerDialog(playerid,ADMINOK,DIALOG_STYLE_MSGBOX,\"Online Adminok\",\"Nincs online adminisztrátor!\",\"PM\",\"Kilépés\");
}
ShowPlayerDialog(playerid,ADMINOK,DIALOG_STYLE_LIST,\"Online Adminok\",str,\"PM\",\"Kilépés\");
format(str, sizeof str, \"\");
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == ADMINOK)
{
if(response)
{
ShowPlayerDialog(playerid,PM,DIALOG_STYLE_INPUT,\"Privát üzenet\",\"Írd be a kívánt üzenetet és továbítsuk az adminnak\",\"Küld\",\"Kilépés\");
}
}
if(dialogid == PM)
{
if(response)
{
GetPlayerName(playerid,pName,sizeof(pName));
format(str,sizeof(str),\"%s Üzenete: %s\",pName,inputtext);
SendClientMessage(pID[listitem],-1,str);
}
}
return 1;
}