if(strcmp(cmdtext, "/radar", true)==0 || strcmp(cmdtext, "/rd", true)==0)
{
if (PlayerInfo[playerid][pMember] != 2 && PlayerInfo[playerid][pLeader] != 2&&PlayerInfo[playerid][pMember] != 1 && PlayerInfo[playerid][pLeader] !=1) return SendClientMessage(playerid, COLOR_GREY, "(( Вы не коп ))");
if (PlayerInfo[playerid][pRadar] != 0) return SendClientMessage(playerid, COLOR_GREY, " Вы можете поставить только один радар. Используйте /rdb чтобы убрать радар. ");
if (Radartimer != 0) return SendClientMessage(playerid, COLOR_GREY, " Пожалуйста подождите... ");
new Float:X, Float:Y, Float:Z, Float:A;
GetPlayerPos(playerid, X, Y, Z);
GetPlayerFacingAngle(playerid, A);
new plname[256];
GetPlayerName(playerid,plname,sizeof(plname));
PlayerInfo[playerid][pRadar] = CreateObject(2600, X, Y, Z-0.3, 0.0, 0.0, A+180);
PlayerInfo[playerid][pRadarText] = Create3DTextLabel(plname,0xFF0000FF,X, Y, Z,5.0,0,1);
SetPlayerPos(playerid, X, Y, Z+4);
GameTextForPlayer(playerid, "~w~џA‚PA„ѓEм…• ~r~YCЏAмOB‡Eм‘", 5000, 5);
SendClientMessage(playerid, COLOR_GREEN, " Радар установлены. Используйте /rdb чтобы убрать Радар. ");
GetPlayerName(playerid, sendername, sizeof(sendername));
Radartimer = 1;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pMember] == 2 || PlayerInfo[i][pLeader] == 2||PlayerInfo[i][pMember] == 1 || PlayerInfo[i][pLeader] == 1)
{
SetPlayerCheckpoint(playerid, X, Y, Z-10, 1.0);
SendClientMessage(i, TEAM_BLUE_COLOR, string);
if (PlayerInfo[i][pRank] >= 5 && (PlayerInfo[i][pMember]==2 || PlayerInfo[i][pLeader] == 2|| PlayerInfo[i][pMember]==1 || PlayerInfo[i][pLeader] == 1))
{
SendClientMessage(i, COLOR_YELLOW, " Вы можете убрать все Радары (/rdball)");
}
}
}
}
SetTimer("ResetRadarTimer", 60000, false);
return 1;
}
if(strcmp(cmdtext, "/rdb", true)==0)
{
if (PlayerInfo[playerid][pMember] != 1 && PlayerInfo[playerid][pLeader] != 1&&PlayerInfo[playerid][pMember] != 2 && PlayerInfo[playerid][pLeader] != 2)
{
SendClientMessage(playerid, COLOR_GREY, " Вы не коп ");
return 1;
}
if (PlayerInfo[playerid][pRank] < 5)
{
SendClientMessage(playerid, COLOR_GREY, " Вам нужен 5 ранк ");
return 1;
}
if (PlayerInfo[playerid][pRadar] == 0)
{
SendClientMessage(playerid, COLOR_GREY, " Радаров не найдено ");
return 1;
}
RemoveRadar(playerid);
SendClientMessage(playerid, COLOR_GREEN, " Радар убран.. ");
return 1;
}
if(strcmp(cmdtext, "/rdball", true)==0)
{
if (PlayerInfo[playerid][pRank] >= 5 && (PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2||PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1))
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(PlayerInfo[i][pRadar] != 0)
{
RemoveRadar(i);
}
}
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), " HQ: %s Приказывает всем убрать загреждения.", sendername);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pMember] == 2 || PlayerInfo[i][pLeader] == 2||PlayerInfo[i][pMember] == 1 || PlayerInfo[i][pLeader] == 1)
{
SendClientMessage(i, TEAM_BLUE_COLOR, string);
}
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Вам нужен 5 ранк для использования этой команды ");
}
return 1;
}