dialog
#3

Quote:
Originally Posted by Mencent
View Post
PHP Code:
new query[254],i[254],name[MAX_PLAYER_NAME],nr[128],string2[512];
format(query,sizeof(query),"SELECT * FROM `drgbaze` WHERE `VardasD` = '%s'",GetPlayerNameEx(playerid));
mysql_query(query);
mysql_store_result();
if(
mysql_num_rows() != 0)
{
    
format(string2,sizeof(string2),"{82171f}[+] {ffffff}new friend/number add");
    while(
mysql_fetch_row_format(query,"|"))
    {
        
FriendsData[playerid][TotalFriends] ++;
        
mysql_fetch_field_row(i,"Fvardas"); format(name,sizeof(name),i);
        
mysql_fetch_field_row(i,"numeris"); format(nr,sizeof(nr),i);
        if(
IsPlayerOnline(name))
        {
            
format(name,sizeof(name),"{ffc38c}%s\t{ffffff}%s\t{5c8141}on\n",name,nr);
            
strcat(string2,name);
        }
        else
        {
            
format(name,sizeof(name),"%s %s- off\n"name);
            
strcat(string2,name);
        }
    }
    
ShowPlayerDialog(playerid9999DIALOG_STYLE_TABLIST_HEADERS"Test"string2"Select""");

Is this what you want?

___________________________
The problem with the 10 friends:
You have to count your friends, and if the player click on "[+] new friend/number add" you have to check if the variable with the count is 10 or over 10. Sorry, but my english isn't very well. I hope you know what I mean.
and your code:

No , i need if i add second player or more it show but not create again and again new friend/number add
Reply


Messages In This Thread
dialog - by Karolukas123 - 02.02.2016, 12:36
Re: dialog - by Mencent - 02.02.2016, 12:47
Re: dialog - by Karolukas123 - 02.02.2016, 12:55
Re: dialog - by Karolukas123 - 02.02.2016, 17:42
Re: dialog - by Karolukas123 - 02.02.2016, 22:48
Re: dialog - by Karolukas123 - 04.02.2016, 11:57

Forum Jump:


Users browsing this thread: 1 Guest(s)