Which option to use?
#1

These are just examples.

Option 1:

Код:
new ObjectFood[] = { 10, 2000, 400, 200 };


IsFoodObjectPlayer(playerid)
{
	for(new i = 0; i < 4; i++)
	{
	    if(VarPlayerFood == ObjectFood[i]) return 1;
	}
	return 0;
}
Option 2:

Код:
IsFoodObjectPlayer(playerid, VarPlayerFood)
{
	switch(VarPlayerFood)
	{
		case 10, 2000, 400, 200: { return 1; }
	}
	return 0;
}
Reply


Messages In This Thread
Which option to use? - by darkHero - 12.11.2018, 20:51
Re: Which option to use? - by khRamin78 - 12.11.2018, 21:01
Re: Which option to use? - by CJ101 - 12.11.2018, 21:30
Re: Which option to use? - by Gammix - 12.11.2018, 22:20
Re: Which option to use? - by Nero_3D - 12.11.2018, 23:06

Forum Jump:


Users browsing this thread: 1 Guest(s)