11.07.2012, 09:44
Well I did this to test:
But when I pop tire 0 it says I popped 0 AND 2.
EDIT: Ah, managed to fix it with 0b prefix:
Thank you, Kar <3
pawn Код:
if(Tires & 1000) SendClientMessage(playerid, -1, "Tire 0 popped.");
if(Tires & 0100) SendClientMessage(playerid, -1, "Tire 1 popped.");
if(Tires & 0010) SendClientMessage(playerid, -1, "Tire 2 popped.");
if(Tires & 0001) SendClientMessage(playerid, -1, "Tire 3 popped.");
EDIT: Ah, managed to fix it with 0b prefix:
pawn Код:
if(Tires & 0b1000) SendClientMessage(playerid, -1, "FL tire popped.");
if(Tires & 0b0100) SendClientMessage(playerid, -1, "BL tire popped.");
if(Tires & 0b0010) SendClientMessage(playerid, -1, "FR tire popped.");
if(Tires & 0b0001) SendClientMessage(playerid, -1, "BR tire popped.");