Владимир111333
Умник
Указал [pOtkat] = 200; вроде должно все работать, но отката нету, как исправить?
PHP:
SendClientMessage(playerid, COLOR_GRAD2, "Используй: /get drugs [кол-во]");
return 1;
}
new level = PlayerInfo[playerid][pDrugsSkill];
ammount = strval(tmp);
if(level >= 0 && level <= 50)
{ tel = 200; if(ammount < 1 || ammount > 6) { SendClientMessage(playerid, COLOR_GREY, "Вы можете покупать только от 1 до 6 грам на 1 скиле"); return 1; } }
else if(level >= 51 && level <= 100)
{ tel = 150; if(ammount < 1 || ammount > 12) { SendClientMessage(playerid, COLOR_GREY, "Вы можете покупать только от 1 до 12 грам на 2 скиле"); return 1; } }
else if(level >= 101 && level <= 200)
{ tel = 100; if(ammount < 1 || ammount > 20) { SendClientMessage(playerid, COLOR_GREY, "Вы можете покупать только от 1 до 20 грам на 3 скиле"); return 1; } }
else if(level >= 201 && level <= 400)
{ tel = 50; if(ammount < 1 || ammount > 30) { SendClientMessage(playerid, COLOR_GREY, "Вы можете покупать только от 1 до 30 грам на 4 скиле"); return 1; } }
else if(level >= 401)
{ tel = 10; if(ammount < 1 || ammount > 99) { SendClientMessage(playerid, COLOR_GREY, "Вы можете покупать только от 1 до 99 грам на 5 скиле"); return 1; } }
if (PlayerInfo[playerid][pJob] == 4 && PlayerToPoint(2.0, playerid, 323.0342,1118.5804,1083.8828))
{
price = ammount * 20;
if(PlayerInfo[playerid][pMoney] > price)
{
format(string, sizeof(string), "Вы купили %d грамм, за $%d.", ammount, price, tel);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
PlayerInfo[playerid][pMoney] -= price;
PlayerInfo[playerid][pDrugs] = ammount;
PlayerInfo[playerid][pOtkat] = 200;
}
else
{
SendClientMessage(playerid, COLOR_GREY, "У вас нехватает денег.");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Вы не наркодилер или Вы находитесь не в наркопритоне.");
return 1;
}
}
