В теме 4 сообщения

Великий Гуру

Эти команды в особенности могут пригодиться при проведении мероприятий и пр.

Спойлер

if(strcmp(cmd,"/atw",true)==0)
    {
        if(PlayerInfo[playerid][pAdmin] >=3)
        {
            tmp = strtok(cmdtext,idx);
            if(!strlen(tmp)) return SendClientMessage(playerid,COLOR_WHITE,"Введите: /atw [радиус]");
            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))
                    {
                        ResetPlayerWeapons(players);
                        SendClientMessage(players, COLOR_YELLOW,"Администратор изъял Ваше оружие.");
                    }
                }
                format(string, sizeof(string), "Вы изъяли оружие у игроков в установленном радиусе.");
            SendClientMessage(playerid, COLOR_YELLOW, string);
        }
        return 1;
    } 

 

Спойлер

if(strcmp(cmd,"/ahp",true)==0)
    {
        if(PlayerInfo[playerid][pAdmin] >=3)
        {
            tmp = strtok(cmdtext,idx);
            if(!strlen(tmp)) return SendClientMessage(playerid,COLOR_WHITE,"{}Введите: /ahp [радиус]");
            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), "Вы установили полное здоровье игрокам в установленном радиусе.");
            SendClientMessage(playerid, COLOR_YELLOW, string);
        }
        return 1;
    }

 

Спойлер

if(strcmp(cmd,"/agg",true)==0)
    {
        if(PlayerInfo[playerid][pAdmin] >=3)
        {
            tmp = strtok(cmdtext,idx);
            if(!strlen(tmp)) return SendClientMessage(playerid,COLOR_WHITE,"Используйте: /agg [радиус]");
            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))
                    {
                ServerGivePlayerWeapons(players, 24, 999);
                ServerGivePlayerWeapons(players, 25, 999);
                ServerGivePlayerWeapons(players, 29, 999);
                ServerGivePlayerWeapons(players, 31, 999);
                        SendClientMessage(players, COLOR_YELLOW,"Администратор выдал Вам оружие.");
                    }
                }
                format(string, sizeof(string), "Вы раздали оружие игрокам в установленном радиусе.");
            SendClientMessage(playerid, COLOR_YELLOW, string);
        }
        return 1;
    } 

 

 

Поделиться сообщением


Ссылка на сообщение
Поделиться на другие сайты
Cawfee
Великий Гуру

@Banana,

 

Спойлер

CMD:atw(playerid, params[]) {
	if (PlayerInfo[playerid][pAdmin] < 3) return 1;
	
	new Float:radius;
	if (sscanf(params, "f", radius)) return  SendClientMessage(playerid,COLOR_WHITE,"Введите: /atw [радиус]");
	
	new 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, radius, player_x, player_y, player_z))
		{
			ResetPlayerWeapons(players);
			SendClientMessage(players, COLOR_YELLOW,"Администратор изъял Ваше оружие.");
		}
	}
	
	format(string, sizeof(string), "Вы изъяли оружие у игроков в установленном радиусе.");
	SendClientMessage(playerid, COLOR_YELLOW, string);
	return 1;
}

 

 

Спойлер

CMD:ahp(playerid, params[]) {
	if (PlayerInfo[playerid][pAdmin] < 3) return 1;
	
	new Float:radius;
	if (sscanf(params, "f", radius)) return SendClientMessage(playerid,COLOR_WHITE,"{}Введите: /ahp [радиус]");
	
	new 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, radius, player_x, player_y, player_z))
		{
			SetPlayerHealth(players, 100.0);
			SendClientMessage(players, COLOR_YELLOW,"Администратор установил Вам здоровье(100hp)");
		}
	}
	
	format(string, sizeof(string), "Вы установили полное здоровье игрокам в установленном радиусе.");
	SendClientMessage(playerid, COLOR_YELLOW, string);
	return 1;
}

 

 

Спойлер

CMD:agg(playerid, params[]) {
	if (PlayerInfo[playerid][pAdmin] < 3) return 1;
	
	new Float:radius;
	if (sscanf(params, "f", radius)) return SendClientMessage(playerid,COLOR_WHITE,"Используйте: /agg [радиус]");
	
	for(new players = 0; players < MAX_PLAYERS; players++)
	{
		GetPlayerPos(players, player_x, player_y, player_z);
		if(IsPlayerInRangeOfPoint(playerid, radius, player_x, player_y, player_z))
		{
			ServerGivePlayerWeapons(players, 24, 999);
			ServerGivePlayerWeapons(players, 25, 999);
			ServerGivePlayerWeapons(players, 29, 999);
			ServerGivePlayerWeapons(players, 31, 999);
			SendClientMessage(players, COLOR_YELLOW,"Администратор выдал Вам оружие.");
		}
	}
	format(string, sizeof(string), "Вы раздали оружие игрокам в установленном радиусе.");
	SendClientMessage(playerid, COLOR_YELLOW, string);
	return 1;
}

 

 

Поделиться сообщением


Ссылка на сообщение
Поделиться на другие сайты

Для публикации сообщений создайте учётную запись или авторизуйтесь

Вы должны быть пользователем, чтобы оставить комментарий

Создать учетную запись

Зарегистрируйте новую учётную запись в нашем сообществе. Это очень просто!


Регистрация нового пользователя

Войти

Уже есть аккаунт? Войти в систему.


Войти

  • Последние посетители   0 пользователей онлайн

    Ни одного зарегистрированного пользователя не просматривает данную страницу

  • Похожий контент

    • От dante34538
      ищу гейм мод самп рп, который не был в пабликах, по цене до 3000р, писать в вк https://vk.com/screamzmorrow
    • От DonK/Key
      Всем привет, помогите кто разбирается, так как я можно сказать начинающий сделать свой КРМП, буду благодарен. Напишите либо тут либо @evreI_sigma (Мой Telegram)