Cookies
#3

Код:
new cookies[MAX_PLAYERS];
Код:
CMD:eatcookies(playerid,params[])
{
	if(cookies[playerid] > 0)
	{
		new Float:Health;
		SetPlayerHealth(playerid,GetPlayerHealth(playerid,Health)+15); // added 15 health if you eat cookies
		cookies[playerid] =-1; // deducted the coockies when u eat
		SendClientMessage(playerid,-1,"You eat cookies!");
	}
	else SendClientMessage(playerid,-1,"ERROR: You don't have coockies!"); // Message will be showed if you don't have cookies
	return 1;
}
Just try the code
Reply


Messages In This Thread
Cookies - by Chanty420 - 24.05.2018, 03:03
Re: Cookies - by Sithis - 24.05.2018, 05:09
Re: Cookies - by dwp12345 - 24.05.2018, 06:02
Re: Cookies - by TadePoleMG - 24.05.2018, 06:19

Forum Jump:


Users browsing this thread: 1 Guest(s)