What to add
#1

So heres the code.
I know what's the problem here, PlayerInfo's value used in integers, but i don't know how to use it so it can be used with dini_Get or dini_Set.
PHP Code:
stock LoadInventory(playerid)
{
    new 
file[200], name[MAX_PLAYER_NAME];
    
GetPlayerName(playeridnamesizeof(name));
    
format(filesizeof(file), "Inventory/%s.sav"name);
    
PlayerInfo[playerid][Slot[0]] = dini_Get(file"Slot0");
    
PlayerInfo[playerid][Slot[1]] = dini_Get(file"Slot1");
    
PlayerInfo[playerid][Slot[2]] = dini_Get(file"Slot2");
    
PlayerInfo[playerid][Slot[3]] = dini_Get(file"Slot3");
    
PlayerInfo[playerid][Slot[4]] = dini_Get(file"Slot4");
    
PlayerInfo[playerid][Slot[5]] = dini_Get(file"Slot5");
    
PlayerInfo[playerid][Slot[6]] = dini_Get(file"Slot6");
    
PlayerInfo[playerid][Slot[7]] = dini_Get(file"Slot7");
    
PlayerInfo[playerid][Slot[8]] = dini_Get(file"Slot8");
    
PlayerInfo[playerid][Slot[9]] = dini_Get(file"Slot9");
    
PlayerInfo[playerid][Slot[10]] = dini_Get(file"Slot10");
    return 
1;

Reply


Messages In This Thread
What to add - by Ebisu - 23.07.2017, 15:48
Re: What to add - by CodeStyle175 - 23.07.2017, 16:29
Re: What to add - by Ebisu - 23.07.2017, 16:45
Re: What to add - by Ebisu - 24.07.2017, 09:30
Re: What to add - by Xeon™ - 24.07.2017, 09:33
Re: What to add - by skuller12 - 24.07.2017, 09:34
Re: What to add - by Ebisu - 24.07.2017, 10:14
Re: What to add - by Xeon™ - 24.07.2017, 10:47
Re: What to add - by Ebisu - 24.07.2017, 10:50

Forum Jump:


Users browsing this thread: 2 Guest(s)