Guest User

pawno crashing on this stocks

a guest
Oct 18th, 2015
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 2.67 KB | None | 0 0
  1. stock SaveInventory(playerid)
  2. {
  3.     new file[64];
  4.     format(file, sizeof(file), "Inventory/%s.ini", GetName(playerid));// forlder Inventory
  5.     if(fexist(UserPath(playerid));
  6.     INI_WriteInt(file, "Slot0", InvInfo[playerid][iSlot][0]);// Set value Item in slot 0
  7.     INI_WriteInt(file, "Slot1", InvInfo[playerid][iSlot][1]);// Set value Item in slot 1
  8.     INI_WriteInt(file, "Slot2", InvInfo[playerid][iSlot][2]);
  9.     INI_WriteInt(file, "Slot3", InvInfo[playerid][iSlot][3]);
  10.     INI_WriteInt(file, "Slot4", InvInfo[playerid][iSlot][4]);
  11.     INI_WriteInt(file, "Slot5", InvInfo[playerid][iSlot][5]);
  12.     INI_WriteInt(file, "Slot6", InvInfo[playerid][iSlot][6]);
  13.     INI_WriteInt(file, "Slot7", InvInfo[playerid][iSlot][7]);
  14.     INI_WriteInt(file, "Slot8", InvInfo[playerid][iSlot][8]);
  15.     INI_WriteInt(file, "Slot9", InvInfo[playerid][iSlot][9]);
  16.     INI_WriteInt(file, "Slot10", InvInfo[playerid][iSlot][10]);
  17.     INI_WriteInt(file, "Slot11", InvInfo[playerid][iSlot][11]);
  18.     INI_WriteInt(file, "Slot12", InvInfo[playerid][iSlot][12]);
  19.     INI_WriteInt(file, "Slot13", InvInfo[playerid][iSlot][13]);
  20.     INI_WriteInt(file, "Slot14", InvInfo[playerid][iSlot][14]);
  21.     INI_WriteInt(file, "Slot15", InvInfo[playerid][iSlot][15]);
  22.     INI_WriteInt(file, "Slot16", InvInfo[playerid][iSlot][16]);
  23.     INI_WriteInt(file, "Slot17", InvInfo[playerid][iSlot][17]);
  24.     INI_WriteInt(file, "Slot18", InvInfo[playerid][iSlot][18]);
  25.     INI_WriteInt(file, "Slot19", InvInfo[playerid][iSlot][19]);
  26. }
  27. stock LoadInventory(playerid)
  28. {
  29.     new file[64];
  30.     format(file, sizeof(file), "Inventory/%s.ini", GetName(playerid));
  31.     InvInfo[playerid][iSlot][0] = INI_Int(file,"Slot0"); // Load Item in Slot 0
  32.     InvInfo[playerid][iSlot][1] = INI_Int(file,"Slot1");// Load Item in Slot 1
  33.     InvInfo[playerid][iSlot][2] = INI_Int(file,"Slot2");
  34.     InvInfo[playerid][iSlot][3] = INI_Int(file,"Slot3");
  35.     InvInfo[playerid][iSlot][4] = INI_Int(file,"Slot4");
  36.     InvInfo[playerid][iSlot][5] = INI_Int(file,"Slot5");
  37.     InvInfo[playerid][iSlot][6] = INI_Int(file,"Slot6");
  38.     InvInfo[playerid][iSlot][7] = INI_Int(file,"Slot7");
  39.     InvInfo[playerid][iSlot][8] = INI_Int(file,"Slot8");
  40.     InvInfo[playerid][iSlot][9] = INI_Int(file,"Slot9");
  41.     InvInfo[playerid][iSlot][10] = INI_Int(file,"Slot10");
  42.     InvInfo[playerid][iSlot][11] = INI_Int(file,"Slot11");
  43.     InvInfo[playerid][iSlot][12] = INI_Int(file,"Slot12");
  44.     InvInfo[playerid][iSlot][13] = INI_Int(file,"Slot13");
  45.     InvInfo[playerid][iSlot][14] = INI_Int(file,"Slot14");
  46.     InvInfo[playerid][iSlot][15] = INI_Int(file,"Slot15");
  47.     InvInfo[playerid][iSlot][16] = INI_Int(file,"Slot16");
  48.     InvInfo[playerid][iSlot][17] = INI_Int(file,"Slot17");
  49.     InvInfo[playerid][iSlot][18] = INI_Int(file,"Slot18");
  50.     InvInfo[playerid][iSlot][19] = INI_Int(file,"Slot19");
  51. }
Advertisement
Add Comment
Please, Sign In to add comment