17.06.2012, 06:19
Guessing that Gender 1 is Male, and Gender 2 is Female, use this:
pawn Код:
public ShowStats(playerid,targetid)
{
new string[128],pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,sizeof(pName));
if(pInfo[playerid][Gender] = 1)
{
format(string,sizeof(string),""embed_blue"%s "embed_white"stats\n"embed_blue"Age:"embed_white"$%s\n"embed_blue"Gender:"embed_white"Male\n"embed_blue"Money:"embed_white"$%d\n\
"embed_blue"Kills:"embed_white"%d\n"embed_blue"Deaths:"embed_white"%d",pName,pInfo[playerid][Age],,pInfo[playerid][pMoney],pInfo[playerid][Kills],pInfo[playerid][Deaths]);
ShowPlayerDialog(playerid,1234,DIALOG_STYLE_MSGBOX,""embed_white"Stats",string,"Done","Exit");
}
else
{
format(string,sizeof(string),""embed_blue"%s "embed_white"stats\n"embed_blue"Age:"embed_white"$%s\n"embed_blue"Gender:"embed_white"Female\n"embed_blue"Money:"embed_white"$%d\n\
"embed_blue"Kills:"embed_white"%d\n"embed_blue"Deaths:"embed_white"%d",pName,pInfo[playerid][Age],,pInfo[playerid][pMoney],pInfo[playerid][Kills],pInfo[playerid][Deaths]);
ShowPlayerDialog(playerid,1234,DIALOG_STYLE_MSGBOX,""embed_white"Stats",string,"Done","Exit");
}
return 1;
}