17.06.2016, 19:30
Except the extra bracket, keep in mind that "params" is undefined symbol in OnDialogResponse. You should use "inputtext" instead if you want to retrieve data from the text given from an input style dialog.
and consider using switch instead of many if/else if statements for dialogs and listitems.
pawn Code:
new id, string[400];
// if sscanf returns failure (no input or not an id/part of player), assign "id" to "playerid" to see their own statistics
if (sscanf(inputtext, "u", id)) id = playerid;
else if (id == INVALID_PLAYER_ID) return ... // error: not player connected
format(string, sizeof(string), "Soldier %s\nScore: %d\nMoney: $%d\nKills: %d\nDeaths: %d\nRatio: %0.2f\nRank: %s\nAdmin Level: %d\nVip Level: %d\nHelper: %d", PlayerName(id), GetPlayerScore(id), GetPlayerMoney(id), PlayerInfo[id][pKills], PlayerInfo[id][pDeaths], Float: PlayerInfo[id][pKills] / Float: PlayerInfo[id][pDeaths], GetRankName(id), PlayerInfo[id][pAdmin], PlayerInfo[id][pVIP], PlayerInfo[id][pHelper]);
ShowPlayerDialog(playerid, 13, DIALOG_STYLE_MSGBOX, "informacion", string, ">>", "");