18.02.2016, 18:30
i have problem again , always problem hahahaha.
i create load file ini . this my code
im try use timer not work , "data iventory berhasil di load" not show on console . then im use this metode
onplayerconnect
but still cannot load file. any one can help me ??
i create load file ini . this my code
PHP код:
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;
}
onplayerconnect
PHP код:
new str[40];
format(str, sizeof(str), korong); // korong #define dir .ini fle on top
INI_ParseFile(str, "LoadInventory", .bExtra = true);