09.12.2012, 11:38
I want to know how to make something say yes or no instead of 1 or 0..
Please help?
Please help?
new SomeIntger, YesOrNoString[24],string[124];; // The variable ( 1 / 0 ) and the YesOrNoString where Yes / No is stored
if(SomeIntger == 1) // If the variable is 1
{
YesOrNoString = "Yes"; // Set the YesOrNoString to Yes.
}
else if(SomeIntger == 0) // The variable is 0
{
YesOrNoString = "No"; // Set the YesOrNoString to No.
}
format(string,sizeof(string),"The answer is: %s",YesOrNoString); //We say Yes / No
new yourinteger = 1, yourstring[10];
format(yourstring, sizeof yourstring, "%s", yourinteger ? ("Yes") : ("No"));
print(yourstring); //Outputs "Yes"
pawn Код:
|
// /stats command
new
Yes_No[ 5 ],
string[ 128 ];
;
if( IsPlayerVip[ playerid ] ) format( Yes_No, 5, "Yes" );
else format( Yes_No, 5, "No" );
format( string, 128, "VIP: %s ...", Yes_No );
ShowPlayerDialog( ... ); or SendClientMessage( ... );