Getting tire damage states
#8

Well I did this to test:

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.");
But when I pop tire 0 it says I popped 0 AND 2.

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.");
Thank you, Kar <3
Reply


Messages In This Thread
Getting tire damage states - by MP2 - 11.07.2012, 08:46
Re: Getting tire damage states - by Vince - 11.07.2012, 09:08
Re: Getting tire damage states - by MP2 - 11.07.2012, 09:25
Re: Getting tire damage states - by clarencecuzz - 11.07.2012, 09:30
Re: Getting tire damage states - by MP2 - 11.07.2012, 09:31
Re: Getting tire damage states - by Kar - 11.07.2012, 09:40
Re: Getting tire damage states - by clarencecuzz - 11.07.2012, 09:43
Re: Getting tire damage states - by MP2 - 11.07.2012, 09:44
Re: Getting tire damage states - by Vince - 11.07.2012, 09:47
Re: Getting tire damage states - by MP2 - 11.07.2012, 09:53

Forum Jump:


Users browsing this thread: 1 Guest(s)