Пробуй вот так.
В код sell вставляй это.
Code
drugskg[playerid] = 0;
Выглядеть должно вот так ...
Code
if(strcmp(cmd, "/sellmac", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (!IsAnFarm(playerid))
{
SendClientMessage(playerid,COLOR_GREY,"Вы не наркофермер!");
return 1;
}
if(PlayerToPoint(5.0, playerid, -1058.386108, -1195.627197, 129.188858))
{
if (storagefarm >= 50000)
{
SendClientMessage(playerid, COLOR_GREY, "На ферме больше нет места для хранения!");
DisablePlayerCheckpoint(playerid);
return 1;
}
new newcar = GetPlayerVehicleID(playerid);
if(newcar == 472)
{
combine = combine1;
}
else if(newcar == 473)
{
combine = combine2;
}
//new farm = 50000 - storagefarm;
DisablePlayerCheckpoint(playerid);
new sellprice = (100)*(combine); // Цена на продажу
format(string, sizeof(string), "Вы продали %d за %d$!", combine, sellprice);
SendClientMessage(playerid, COLOR_GREY, string);
GivePlayerMoney(playerid, (100)*(combine));
storagefarm += combine;
drugskg[playerid] -= combine; // Устанавливаем значение 0 в наркоту или хз чего там омг...
combine = 0;
if (newcar == 472)
{
combine1 = combine;
}
else if (newcar == 473)
{
combine2 = combine;
}
SaveFarmer();
}
}}