16.05.2016, 08:51
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; }