02.06.2016, 17:52
PHP код:
for(new i; i < sizeof Inventory; i++)
{
new file[30];
INI_Int(fmat(file, "Item%d", i), pVar[playerid][inv_itemid][i]);
INI_Int(fmat(file, "Ammount%d", i), pVar[playerid][inv_itemammount][i]);
}
for(new i; i < 6; i++)
{
new file[30];
INI_Int(fmat(file, "ItemInSlot%d", i), pVar[playerid][inv_ItemInSlot][i]);
defer AttachPlayerObjects(playerid);
}
new wepdata[2][12];
for(new i; i < 12; i++)
{
new file[30];
INI_Int(fmat(file, "Weapon%d", i), wepdata[0][i]);
INI_Int(fmat(file, "Ammo%d", i), wepdata[1][i]);
GivePlayerWeapon(playerid, wepdata[0][i], wepdata[1][i]);
printf("Call %d", i);
}