Код
if(strcmp(cmd, "/uvalhouse", true) == 0) //сама команда. Можете заменить на свою
{
if(PlayerInfo[playerid][pAdmin] >= 6) // уровень администрации, замените на свой.
{
for(new house = 0; house < sizeof(HouseInfo); house++)
{
HouseInfo[house][hHel] = 0;
HouseInfo[house][hArm] = 0;
HouseInfo[house][hHealthx] = 0;
HouseInfo[house][hHealthy] = 0;
HouseInfo[house][hHealthz] = 0;
HouseInfo[house][hArmourx] = 0;
HouseInfo[house][hArmoury] = 0;
HouseInfo[house][hArmourz] = 0;
HouseInfo[house][hLock] = 1;
HouseInfo[house][hOwned] = 0;
HouseInfo[house][hVec] = 479;
HouseInfo[house][hVcol1] = -1;
HouseInfo[house][hVcol2] = -1;
HouseInfo[house][hValue] = 2000000;
HouseInfo[house][hTakings] = 0;
HouseInfo[house][hLevel] = 5;
strmid(HouseInfo[house][hOwner], "The State", 0, strlen("The State"), 255);
strmid(HouseInfo[house][hDiscription], "-", 0, strlen("-"), 255);
DestroyMapIcon(house);
DestroyPickup(housepickup[house]);
housepickup[house] = CreatePickup(1273, 20, HouseInfo[house][hEntrancex], HouseInfo[house][hEntrancey], HouseInfo[house][hEntrancez],0);
CreateMapIcon(31,COLOR_LIGHTRED,HouseInfo[house][hEntrancex], HouseInfo[house][hEntrancey], HouseInfo[house][hEntrancez]);
}
OnPropUpdate();
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "* Вы не администратор"); // сообщение выводимое игроку, если он не администратор
}
return 1;
}