Advertisement
Guest User

Untitled

a guest
Oct 17th, 2015
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. stock RemoveItemFromInventory(playerid, itemid, ammount)
  2. {
  3. for(new i = 0; i < MAX_INVENTORY_SLOTS; i ++)
  4. {
  5. if(InventorySystem[playerid][i][ItemAmmount] > ammount)
  6. {
  7. if(InventorySystem[playerid][i][ItemID] == itemid)
  8. {
  9. //InventorySystem[playerid][i][ItemID] = 0;
  10. InventorySystem[playerid][i][ItemAmmount] -= ammount;
  11. }
  12. }
  13. else{
  14. InventorySystem[playerid][i][ItemID] = 0;
  15. InventorySystem[playerid][i][ItemAmmount] = 0;
  16. }
  17. }
  18. return 1;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement