SA-MP Forums Archive
How Can I Convert This to Y_INI? - 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: How Can I Convert This to Y_INI? (/showthread.php?tid=647798)



How Can I Convert This to Y_INI? - GrandTA - 11.01.2018

Hello. i tried to Convert this stock to Y_INI but it fails and get many errors.please someone can help me??
Код:
stock CreateProperty(Float:x,Float:y,Float:z,cost)
{
    new part[24];
	PropertyCount++;
    new labelstring[40];
	if (PropertyCount >=200) return printf("You have exceeded the MAX_PROPS Limit");
	new id=PropertyCount;
	Property[id][prX]=x;
	Property[id][prY]=y;
	Property[id][prZ]=z;
	Property[id][pCost]=cost;
 	INI_Create("Property.ini");
	if(fexist("Property.ini"))
	{
 		format(part,sizeof(part),"%d",id);
 		format(Property[id][pOwner],25,INI_Get("Property.ini",part));
 		if(strcmp(Property[id][pOwner]," ")==0){format(Property[id][pOwner],25,"None");}
  		if(strcmp(Property[id][pOwner],"None")==0)
		{
    	    format(labelstring,sizeof(labelstring),"$%i",Property[id][pCost]);
			Property[id][pPickup]=CreateDynamicPickup(1273,1,Property[id][prX],Property[id][prY],Property[id][prZ],-1);
  			Property[id][pMapicon]=CreateDynamicMapIcon(Property[id][prX],Property[id][prY],Property[id][prZ],31,0,-1,-1,-1,250.0);
 			Property[id][pLabel]=CreateDynamic3DTextLabel(labelstring,0xFFFFFFFF,Property[id][prX],Property[id][prY],Property[id][prZ],6.0);
		}
		if(strcmp(Property[id][pOwner],"None") !=0)
		{
			format(labelstring,sizeof(labelstring),"Owner: %s",Property[id][pOwner]);
			Property[id][pPickup]=CreateDynamicPickup(1272,1,Property[id][prX],Property[id][prY],Property[id][prZ],-1);
 			Property[id][pLabel]=CreateDynamic3DTextLabel(labelstring,0xFFFFFFFF,Property[id][prX],Property[id][prY],Property[id][prZ],6.0);
 			Property[id][pMapicon]=CreateDynamicMapIcon(Property[id][prX],Property[id][prY],Property[id][prZ],32,0,-1,-1,-1,250.0);
		}
	}
	return 1;
}
Sorry for bad english


Re: How Can I Convert This to Y_INI? - jasperschellekens - 11.01.2018

Be more clear, convert what? There is already ini_create. Be more clear what you want to do


Re: How Can I Convert This to Y_INI? - GrandTA - 11.01.2018

nevermind my friend fixed this for me.thanks