3 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

Your content will need to be approved by a moderator

Guest
You are commenting as a guest. If you have an account, please sign in.
Reply to this topic...

×   You have pasted content with formatting.   Remove formatting

  Only 75 emoticons maximum are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

Loading...
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • sweet
      By sweet
      Хелп,при компиле выдает ошибку C:\Users\PC\Desktop\pawno\pawno\include\objects.inc(1104) : error 029: invalid expression, assumed zero
      Сама строка в которой ошибка:    {-2032.7073,-73.8643,35.2484, -2006.3911,-52.6238,35.2704},
      Закройте тему,проблема решилась сама по себе