Скрипты и моды для CRMP
Вы хотите отреагировать на этот пост ? Создайте аккаунт всего в несколько кликов или войдите на форум.

Полезные команды :)

Перейти вниз

Полезные команды :) Empty Полезные команды :)

Сообщение  Rush Пн Мар 02, 2015 1:23 pm

Всем привет.

Вот нашел несколько полезных команд для Вашего сервера, прошу прощения, если это уже было.
Эти команды в особенности могут пригодиться при проведении мероприятий и пр.

Команда: Изъять оружие в заданном радиусе.

Код:
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;
    } 

Автор: Неизвестен
Rush
Rush

Сообщения : 201
Репутация : 46
Дата регистрации : 2012-12-10
Возраст : 26
Откуда : Россия

https://gs-games.forum2x2.com

Вернуться к началу Перейти вниз

Вернуться к началу

- Похожие темы

 
Права доступа к этому форуму:
Вы не можете отвечать на сообщения