13.12.2011, 17:38
replace
by
the problem with the amount of mismatching parameter warnings, obviously indicates the ShowPlayerDialog not used properly. you need to first format a string, then you may use it there. the formatting cant be done in the functions' parameters in realtime, thats all
Код:
return ShowPlayerDialog(playerid,DIALOG_SKILLINFO,DIALOG_STYLE_MSGBOX,"%s's Stats:","Kills: [%d] | Deaths: [%d] | Ratio: [%0.2f] | Money: [$%d]\nTime: [%d] hrs [%d] mins [%d] secs","Ok","Cancel",PlayerName2(player1),AccInfo[player1][Kills], AccInfo[player1][Deaths], Float:AccInfo[player1][Kills]/Float:pDeaths,GetPlayerMoney(player1), h, m, s);
Код:
new stringtitle[64]; new string[128]; format(stringtitle,sizeof(stringtitle),"%s's Stats:",PlayerName2(player1)); format(string,sizeof(string),"Kills: [%d] | Deaths: [%d] | Ratio: [%0.2f] | Money: [$%d]\nTime: [%d] hrs [%d] mins [%d] secs",AccInfo[player1][Kills], AccInfo[player1][Deaths], Float:AccInfo[player1][Kills]/Float:pDeaths,GetPlayerMoney(player1), h, m, s); return ShowPlayerDialog(playerid,DIALOG_SKILLINFO,DIALOG_STYLE_MSGBOX,stringtitle,string,"Ok","Cancel",);
