Ich kann dir ja die ganze Funktion zeigen:
public OnPlayerRequestFriendNames(playerid, Friend_DBID, thread)
{
switch(thread)
{
case 0:
{
new rows, fields;
cache_get_data(rows, fields, MySqlConnection);
if(rows) {
#pragma unused szResult
new
szPlayerName[MAX_PLAYER_NAME],
szTitle[64],
szResult[64];
SetPVarInt(playerid, "Friend_DBID", Friend_DBID);
for(new row; row < rows; row++)
{
cache_get_field_content(row, "Name", szPlayerName, MySqlConnection, sizeof(szResult));
foreach(Player, i) {
if(Spieler[i][pDBID] == Friend_DBID){
format(szFriendList, sizeof(szFriendList), "%s\n* {6CBBE3}Name: {FFFFFF}%s | {8BA870}(online)", szFriendList, szPlayerName);
}
else {
format(szFriendList, sizeof(szFriendList), "%s\n* {6CBBE3}Name: {FFFFFF}%s | {FF0000}(offline)", szFriendList, szPlayerName);
}
}
}
format(szTitle, sizeof szTitle, "%s's Freundesliste", SpielerName(playerid));
ShowPlayerDialog(playerid, DIALOG_FRIENDLIST, DIALOG_STYLE_LIST, szTitle, szFriendList, "Select", "Cancel");
}
}
case 1:
{
}
}
}