27.05.2015, 20:10
PHP код:
CMD:radiushp(playerid, params[])
{
if(!IsPlayerAdmin(playerid)) return 0;
new Float: fRadius;
if(sscanf(params, "f", fRadius)) return SendClientMessage(playerid, -1, "Syntax: /radiushp [radius]");
new Float: fPlayerPos[3];
GetPlayerPos(playerid, fPlayerPos[0], fPlayerPos[1], fPlayerPos[2]);
for(new i = 0; i <= GetPlayerPoolSize(); i++)
if(IsPlayerInRangeOfPoint(i, fRadius, fPlayerPos[0], fPlayerPos[1], fPlayerPos[2]))
SetPlayerHealth(i, 100.0);
return 1;
}