if(PlayerInfo[playerid][pLicenseA] == 1 || PlayerInfo[playerid][pLicenseB] == 1 || PlayerInfo[playerid][pLicenseC] == 1) { SendClientMessage(playerid, COLOR_WHITE, "Flying License: yes | Boat License: yes | Driver License: yes"); } if(PlayerInfo[playerid][pLicenseA] == 0 || PlayerInfo[playerid][pLicenseB] == 0 || PlayerInfo[playerid][pLicenseC] == 0) { SendClientMessage(playerid, COLOR_WHITE, "Flying License: no | Boat License: no | Driver License: no"); } if(PlayerInfo[playerid][pLicenseA] == 0 || PlayerInfo[playerid][pLicenseB] == 1 || PlayerInfo[playerid][pLicenseC] == 0) { SendClientMessage(playerid, COLOR_WHITE, "Flying License: no | Boat License: yes | Driver License: no"); } if(PlayerInfo[playerid][pLicenseA] == 1 || PlayerInfo[playerid][pLicenseB] == 0 || PlayerInfo[playerid][pLicenseC] == 0) { SendClientMessage(playerid, COLOR_WHITE, "Flying License: yes | Boat License: no | Driver License: no"); } if(PlayerInfo[playerid][pLicenseA] == 0 || PlayerInfo[playerid][pLicenseB] == 0 || PlayerInfo[playerid][pLicenseC] == 1) { SendClientMessage(playerid, COLOR_WHITE, "Flying License: no | Boat License: no | Driver License: yes"); }
Originally Posted by » RyDeR «
All things you made there can you do in only 3 script lines.. Why so difficult?
Use format method and define 0 as NO and 1 as YES. |
new
lic_str[ 3 ][ 5 ],
output[ 94 ];
if(PlayerInfo[playerid][pLicenseA]) lic_str[0] = "Yes"; else lic_str[0] = "No";
if(PlayerInfo[playerid][pLicenseB]) lic_str[1] = "Yes"; else lic_str[1] = "No";
if(PlayerInfo[playerid][pLicenseC]) lic_str[2] = "Yes"; else lic_str[2] = "No";
format(output, sizeof(output), "Flying License: %s | Boat License: %s | Driver License: %s", lic_str[0], lic_str[1], lic_str[2]);
SendClientMessage(playerid, COLOR_WHITE, output);
new NoOrYes[2][]={"No","Yes"}; new String[128]; format(String, sizeof(String), "Flying License: %s | Boat License: %s | Driver License: %s", NoOrYes[PlayerInfo[playerid][pLicenseA]], NoOrYes[PlayerInfo[playerid][pLicenseB]], NoOrYes[PlayerInfo[playerid][pLicenseC]]);