Atext problem with Male and Female
#1

So, basically, when I type my /stats command IG, it comes out like: Gender: 770.

And I was sure I handled it with my atext. Basically, the Gender is in the enums an all that, and in Define I have:

Код:
#define MALE 1
#define FEMALE 2
And my stats looks like this.

Код:
CMD:stats(playerid,params[])
{

	new atext[20];
 	if(PlayerInfo[playerid][pSex] == 1) { atext = "Musko"; }
 	else if(PlayerInfo[playerid][pSex] == 2) { atext = "Zensko"; }

    new string[128], PlayerName[24];
    GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
    SendClientMessage(playerid, COLOR_LIGHTBLUE, "_________________________________STATISTIKA_________________________________");
    format(string, sizeof(string), "Ime i prezime: %s | Spol: %i | Novac: %i | Banka: %i | PayDay: %i | Respekti: %i | Level: %i |",PlayerName,atext,PlayerInfo[playerid][pCash], PlayerInfo[playerid][BankWealth], PlayerInfo[playerid][pPaytime],PlayerInfo[playerid][pRespekti],GetPlayerScore(playerid));
    SendClientMessage(playerid, COLOR_GREY, string);
    return 1;
}
And yet, it shows Spol (Gender): as 770.
Reply
#2

instead of
pawn Код:
Spol: %i
put:
pawn Код:
Spol: %s
because it's string, not integer
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)