07.04.2013, 17:35
Hello guys, i am very new to y_ini and i dont know realy how to use it,
Can someone show me how to make this code to y_ini ? just an example is needed
Can someone show me how to make this code to y_ini ? just an example is needed
pawn Код:
stock CreateNewHouse(h,Float:x,Float:y,Float:z)
{
new hf[64];
format(hf,sizeof(hf),"Houses/Casa%d.txt",h);
if(!dini_Exists(hf))
{
dini_Create(hf);
dini_IntSet(hf,"id",h);
dini_Set(hf,"owner","Nobody");
dini_IntSet(hf,"rentable",0);
dini_Set(hf,"dupekey","Nobody");
dini_IntSet(hf,"rentprice",0);
dini_IntSet(hf,"level",1);
dini_IntSet(hf,"closed",0);
dini_IntSet(hf,"fullprice",0);
dini_IntSet(hf,"maxrents",20);
dini_IntSet(hf,"freeslots",20);
dini_IntSet(hf,"buyable",0);
dini_IntSet(hf,"housecash",1000);
dini_IntSet(hf,"interiorpack",0);
dini_IntSet(hf,"robbed",0);
dini_FloatSet(hf,"X",x);
dini_FloatSet(hf,"Y",y);
dini_FloatSet(hf,"Z",z);
new virt=h+1;
dini_IntSet(hf,"Hvirtual",virt);
House[h][HouseID]=h;
House[h][House_x]=x;
House[h][House_y]=y;
House[h][House_z]=z;
House[h][_Hvirtual]=virt;
House3D[h] = Create3DTextLabel("[{FFFFFF}Owner: Nobody{008000}]", COLOR_GREEN, House[h][House_x],House[h][House_y],House[h][House_z]+0.4, 8, 0, 0);
return 1;//FFFFFF 008000
}
return 0;
}