CMD:myfriends(playerid, params[])
{
new count = 0;
new iStr[1024] = "Friends Online:~n~";
foreach(Player, i)
{
new USER_FILE[64];
format(USER_FILE, sizeof(USER_FILE), "SFSUsers/%s.ini", GetPlayerNameEx(playerid));
if(DOF2_GetInt(USER_FILE, GetPlayerNameEx(i)) == 1)
{
strins(iStr, GetPlayerNameIns(i), strlen(iStr));
count++;
}
}
if(count == 0)
{
new Str[512];
format(Str,512,"Keiner deiner Freunde ist online.");
ShowPlayerDialog(playerid,FRIENDS,DIALOG_STYLE_MSGBOX,"Freunde",Str,"Ok","");
}
else
{
new Str[512];
new giveplayerid;
format(Str,512,"Name: %s Status: {00FF28}Online\n",GetPlayerNameEx(giveplayerid));
ShowPlayerDialog(playerid,FRIENDS,DIALOG_STYLE_LIST,"Freunde",Str,"Ok","");
}
return 1;
}
Meine Frage:
Wie schaff ich das, dass all' meine Freunde in einem Dialog gezeigt werden. Aber dann soll da halt stehen, ob dieser offline oder online ist...