top10
#1

hey guys i did this command but it saying only my hours and my name but i have 10 account's in my `players` from db

Код HTML:
CMD:top10(playerid, params[])
{
    if(gLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_ERROR, "Tu nu esti logat si nu poti sa folosesti aceasta comanda!");
    if(IsPlayerConnected(playerid))
	{
	    for(new i = 0; i < MAX_PLAYERS; i++)
	    {
			if(PlayerInfo[i][pHoursPlayed] >= 1)
			{
			    new sendername[30], string2[1000], coordsstring[1000];
				GetPlayerName(playerid, sendername, sizeof(sendername));
				
		        format(coordsstring, sizeof(coordsstring), "Nume\tOre jucate\n", sendername, PlayerInfo[playerid][pHoursPlayed]);
		    	strcat(string2, coordsstring);
		    	format(coordsstring, sizeof(coordsstring), "%s\t%d\n", sendername, PlayerInfo[playerid][pHoursPlayed]);
		    	strcat(string2, coordsstring);
		    	
			    ShowPlayerDialog(playerid, 1341345, DIALOG_STYLE_TABLIST_HEADERS, "Top 10 jucatori activi", string2, "Iesi", "");
            }
		}
	}
    return 1;
}
and if i take out

Код HTML:
if(IsPlayerConnected(playerid))
it still wont work

how can i see the account's from `players` table not only for connected players instead of

Код HTML:
if(IsPlayerConnected(playerid))
what should i put ?
Reply


Messages In This Thread
top10 - by StR_MaRy - 19.09.2016, 18:41
Re: top10 - by oMa37 - 19.09.2016, 19:31
Re: top10 - by Kaliber - 19.09.2016, 19:44
Re: top10 - by StR_MaRy - 19.09.2016, 19:46
Re: top10 - by Kaliber - 19.09.2016, 20:07
Re: top10 - by StR_MaRy - 19.09.2016, 20:10
Re: top10 - by Kaliber - 19.09.2016, 20:11
Re: top10 - by StR_MaRy - 19.09.2016, 20:12
Re: top10 - by Kaliber - 19.09.2016, 20:14
Re: top10 - by StR_MaRy - 19.09.2016, 20:17

Forum Jump:


Users browsing this thread: 5 Guest(s)