Pawno not responding
#5

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.

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, ">>", "");
and consider using switch instead of many if/else if statements for dialogs and listitems.
Reply


Messages In This Thread
Pawno not responding - by cielkute - 17.06.2016, 19:18
Re: Pawno not responding - by Matz - 17.06.2016, 19:19
Re: Pawno not responding - by cielkute - 17.06.2016, 19:21
Re: Pawno not responding - by Matz - 17.06.2016, 19:27
Re: Pawno not responding - by Konstantinos - 17.06.2016, 19:30
Re: Pawno not responding - by cielkute - 17.06.2016, 19:31
Re: Pawno not responding - by cielkute - 17.06.2016, 19:41
Re: Pawno not responding - by Konstantinos - 17.06.2016, 19:45
Re: Pawno not responding - by cielkute - 17.06.2016, 19:53
Re: Pawno not responding - by cielkute - 17.06.2016, 19:59

Forum Jump:


Users browsing this thread: 1 Guest(s)