How Can I Convert This to Y_INI?
#1

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
Reply
#2

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

nevermind my friend fixed this for me.thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)