PlayerInfo[playerid][pFeo] = 1 text: Si
PlayerInfo[playerid][pFeo] = 0 text: No
PlayerInfo[playerid][pFeo] = 2 text: Poco
// Es decir, cada numero de la variable, al mostrarla en un mensaje o algo, salga el texto que yo quiera segun el numero, ya lo habia visto una ves, pero no me acuerdo como se hace :c
format(string2, sizeof(string2), "Feo: %s /*Aca en el %s debe salir "Si" o "No" o segъn el numero que de la variable de pFeo un texto diferente (Los que yo quiera por numero xd)*/",PlayerInfo[playerid][pFeo]);
ShowPlayerDialog(playerid, DIALOGO, DIALOG_STYLE_MSGBOX,string1, string2, "Cerrar", "");
new text[128]
switch(PlayerInfo[playerid][pFeo])
{
case 0: text = "No";
case 1: text = "Si";
case 2: text = "Poco";
}
format(string2, sizeof(string2), "Feo: %s",text);
pawn Код:
|
new variable[][128] =
{
"No", //0
"Si", //1
"Poco" //2
//...
};
format(string2, sizeof(string2), "Feo: %s",variable[PlayerInfo[playerid][pFeo]]);
format(string2, sizeof(string2), "Feo: %s", (PlayerInfo[playerid][pFeo] == 2) ? ("Poco") : ((PlayerInfo[playerid][pFeo] == 1) ? ("Si") : ((PlayerInfo[playerid][pFeo] == 0) ? ("No") : ("No se sabe."))));
ShowPlayerDialog(playerid, DIALOGO, DIALOG_STYLE_MSGBOX,string1, string2, "Cerrar", "");