20.01.2018, 08:02
When i try to print it just dont help me its working on SendClientMessage 2 names are shown in an dialog only one;
like this heading PlayerName Rank Status
Name Rank Status
like this heading PlayerName Rank Status
Name Rank Status
PHP код:
CMD:clanmembers(playerid)
{
new str[128], Cache:members;
new minfo[500];
mysql_format(gSQL, str, sizeof(str), "SELECT * FROM `Clan_Members` WHERE `clanid`= %d",GetPlayerClanId(playerid));
members = mysql_query(gSQL, str, true);
new count = cache_num_rows();
if(count > 0)
{
//new str1[150];
//format(str1,sizeof(str1),"Count=%d",count);
//SendClientMessage(playerid,COLOR_RED,str1);
new log,i;
new Name[150],Rank[150],Status[150];
for(i = 0; i < count; i++)
{
cache_get_value_name(i, "playername", Name);
cache_get_value_name(i, "playerclanrank", Rank);
cache_get_value_int(i, "IsOnline", log);
if(log == 0)
{
Status = "{FF0000}Offline";
}
else if(log == 1)
{
Status = "{00CC00}Online";
}
format(minfo,sizeof(minfo),"\n%s\t %s\t %s",Name,Rank,Status);
SendClientMessage(playerid, COLOR_YELLOW, minfo);
//ShowPlayerDialog(playerid, 123, DIALOG_STYLE_LIST," {FFFFFF}-{00FF00} Clan Members",minfo, "Next", "Close");
}
}
cache_delete(members);
return 1;
}