SA-MP Forums Archive
Atext problem with Male and Female - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Atext problem with Male and Female (/showthread.php?tid=527052)



Atext problem with Male and Female - Strummer - 20.07.2014

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.


Re: Atext problem with Male and Female - Scottas - 20.07.2014

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