CMD:stats(playerid,params[])
{
new kills = pInfo[playerid][Kills],deaths = pInfo[playerid][Deaths],alevel = pInfo[playerid][Adminlevel],vlevel = pInfo[playerid][VIPlevel],score = pInfo[playerid][Scores],cash = pInfo[playerid][Money],string1[124],string2[500];
format(string1,sizeof(string1),"%s stats",GetName(playerid));
format(string2,sizeof(string2),"Kills: %d \t\t\t\t\tDeaths: %d\nAdmin level: %d \t\t\tVIP level: %d\nMoney: $%d \t\t\t\tScore: %d",kills,deaths,alevel,vlevel,score,cash);
ShowPlayerDialog(playerid,DIALOG_STATS,DIALOG_STYLE_MSGBOX,string1,string2,"Close","");
return 1;
}
CMD:stats(playerid,params[])
{
new kills = pInfo[playerid][Kills], deaths = pInfo[playerid][Deaths], alevel = pInfo[playerid][Adminlevel], vlevel = pInfo[playerid][VIPlevel], score = pInfo[playerid][Scores], cash = pInfo[playerid][Money], string1[124], string2[500];
format(string1,sizeof(string1),"%s stats",GetName(playerid));
format(string2,sizeof(string2),"Kills: %d \t\t\t\t\tDeaths: %d\nAdmin level: %d \t\t\tVIP level: %d\nMoney: $%d \t\t\t\tScore: %d",kills,deaths,alevel,vlevel, cash, score);
ShowPlayerDialog(playerid,DIALOG_STATS,DIALOG_STYLE_MSGBOX,string1,string2,"Close","");
return 1;
}
CMD:stats(playerid,params[])
{
new kills = pInfo[playerid][Kills], deaths = pInfo[playerid][Deaths], alevel = pInfo[playerid][Adminlevel], vlevel = pInfo[playerid][VIPlevel], score = pInfo[playerid][Scores], cash = pInfo[playerid][Money], string[126];
format(string,sizeof(string),"%s stats",GetName(playerid));
format(string,sizeof(string),"Kills: %d \t\t\t\t\tDeaths: %d\nAdmin level: %d \t\t\tVIP level: %d\nMoney: $%d \t\t\t\tScore: %d",kills,deaths,alevel,vlevel, cash, score);
ShowPlayerDialog(playerid,DIALOG_STATS,DIALOG_STYLE_MSGBOX, string,"Close","");
return 1;
}
This:
pawn Код:
|
pInfo[playerid][Kills]
Try using the whole pdata instead of the new. I used whole code and it worked.
pawn Код:
|