Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Função buscar no inventário todo.
- // Retorna -1 se não achou
- // Retorna o slot se achou
- // Shepher & The Rev'
- int FindInv(int clientid, int item)
- {
- MOB *player = (MOB*)GetMobFromIndex(clientid);
- int SlotA;
- int slot = -1; // -1 porque o index inicial é 0;
- for(int i = 0; i < 64; i++) // Verifica os 64 slots do inventário
- {
- SlotA = player->Inventory[i].Index;
- if(SlotA == item)
- {
- slot = i;
- break;
- }
- }
- return slot;
- }
Advertisement
Add Comment
Please, Sign In to add comment