4 posts in this topic

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

Спойлер

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;
    } 

 

 

Share this post


Link to post
Share on other sites

Можешь сделать для DC_CMD

Share this post


Link to post
Share on other sites

@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;
}

 

 

Share this post


Link to post
Share on other sites

@Cawfee Спасибо большое 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • YaroslavGTA
      By YaroslavGTA
      Смотрите, я прикрепил к автомобилю объект AttachObjectToVehicle, хотел бы, чтобы объект удалялся на команду через функцию DestroyObject, а именно, чтобы можно было удалить через проверку, но у меня выходят варнинги. 
      Выдает в public OnObjectMoved(objectid) error 017: undefined symbol "blue" error 017: undefined symbol "blueblue" error 017: undefined symbol "redblue в CMD добавлены  new blue new blueblue new redblue