Can someone explain to me how this works...
#1

Код:
	if(strcmp(cmd,"/licenses",true)==0)
    {
        if(IsPlayerConnected(playerid))
	    {
	        new text0[20];
	        new text1[20];
	        new text2[20];
	        new text3[20];
	        new text4[20];
	        new text5[20];
			new text6[20];
	        if(PlayerInfo[playerid][pPassport]) { text0 = "Approved"; } else { text0 = "Not Approved"; }
	        if(PlayerInfo[playerid][pCarLic]) { text1 = "Passed"; } else { text1 = "Not Passed"; }
                if(PlayerInfo[playerid][pFlyLic]) { text2 = "Passed"; } else { text4 = "Not Passed"; }
		if(PlayerInfo[playerid][pBoatLic]) { text3 = "Passed"; } else { text2 = "Not Passed"; }
	        if(PlayerInfo[playerid][pFishLic]) { text4 = "Passed"; } else { text3 = "Not Passed"; }
	        if(PlayerInfo[playerid][pGunLic]) { text5 = "Passed"; } else { text5 = "Not Passed"; }
	        if(PlayerInfo[playerid][pCopLic]) { text6 = "Passed"; } else { text5 = "Not Passed"; }
	        SendClientMessage(playerid, COLOR_WHITE, "|__________________ Licenses __________________|");
			format(string, sizeof(string), "Passport: %s.", text0);
			SendClientMessage(playerid, COLOR_GREY, string);
			format(string, sizeof(string), "Drivers License: %s.", text1);
			SendClientMessage(playerid, COLOR_GREY, string);
			format(string, sizeof(string), "Flying License: %s.", text2);
			SendClientMessage(playerid, COLOR_GREY, string);
			format(string, sizeof(string), "Sailing License: %s.", text3);
			SendClientMessage(playerid, COLOR_GREY, string);
			format(string, sizeof(string), "Fishing License: %s.", text4);
			SendClientMessage(playerid, COLOR_GREY, string);
			format(string, sizeof(string), "Weapon License: %s.", text5);
			SendClientMessage(playerid, COLOR_GREY, string);
			format(string, sizeof(string), "Officer License: %s.", text6);
			SendClientMessage(playerid, COLOR_GREY, string);
			SendClientMessage(playerid, COLOR_WHITE, "|______________________________________________|");
		}
	    return 1;
 	}
I mean I get its reading it from the inifile, and if it says 0 put not passed 1 put passed, but I am very confused, because after the fish license, and goes to the gunlic, and cop license, coplicense area is blank in game, and gunlicense always returns not passed...
Reply


Messages In This Thread
Can someone explain to me how this works... - by CT_Ronnie_Deo - 16.08.2010, 22:02
Re: Can someone explain to me how this works... - by CT_Ronnie_Deo - 16.08.2010, 22:20

Forum Jump:


Users browsing this thread: 2 Guest(s)