Help me Please![REP+]
#1

i trying to add number before player's name
example:

1)someone || XP: 69

Код:
COMMAND:topxp(playerid, params[])
{
	new p_top[24],score,string[600],row[600];

	mysql_query("SELECT playerName, playerXP FROM playerdata ORDER BY playerXP DESC Limit 25");
	mysql_store_result();

	while( mysql_fetch_row(row) ) {
		sscanf(row, "p<|>s[600]d",p_top,score);
		format(string, sizeof string, "%s {FFFFFF} %s {FF0000}||{00D5FF} XP: %d\n", string, p_top,score);
	}

	mysql_free_result();
	ShowPlayerDialog(playerid, 108, DIALOG_STYLE_MSGBOX,"Top Players", string, "Close", "");
	return 1;
}
Reply
#2

try:
PHP код:
COMMAND:topxp(playeridparams[])
{
    new 
p_top[24],score,string[600],row[600];
    
mysql_query("SELECT playerName, playerXP FROM playerdata ORDER BY playerXP DESC Limit 25");
    
mysql_store_result();
    while( 
mysql_fetch_row(row) ) {
        
sscanf(row"p<|>ds[600]",score,p_top);
        
format(stringsizeof string"%s {00D5FF}XP: %d {FF0000}|| {FFFFFF} %s\n"stringscore,p_top);
    }
    
mysql_free_result();
    
ShowPlayerDialog(playerid108DIALOG_STYLE_MSGBOX,"Top Players"string"Close""");
    return 
1;

Reply
#3

bump,someone please?
Reply
#4

PHP код:
COMMAND:topxp(playeridparams[])
{
    new 
p_top[24],score,string[600],row[600];
    
mysql_query("SELECT playerName, playerXP FROM playerdata ORDER BY playerXP DESC Limit 25");
    
mysql_store_result();
    while( 
mysql_fetch_row(row) ) {
        
sscanf(row"p<|>s[600]d",p_top,score);
        
format(stringsizeof string"%s {FFFFFF}XP: %d{FF0000}||{00D5FF} %s \n"stringscore,p_top);
    }
    
mysql_free_result();
    
ShowPlayerDialog(playerid108DIALOG_STYLE_MSGBOX,"Top Players"string"Close""");
    return 
1;

try this
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)