zdravo želio sam da napravim neku komandicu koja mi prikazuje spol i josh neke stvari... Ali kada kucam tu komandu ona mi printa id spola kako da napravim da mi printa ime spola?
evo koda koji koristim u komandi:
format(string, sizeof(string), " Spol: %d", PlayerInfo[pSex]);
SendClientMessage(giveplayerid, COLOR_PURPLE, string);
a ovo imam u gm-u
new atext[20];
if(PlayerInfo[targetid][pSex] == 1) { atext = "musko"; }
else if(PlayerInfo[targetid][pSex] == 2) { atext = "zensko"; }
if(strcmp(cmd, "/nekakomanda", true) == 0)
{
if(IsPlayerConnected(playerid))
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
new Spol;
if(PlayerInfo[i][pSex] == 1)
{
Spol = "Musko";
}
else if(PlayerInfo[i][pSex] == 2)
{
Spol = "Zensko";
}
format(string, sizeof(string), " Spol: %s", Spol);
SendClientMessage(playerid, COLOR_PURPLE, string);
}
}
}