All pastes #827280 Raw Edit

Unnamed

public text v1 · immutable
#827280 ·published 2007-12-21 17:39 UTC
rendered paste body
dcmd_giveallhealth(const playerid, params[])
{
    new str[256];
	new idx = 0;
	str = strtok(params, idx);
	if(!strlen(str))
	{
		SendClientMessage(playerid,GRIS, "SERVER: /giveallhealth [Health]");
		return 1;
	}
	str = strtok(params, idx);
	new salud = strval(str);
	if(Nivel[playerid] >= 4 && PLAYERLIST_authed[playerid] == 1)
	{
 		for(new i=0; i < MAX_PLAYERS; i++)
    	{
			SetPlayerHealth(i, salud);
			format(string5, sizeof(string5), "SERVER: Everyone has been given health by Admin [Health: %d]",salud);
			SendClientMessage(playerid,BLANCO, string5);
			BroadCastMessage(EchoChan,string5);
			SendMessageToAdmins(BLANCO,string5);
		}
	}
	return 1;
}