mrusso228
Дебютант
Данная команда дает возможность администраторам продавать бизнесы в гос стоимость
Данная команда полезна для администраторов выше 4 уровня. Поставь > + <
PHP:
else if(strcmp(cmd, "/asellbiz", true) == 0){
new playername[MAX_PLAYER_NAME],string[256];
GetPlayerName(playerid, playername, sizeof(playername));
if(IsPlayerConnected(playerid)){
GetPlayerName(playerid, playername, sizeof(playername));
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_GRAD1, "/asellbiz [bizid]");
new biz = strval(tmp);
if (PlayerInfo[playerid][pAdmin] >= 7){
format(string, sizeof(string), "/accounts/%s.ini",BizzInfo[biz][bOwner]);
new File = ini_openFile(string);
ini_setInteger(File,"Bizz",255);
ini_closeFile(File);
BizzInfo[biz][bLocked] = 1;
BizzInfo[biz][bOwned] = 0;
strmid(BizzInfo[biz][bOwner], "The State", 0, strlen("The State"), 255);
strmid(BizzInfo[biz][bExtortion], "No-one", 0, strlen("No-one"), 255);
format(string, sizeof(string), "Бизнес продан!");
SendClientMessage(playerid, COLOR_GRAD1,string);
format(string, sizeof(string), "{FFFF00}%s\n{66CC00}Продаётся\nЦена: {FFCD00}%d$",BizzInfo[biz][bMessage],BizzInfo[biz][bBuyPrice]);
Update3DTextLabelText(BizzInfo[biz][bLabel], 0x5f9ea0AA, string);
OnPropUpdate();
new str[256];
format(str, 256," * Admin %s sell house, Bizz ID: %d", playername, biz);
return true;}else{SendClientMessage(playerid, COLOR_WHITE,"Нет прав");}}return true;}
