if and or ( || ) statement help
#1

i made 3 money pickups and instead of making 3 different if statements i decided to use the or (||) function but it made it so everything that i pickup even if its a health pickup, it it makes it a money pickup

heres the code:
Код:
if(pickupid == moneypickup1 || moneypickup2 || moneypickup3)
{
	GivePlayerMoney(playerid,20000);
	GameTextForPlayer(playerid,"Found $20000!",3000,5);
}
anyone know whats wrong?
Reply


Messages In This Thread
if and or ( || ) statement help - by StrickenKid - 08.02.2009, 03:57
Re: if and or ( || ) statement help - by Cueball - 08.02.2009, 04:39

Forum Jump:


Users browsing this thread: 1 Guest(s)