# mike
Умник
Не работает /hpall дает хп потом отнимает...
PHP:
if(strcmp(cmd,"/hpall",true)==0)
{
if(PlayerInfo[playerid][pAdmin] >=3)
{
tmp = strtok(cmdtext,idx);
if(!strlen(tmp)) return SendClientMessage(playerid,COLOR_WHITE,"{22ff00}» {bbbbbb}Введите{FFFFFF}: /hpall [Радиус]");
new Float:pos = floatstr(tmp),Float:player_x,Float:player_y,Float:player_z;
for(new players=0; players < MAX_PLAYERS; players++)
{
GetPlayerPos(players,player_x,player_y,player_z);
if(IsPlayerInRangeOfPoint(playerid,pos,player_x,player_y,player_z))
{
SetPlayerHealth(players, 100.0);
SendClientMessage(players, COLOR_YELLOW,"Администратор установил вам здоровье(100hp)");
}
}
format(string, sizeof(string), "Вы раздали HP игрокам в установленном радиусе.");
SendClientMessage(playerid, COLOR_YELLOW, string);
}
return true;
