15.07.2017, 20:57
I do not know exactly what the problem is, but seeing all sorts of lessons, I think the problem in check
All code written with 0
Code:
RemoveItem is with include j_inventory
but the function itself looks like this:
The lesson should be checking
But my code is located in public OnDialogResponse
What to do?
All code written with 0
Code:
Код:
if(!strcmp(inputtext[0],"Пицца",true)) { RemoveItem(playerid,"Пицца",1); SendClientMessage(playerid, COLOR_WHITE, "Вы выкинули пиццу!"); }
but the function itself looks like this:
Код:
stock RemoveItem(playerid,ItemName[],Amount) { for(new item;item<MAX_ITEMS;item++) { if(!_GetItemAmountPVar(playerid,item))continue; if(!strcmp(_GetItemNamePVar(playerid,item),ItemName,true)) { _SetItemAmountPVar(playerid,item,_GetItemAmountPVar(playerid,item)-Amount); if(_GetItemAmountPVar(playerid,item)<=0)_SetItemAmountPVar(playerid,item,0); if(_GetItemAmountPVar(playerid,item)>MAX_ITEM_STACK) { _SetItemAmountPVar(playerid,item,MAX_ITEM_STACK); return 2; } return 1; } } return 0; }
Код:
if(!strcmp(ItemName,"Пицца",true))
What to do?