14.11.2016, 19:26
Hello, I'm having troubles with a simple expression. I have this:
PlayerInfo[playerid][pJob] is equal to 1 and PlayerInfo[playerid][pJob2] is equal to 2 and I'm reciving the error message. Anyone knows why? || is OR, [Job] is 1 so it's false but Job2 is 2 so it's true.
I've made a command to check it:
And returns:
Код:
if (GetVehicleModel(vehicleid) == 574) { if(PlayerInfo[playerid][pJob] != 2 || PlayerInfo[playerid][pJob2] != 2) { SendClientMessage(playerid, -1, "{40D3FF}You are not working as Sweeper!"); SetTimerEx("unfreeze", 200, false, "i", playerid); } else { SendClientMessage(playerid, -1, "{40D3FF}You are working as Sweeper!"); }
I've made a command to check it:
Код:
CMD:j2(playerid, params[]) { new str[240]; format(str, sizeof(str), "job 2: %d", PlayerInfo[playerid][pJob2]); SendClientMessage(playerid, -1, str); return 1; }
Код:
job 2: 2