Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- stock SaveInventory(playerid)
- {
- new file[64];
- format(file, sizeof(file), "Inventory/%s.ini", GetName(playerid));// forlder Inventory
- if(fexist(UserPath(playerid));
- INI_WriteInt(file, "Slot0", InvInfo[playerid][iSlot][0]);// Set value Item in slot 0
- INI_WriteInt(file, "Slot1", InvInfo[playerid][iSlot][1]);// Set value Item in slot 1
- INI_WriteInt(file, "Slot2", InvInfo[playerid][iSlot][2]);
- INI_WriteInt(file, "Slot3", InvInfo[playerid][iSlot][3]);
- INI_WriteInt(file, "Slot4", InvInfo[playerid][iSlot][4]);
- INI_WriteInt(file, "Slot5", InvInfo[playerid][iSlot][5]);
- INI_WriteInt(file, "Slot6", InvInfo[playerid][iSlot][6]);
- INI_WriteInt(file, "Slot7", InvInfo[playerid][iSlot][7]);
- INI_WriteInt(file, "Slot8", InvInfo[playerid][iSlot][8]);
- INI_WriteInt(file, "Slot9", InvInfo[playerid][iSlot][9]);
- INI_WriteInt(file, "Slot10", InvInfo[playerid][iSlot][10]);
- INI_WriteInt(file, "Slot11", InvInfo[playerid][iSlot][11]);
- INI_WriteInt(file, "Slot12", InvInfo[playerid][iSlot][12]);
- INI_WriteInt(file, "Slot13", InvInfo[playerid][iSlot][13]);
- INI_WriteInt(file, "Slot14", InvInfo[playerid][iSlot][14]);
- INI_WriteInt(file, "Slot15", InvInfo[playerid][iSlot][15]);
- INI_WriteInt(file, "Slot16", InvInfo[playerid][iSlot][16]);
- INI_WriteInt(file, "Slot17", InvInfo[playerid][iSlot][17]);
- INI_WriteInt(file, "Slot18", InvInfo[playerid][iSlot][18]);
- INI_WriteInt(file, "Slot19", InvInfo[playerid][iSlot][19]);
- }
- stock LoadInventory(playerid)
- {
- new file[64];
- format(file, sizeof(file), "Inventory/%s.ini", GetName(playerid));
- InvInfo[playerid][iSlot][0] = INI_Int(file,"Slot0"); // Load Item in Slot 0
- InvInfo[playerid][iSlot][1] = INI_Int(file,"Slot1");// Load Item in Slot 1
- InvInfo[playerid][iSlot][2] = INI_Int(file,"Slot2");
- InvInfo[playerid][iSlot][3] = INI_Int(file,"Slot3");
- InvInfo[playerid][iSlot][4] = INI_Int(file,"Slot4");
- InvInfo[playerid][iSlot][5] = INI_Int(file,"Slot5");
- InvInfo[playerid][iSlot][6] = INI_Int(file,"Slot6");
- InvInfo[playerid][iSlot][7] = INI_Int(file,"Slot7");
- InvInfo[playerid][iSlot][8] = INI_Int(file,"Slot8");
- InvInfo[playerid][iSlot][9] = INI_Int(file,"Slot9");
- InvInfo[playerid][iSlot][10] = INI_Int(file,"Slot10");
- InvInfo[playerid][iSlot][11] = INI_Int(file,"Slot11");
- InvInfo[playerid][iSlot][12] = INI_Int(file,"Slot12");
- InvInfo[playerid][iSlot][13] = INI_Int(file,"Slot13");
- InvInfo[playerid][iSlot][14] = INI_Int(file,"Slot14");
- InvInfo[playerid][iSlot][15] = INI_Int(file,"Slot15");
- InvInfo[playerid][iSlot][16] = INI_Int(file,"Slot16");
- InvInfo[playerid][iSlot][17] = INI_Int(file,"Slot17");
- InvInfo[playerid][iSlot][18] = INI_Int(file,"Slot18");
- InvInfo[playerid][iSlot][19] = INI_Int(file,"Slot19");
- }
Advertisement
Add Comment
Please, Sign In to add comment