Y_INI Doors save problem!
#1

Код:
//OnLoadDynamicMapIcons
forward OnLoadDynamicMapIcons_DMP(idx,name[],value[]);
public OnLoadDynamicMapIcons_DMP(idx,name[],value[])
{
    INI_Int("dmpMarkerType", DMPInfo[idx][dmpMarkerType]);
	INI_Int("dmpColor", DMPInfo[idx][dmpColor]);
	INI_Int("dmpVW", DMPInfo[idx][dmpVW]);
	INI_Int("dmpInt", DMPInfo[idx][dmpInt]);
	INI_Float("dmpPosX", DMPInfo[idx][dmpPosX]);
	INI_Float("dmpPosY", DMPInfo[idx][dmpPosY]);
	INI_Float("dmpPosZ", DMPInfo[idx][dmpPosZ]);
	return 1;
}

//CreateDynamicMapIcons
CreateDynamicMapIcons()
{
    for(new idx = 0; idx < sizeof(DMPInfo); idx++)
    {
		if(DMPInfo[idx][dmpMarkerType] != 0)
		{
			DMPInfo[idx][dmpMapIconID] = CreateDynamicMapIcon(DMPInfo[idx][dmpPosX], DMPInfo[idx][dmpPosY], DMPInfo[idx][dmpPosZ], DMPInfo[idx][dmpMarkerType], DMPInfo[idx][dmpColor], DMPInfo[idx][dmpVW], DMPInfo[idx][dmpInt], -1, 500.0);
		}
	}
	return 1;
}

//SaveDynamicMapIcon
SaveDynamicMapIcon(dmpid)
{
    new pFile[64];
    format(pFile, sizeof(pFile),"dynamicmapicons/%d.ini",dmpid);
    new INI:File = INI_Open(pFile);
    INI_SetTag(File, "DMP");
    INI_WriteInt(File, "dmpMarkerType", DMPInfo[dmpid][dmpMarkerType]);
	INI_WriteInt(File, "dmpColor", DMPInfo[dmpid][dmpColor]);
	INI_WriteInt(File, "dmpVW", DMPInfo[dmpid][dmpVW]);
	INI_WriteInt(File, "dmpInt", DMPInfo[dmpid][dmpInt]);
	INI_WriteFloat(File, "dmpPosX", DMPInfo[dmpid][dmpPosX]);
	INI_WriteFloat(File, "dmpPosY", DMPInfo[dmpid][dmpPosY]);
	INI_WriteFloat(File, "dmpPosZ", DMPInfo[dmpid][dmpPosZ]);
	INI_Close(File);
	return 1;
}
Fixed with INI_SetTag
Reply
#2

help?
Reply
#3

Help me!!
Reply
#4

Please read server rules
Quote:
No Double Posting - There is a modify button , use it. However, bumping a topic in which you have or require further information is allowed after at least 24 hours. Note that two identical posts appearing at the same time is usually a mistake attributed to lag, and will not be penalized (but the second one will be removed).

Reply
#5

Quote:
Originally Posted by Antoniohl
Посмотреть сообщение
Please read server rules
Thank you to metion it
Reply
#6

"OnLoadDynamicDoors_%d" try this no idea if it'll work tho
Reply
#7

Fixed
Reply
#8

Quote:

format(pFile, sizeof(pFile),"dynamicdoors/%i.ini",doorid);

Quote:

format(gFile, sizeof(gFile), "dynamicdoors/%d.ini" ,idx);

have a look
Reply
#9

They both %I in my new script
Reply
#10

No one have an anwser?
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)