command returns 0 once again
#1

Harro zer ma ferrow SAMP-mates this command returns 0 or "Unknown command" to me. Is there any error?
Код:
GetPlayerRank(playerid)
{
	new string[128];
	for(new i = 0; i < sizeof(rInfo[]); i++)
	{
	    if(GetPlayerScore(playerid) >= rInfo[i][ScoreMin] && GetPlayerScore(playerid) < rInfo[i][ScoreMax])
	    {
	        format(string, sizeof(string), rInfo[i][Name]);
	        return string;
		}
	}
	return string;
}
CMD:ranks(playerid, params[])
{
	new string[1000];
	for(new i = 0; i < sizeof(rInfo[]); i++)
	{
 		format(string, sizeof(string), "%s (%d - %d)\n", GetPlayerRank(playerid), rInfo[i][ScoreMin], rInfo[i][ScoreMax]);
	}
	ShowPlayerDialog(playerid, d_rank, DIALOG_STYLE_MSGBOX, "Ranks", string, "OK", "");
	return 1;
}
Reply


Messages In This Thread
command returns 0 once again - by TheSimpleGuy - 16.05.2016, 08:51
Re: command returns 0 once again - by Konstantinos - 16.05.2016, 09:57
Re: command returns 0 once again - by TheSimpleGuy - 16.05.2016, 10:02

Forum Jump:


Users browsing this thread: 3 Guest(s)