I need help with one thing. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: I need help with one thing. (
/showthread.php?tid=234808)
Food System Trouble -
MetalScript - 04.03.2011
........... [Finished]
Re: I need help with one thing. -
MetalScript - 04.03.2011
Bump...
Re: I need help with one thing. -
HyperZ - 04.03.2011
Try this with foreach. You need this INC:
Foreach
pawn Код:
public Foodstuff()
{
foreach (Player, i)
{
if(PlayerInfo[i][pFood] > 0)
{
PlayerInfo[i][pFood] -= 1;
return 1;
}
else
{
new Float:health;
GetPlayerHealth(i,health)
SetPlayerHealth(i, health-6);
SendClientMessage(i, TEAM_CYAN_COLOR, "Sa paistad nдljane, miks mitte minna ja otsida midagi sььa?");
return 1;
}
}
return 1;
}