heal/armour all
#1

Код:
CMD:healall(playerid, params[])
{
	new str[128];
	if(pInfo[playerid][Logged] == 0) return SendClientMessage(playerid, COLOR_RED, "[Error]: You must be logged in!");
	if(pInfo[playerid][Admin] >= 4)
	{
		SendAdminCMD(playerid, "healall", 0);
	   	for(new i = 0; i < MAX_PLAYERS; i++)
  		{
			if(IsPlayerConnected(i) && (i != playerid) && (pInfo[playerid][Admin] > pInfo[i][Admin]) && InP[i] == 0 && InDM[i] == 0 && pInfo[i][Jail] == 0 && God[i][0] == 0 && God[i][1] == 0)
			{
				PlayerPlaySound(i, 1057, 0.0, 0.0, 0.0);
				SetPlayerHealth(i, 100.0);
			}
		}
		PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
		format(str, sizeof(str), "Administrator %s(%d) has healed all players!", GetName(playerid), playerid);
		SendClientMessageToAll(COLOR_YELLOW, str);
	}
	else return SendClientMessage(playerid, COLOR_RED, EACMD);
	return 1;
}
Код:
CMD:armourall(playerid, params[])
{
	new str[128];
	if(pInfo[playerid][Logged] == 0) return SendClientMessage(playerid, COLOR_RED, "[Error]: You must be logged in!");
	if(pInfo[playerid][Admin] >= 4)
	{
		SendAdminCMD(playerid, "armourall", 0);
	   	for(new i = 0; i < MAX_PLAYERS; i++)
  		{
			if(IsPlayerConnected(i) && (i != playerid) && (pInfo[playerid][Admin] > pInfo[i][Admin]) && InDM[i] == 0)
			{
				PlayerPlaySound(i, 1057, 0.0, 0.0, 0.0);
				SetPlayerArmour(i, 100.0);
			}
		}
		PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
		format(str, sizeof(str), "Administrator %s(%d) has armoured all players!", GetName(playerid), playerid);
		SendClientMessageToAll(COLOR_YELLOW, str);
	}
	else return SendClientMessage(playerid, COLOR_RED, EACMD);
	return 1;
}
It plays player a sound but doesn't heal or armour them. halp?
Reply


Messages In This Thread
heal/armour all - by Jese - 02.02.2014, 19:06
Re: heal/armour all - by GShock - 22.03.2014, 08:53
Re: heal/armour all - by MBilal - 22.03.2014, 10:29

Forum Jump:


Users browsing this thread: 1 Guest(s)