/eatcookies - 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: /eatcookies (
/showthread.php?tid=256341)
/eatcookies -
Paul.eboy - 20.05.2011
Hey there.
I have a command called /eatcookies.
how can I block it that way, when the player reaches 100 to life, not to be able to eat cookies anymore?
like" your health is now 100! can't eat cookies any more"
the code:
Code edited.
Re: /eatcookies -
LetsOWN[PL] - 20.05.2011
pawn Код:
if( Health == 100 ) // or if( Health = 100)
{
SendClientMessage( playerid, COLOR_RED, "You've 100 HP, so you can not eat cookies!!!");
return 1;
}
Of cours you can put this instead this above:
pawn Код:
CMD:eatcookies(playerid, params[])
{
new Float:Health;
GetPlayerHealth(playerid, Health);
if( Health > 90.0 )
return SendClientMessage(playerid, RED, "Your health is more than 90. You can't eat cookies, you'll be too fat !");
if( Health = 100.0)
SendClientMessage(playerid, RED, "You've 100 HP, so you can not eat cookies");
//.. rest of the script
~LetsOWN