- Регистрация
- 28 Фев 2017
- Сообщения
- 11
- Лучшие ответы
- 0
- Репутация
- 0
PHP:
stock InputItem(playerid, give, take, kolvo, maxk) // InputItem(playerid, pInvDrugs, pDrugs, strlen(inputtext), 1000);
{
new str[256];
if(PlayerInfo[playerid][take] < kolvo)
{
format(str, sizeof(str), "У вас нет столько наркотиков");
SCM(playerid, COLOR_LIGHTRED, str);
return Inventory(playerid);
}
if(PlayerInfo[playerid][give]+kolvo > maxk)
{
format(string, sizeof(string), "Лимит содержания этого предмета в инвентаре: %dшт. (У вас %dшт)", maxk, PlayerInfo[playerid][pDrugs]);
SCM(playerid, COLOR_LIGHTRED, string);
return Inventory(playerid);
}
PlayerInfo[playerid][give] +=kolvo;
PlayerInfo[playerid][take] -=kolvo;
UpdatePlayerDataInt(playerid, "give", PlayerInfo[playerid][give]);
UpdatePlayerDataInt(playerid, "take", PlayerInfo[playerid][take]);
SCM(playerid, COLOR_GREEN, "Вы успешно положили предмет в инвентарь!");
return Inventory(playerid);
}
stock TakeItem(playerid, give, take, kolvo, maxk) // TakeItem(playerid, pDrugs, pInvDrugs, strlen(inputtext), 1000);
{
if(PlayerInfo[playerid][take] < maxk)
{
SCM(playerid, COLOR_LIGHTRED, "В инвентаре нет такого количества.");
return Inventory(playerid);
}
if(PlayerInfo[playerid][give]+kolvo > maxk)
{
format(string, sizeof(string), "Вы можете утащить максимум: %dшт.", maxk);
SCM(playerid, COLOR_LIGHTRED, string);
return Inventory(playerid);
}
PlayerInfo[playerid][give] +=kolvo;
PlayerInfo[playerid][take] -=kolvo;
UpdatePlayerDataInt(playerid, "give", PlayerInfo[playerid][give]);
UpdatePlayerDataInt(playerid, "take", PlayerInfo[playerid][take]);
SCM(playerid, COLOR_GREEN, "Вы успешно взяли предмет с инвентаря!");
return Inventory(playerid);
}
C:\Users\ilya_\Desktop\new mods\gamemodes\jd.pwn(5670) : warning 213: tag mismatch
C:\Users\ilya_\Desktop\new mods\gamemodes\jd.pwn(5676) : warning 213: tag mismatch
C:\Users\ilya_\Desktop\new mods\gamemodes\jd.pwn(5683) : warning 213: tag mismatch
C:\Users\ilya_\Desktop\new mods\gamemodes\jd.pwn(5684) : warning 213: tag mismatch
C:\Users\ilya_\Desktop\new mods\gamemodes\jd.pwn(5685) : warning 213: tag mismatch
C:\Users\ilya_\Desktop\new mods\gamemodes\jd.pwn(5686) : warning 213: tag mismatch
C:\Users\ilya_\Desktop\new mods\gamemodes\jd.pwn(5692) : warning 213: tag mismatch
C:\Users\ilya_\Desktop\new mods\gamemodes\jd.pwn(5697) : warning 213: tag mismatch
C:\Users\ilya_\Desktop\new mods\gamemodes\jd.pwn(5703) : warning 213: tag mismatch
C:\Users\ilya_\Desktop\new mods\gamemodes\jd.pwn(5704) : warning 213: tag mismatch
C:\Users\ilya_\Desktop\new mods\gamemodes\jd.pwn(5705) : warning 213: tag mismatch
C:\Users\ilya_\Desktop\new mods\gamemodes\jd.pwn(5706) : warning 213: tag mismatch
C:\Users\ilya_\Desktop\new mods\gamemodes\jd.pwn(5676) : warning 213: tag mismatch
C:\Users\ilya_\Desktop\new mods\gamemodes\jd.pwn(5683) : warning 213: tag mismatch
C:\Users\ilya_\Desktop\new mods\gamemodes\jd.pwn(5684) : warning 213: tag mismatch
C:\Users\ilya_\Desktop\new mods\gamemodes\jd.pwn(5685) : warning 213: tag mismatch
C:\Users\ilya_\Desktop\new mods\gamemodes\jd.pwn(5686) : warning 213: tag mismatch
C:\Users\ilya_\Desktop\new mods\gamemodes\jd.pwn(5692) : warning 213: tag mismatch
C:\Users\ilya_\Desktop\new mods\gamemodes\jd.pwn(5697) : warning 213: tag mismatch
C:\Users\ilya_\Desktop\new mods\gamemodes\jd.pwn(5703) : warning 213: tag mismatch
C:\Users\ilya_\Desktop\new mods\gamemodes\jd.pwn(5704) : warning 213: tag mismatch
C:\Users\ilya_\Desktop\new mods\gamemodes\jd.pwn(5705) : warning 213: tag mismatch
C:\Users\ilya_\Desktop\new mods\gamemodes\jd.pwn(5706) : warning 213: tag mismatch