How can i createhouse ?[Repp +]
#1

hey there
i am trying to make houses system by ingame for example i go to a place and do /createhouse
i tried some times but couldnt do it
here is my codes on how houses are created

Код:
for(r=0;r<sizeof(House);r++){
		new ownername[MAX_PLAYER_NAME];
		ownername="NoBodY";
		format(nomefile,sizeof(nomefile),"houses%d.txt",House[r][HouseID]);
		if (!dini_Exists(nomefile))
		{
			dini_Create(nomefile);
			dini_IntSet(nomefile,"id",House[r][HouseID]);
			dini_Set(nomefile,"owner",ownername);
			dini_IntSet(nomefile,"rentable",1);
			dini_IntSet(nomefile,"rentprice",1500);
			dini_IntSet(nomefile,"level",1);
			dini_IntSet(nomefile,"closed",0);
			dini_IntSet(nomefile,"fullprice",minrand(900000, 1800000));
			dini_IntSet(nomefile,"buyable",1);
			dini_IntSet(nomefile,"housecash",1000);
			dini_IntSet(nomefile,"till", 0);
			dini_IntSet(nomefile,"interiorpack",0);
			dini_FloatSet(nomefile, "x", House[r][House_x]);
			dini_FloatSet(nomefile, "y", House[r][House_y]);
			dini_FloatSet(nomefile, "z", House[r][House_z]);
			printf("%s created\n",nomefile);
		}
how can i make /createhouse [id]
Reply
#2

Here is a tutorial which is similar to your case dini saving system

[Tutorial] Make your own house system (with vehicles)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)