17.06.2012, 09:29
pawn Код:
public ShowStats(playerid,targetid)
{
new string[250],pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,sizeof(pName));
format(string,sizeof(string),""embed_blue"%s "embed_white"stats\n\
"embed_blue"Age:"embed_white"%d\n\
"embed_blue"Gender:"embed_white"%s\n\
"embed_blue"Test:"embed_white"%s\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],
GetPlayerGender(playerid),
pInfo[playerid][test],
GetPlayerMoney(playerid),
pInfo[playerid][Kills],
pInfo[playerid][Deaths]);
ShowPlayerDialog(playerid,1234,DIALOG_STYLE_MSGBOX,""embed_white"Stats",string,"Ok","");
return 1;
}
stock GetPlayerGender(playerid)
{
new file[100],Name[MAX_PLAYER_NAME]; GetPlayerName(playerid,Name,MAX_PLAYER_NAME);
format(file,sizeof(file),PlayerFile,Name);
if(strcmp(dini_Get(file,"Gender"),"Male") == 1)
{
pInfo[playerid][Gender] = Male;
}
else if(strcmp(dini_Get(file,"Gender"),"Female") == 2)
{
pInfo[playerid][Gender] = Female;
}
return 1;
}