Quote:
Originally Posted by Lynn
I'm pretty sure that will still only display it as, [Gender:] 1 or [Gender:] 2.
Could be wrong :P
pawn Код:
public MyDialogStatsSystem(playerid) { if(PlayerInfo[playerid][pSex] == 1) { new String[128], Name[MAX_PLAYER_NAME], Cash = GetPlayerMoney(playerid), Score = GetPlayerScore(playerid), Age = PlayerInfo[playerid][pAge]; // String, Name, Geld, und Score angelegt. GetPlayerName(playerid,Name,sizeof Name); format(String, sizeof(String), "[Stats of %s]\n[Nickname]: %s [Level]: %d [Money]: %d [Gender]: Male [Age]: %d", Name, Name, Score, Cash, Age); // Unsere (New's) die wir oben neu angelegt haben - immer mit einem , trennen :5 ShowPlayerDialog(playerid, DIALOG_STATS, 0, "My stats", String, "Close", " "); // Цffne das Dialog fenster beim Spieler } else if(PlayerInfo[playerid][pSex] == 2) { new String[128], Name[MAX_PLAYER_NAME], Cash = GetPlayerMoney(playerid), Score = GetPlayerScore(playerid), Age = PlayerInfo[playerid][pAge]; // String, Name, Geld, und Score angelegt. GetPlayerName(playerid,Name,sizeof Name); format(String, sizeof(String), "[Stats of %s]\n[Nickname]: %s [Level]: %d [Money]: %d [Gender]: Female [Age]: %d", Name, Name, Score, Cash, Age); // Unsere (New's) die wir oben neu angelegt haben - immer mit einem , trennen :5 ShowPlayerDialog(playerid, DIALOG_STATS, 0, "My stats", String, "Close", " "); // Цffne das Dialog fenster beim Spieler } return 1; }
Not positive, but I think this should work.
Did it from memory, Haven't used Pawno in quite some time, a bit rusty.
|
BTW ignore my first post, i didnt watch it closely
and yea yours works, i prefer:
Код:
new GenderName[][32] =
{
{""},
{"Male"},
{"Female"}
};
public MyDialogStatsSystem(playerid)
{
new String[128], Name[MAX_PLAYER_NAME], Cash = GetPlayerMoney(playerid), Score = GetPlayerScore(playerid), Gender = PlayerInfo[playerid][pSex], Age = PlayerInfo[playerid][pAge]; // String, Name, Geld, und Score angelegt.
GetPlayerName(playerid,Name,sizeof Name);
format(String, sizeof(String), "[Stats of %s]\n[Nickname]: %s [Level]: %d [Money]: %d [Gender]: %s [Age]: %d", Name, Name, Score, Cash, GenderName[Gender], Age); // Unsere (New's) die wir oben neu angelegt haben - immer mit einem , trennen :5
ShowPlayerDialog(playerid, DIALOG_STATS, 0, "My stats", String, "Close", " "); // Цffne das Dialog fenster beim Spieler
return 1;
}
oh and watch the values at PlayerInfo[playerid][pSex] = 2;
male should be:
Код:
PlayerInfo[playerid][pSex] = 1;
female should be:
Код:
PlayerInfo[playerid][pSex] = 2;