Martin_Voitel
Умник
PHP:
if(strcmp(cmd, "/delconus", true) == 0)
{
if(!(PlayerInfo[playerid][pMember]==1||PlayerInfo[playerid][pLeader]==1))
if(!(PlayerInfo[playerid][pMember]==6||PlayerInfo[playerid][pLeader]==6))
{
SendClientMessage(playerid, COLOR_GRAD1, "Вы не коп");
return 1;
}
new Float:xA,Float:yA,Float:zA;
for(new id=0; id<MAX_CONUS; id++)
{
if(IsValidObject(conus[id]))
{
GetObjectPos(conus[id],xA,yA,zA);
if(IsPlayerInRangeOfPoint(playerid,1.2,xA,yA,zA))
{
GetPlayerName(playerid,sendername,sizeof(sendername));
DestroyObject(conus[id]);
conus[id]=-1;
totalconus-=1;
format(string, sizeof(string), "* %s убрал конус",sendername);
ProxDetector(20.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
format(string,sizeof(string), "осталось %d конусов", (MAX_CONUS-1-totalconus));
SendClientMessage(playerid,COLOR_WHITE,string);
return 1;
}
}
}
SendClientMessage(playerid, COLOR_GRAD1, "Вы не возле конуса");
return 1;
}
Последнее редактирование:
