Y_INI Doors save problem! - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Y_INI Doors save problem! (
/showthread.php?tid=564813)
Y_INI Doors load problem! -
Kenway - 23.02.2015
Код:
//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
Re: Y_INI Doors save problem! -
Kenway - 23.02.2015
help?
Re: Y_INI Doors save problem! -
Kenway - 23.02.2015
Help me!!
Re: Y_INI Doors save problem! -
Antoniohl - 23.02.2015
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).
|
Re: Y_INI Doors save problem! -
Kenway - 23.02.2015
Quote:
Originally Posted by Antoniohl
|
Thank you to metion it
Re : Y_INI Doors save problem! -
Golimad - 23.02.2015
"OnLoadDynamicDoors_%d" try this no idea if it'll work tho
Re: Y_INI Doors save problem! -
Kenway - 24.02.2015
Fixed
Re: Y_INI Doors save problem! -
Antoniohl - 24.02.2015
Quote:
format(pFile, sizeof(pFile),"dynamicdoors/%i.ini",doorid);
|
Quote:
format(gFile, sizeof(gFile), "dynamicdoors/%d.ini" ,idx);
|
have a look
Re: Y_INI Doors save problem! -
Kenway - 24.02.2015
They both %I in my new script
Re: Y_INI Doors save problem! -
Kenway - 25.02.2015
No one have an anwser?