forward LoadInventory(playerid, name[], value[]);
public LoadInventory(playerid, name[], value[])
{
INI_Int("invSlot",pInventory[playerid][invSlot]);
INI_Int("invSelectedSlot", pInventory[playerid][invSelectedSlot]);
INI_Int("invSlotAmount", pInventory[playerid][invSlotAmount]);
INI_Float("invArmourStatus",pInventory[playerid][invArmourStatus]);
INI_Int("slot1", pCharacter[playerid][charSlot][0]);
INI_Int("slot2", pCharacter[playerid][charSlot][1]);
INI_Int("slot3", pCharacter[playerid][charSlot][2]);
INI_Int("slot4", pCharacter[playerid][charSlot][3]);
INI_Int("slot5", pCharacter[playerid][charSlot][4]);
INI_Int("slot6", pCharacter[playerid][charSlot][5]);
INI_Int("slot7", pCharacter[playerid][charSlot][6]);
INI_Int("charSelectedSlot", pCharacter[playerid][charSelectedSlot]);
INI_Float("charArmourStatus",pCharacter[playerid][charArmourStatus]);
INI_Int("s1",pInventory[playerid][invSlotAmount][0]);
INI_Int("s2",pInventory[playerid][invSlotAmount][1]);
INI_Int("s3",pInventory[playerid][invSlotAmount][2]);
INI_Int("s4",pInventory[playerid][invSlotAmount][3]);
INI_Int("s5",pInventory[playerid][invSlotAmount][4]);
INI_Int("s6",pInventory[playerid][invSlotAmount][5]);
INI_Int("s7",pInventory[playerid][invSlotAmount][6]);
INI_Int("s8",pInventory[playerid][invSlotAmount][7]);
INI_Int("s9",pInventory[playerid][invSlotAmount][8]);
INI_Int("s10",pInventory[playerid][invSlotAmount][9]);
INI_Int("s11",pInventory[playerid][invSlotAmount][10]);
INI_Int("s12",pInventory[playerid][invSlotAmount][11]);
INI_Int("s13",pInventory[playerid][invSlotAmount][12]);
INI_Int("s14",pInventory[playerid][invSlotAmount][13]);
INI_Int("s15",pInventory[playerid][invSlotAmount][14]);
print ("data iventory berhasil di load");
return 1;
}
new str[40];
format(str, sizeof(str), korong); // korong #define dir .ini fle on top
INI_ParseFile(str, "LoadInventory", .bExtra = true);
INI_ParseFile(str, "LoadInventory", .bExtra = true, .extra = playerid);
This might solve your problem.
PHP код:
|
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid); |
INI_ParseFile(UserPath(playerid), "LoadInventory_%s", .bExtra = true, .extra = playerid); |
INI_ParseFile(UserPath(playerid), "LoadInventory", .bExtra = true, .extra = playerid); |
INI_ParseFile(UserPath(playerid), "LoadInventory_%s", .bExtra = true, .extra = playerid);
#define korong inidir/%s.ini
#define PATH INIdir/%s.ini
#define korong "inidir/%s.ini"
// OnPlayerConnect
new str[64];
GetPlayerName(playerid, str, MAX_PLAYER_NAME);
format(str, sizeof(str), korong, str); // korong #define dir .ini fle on top
INI_ParseFile(str, "LoadInventory", .bExtra = true, .extra = playerid);
i will try .
PHP код:
Код:
#define korong inidir/%s.ini Код:
#define PATH INIdir/%s.ini |
#define korong inidir/%s.ini
format(str, sizeof(str), korong); // korong #define dir .ini fle on top
INI_ParseFile(str, "LoadInventory", .bExtra = true);