Hey,
Wenn ich mit /createhouse ein Haus erstelle, bekommt es die HausID 0.
Wenn ich dann ein Zweites Haus erstelle bekommt dieses die HausID 0 und das erste Haus wird gelöscht.
Kann man dem Erstellten Haus irgentwie eine hausID zuordnen sozusagen?
if(strcmp(cmd, "/createhouse", true) == 0)
	{
		if (PlayerInfo[playerid][pAdmin] >= 5)
		{
 		for(new i = 0; i < sizeof(HouseInfo); i++)
		{
			new Float:x, Float:y, Float:z;
			GetPlayerPos(playerid,x,y,z);
		    HouseInfo[i][hEntrancex] = x;
		    HouseInfo[i][hEntrancey] = y;
		    HouseInfo[i][hEntrancez] = z;
		    HouseInfo[i][hExitx] = 446.1000;
		    HouseInfo[i][hExity] = 507.9000;
		    HouseInfo[i][hExitz] = 1001.4195;
		    HouseInfo[i][hHealthx] = 0;
		    HouseInfo[i][hHealthy] = 0;
		    HouseInfo[i][hHealthz] = 0;
		    HouseInfo[i][hArmourx] = 0;
		    HouseInfo[i][hArmoury] = 0;
		    HouseInfo[i][hArmourz] = 0;
		    HouseInfo[i][hOwner] = 0;
		    HouseInfo[i][hDiscription] = 0;
		    HouseInfo[i][hValue] = 7000;
		    HouseInfo[i][hHel] = 0;
		    HouseInfo[i][hArm] = 0;
	 	    HouseInfo[i][hInt] = 12;
	 	    HouseInfo[i][hLock] = 1;
		    HouseInfo[i][hOwned] = 0;
		    HouseInfo[i][hRooms] = 1;
	 	    HouseInfo[i][hRent] = 1;
		    HouseInfo[i][hRentabil] = 1;
		    HouseInfo[i][hTakings] = 0;
		    HouseInfo[i][hVec] = 0;
		    HouseInfo[i][hVcol1] = -1;
		    HouseInfo[i][hVcol2] = -1;
		    HouseInfo[i][hDate] = 0;
		    HouseInfo[i][hLevel] = 5;
		    strmid(HouseInfo[i][hOwner], "The State", 0, strlen("The State"), 255);
			SendClientMessage(playerid, COLOR_OOC,"Du hast ein Neues Haus erstellt");
			SendClientMessage(playerid, COLOR_WHITE, "Mit /edit kannst du das Haus Editieren!");
		    new string2[128];
			new File: file2;
			file2 = fopen("property.cfg", io_append);
		    new string3[450];
		    format(string3,sizeof(string3),"%f,%f,%f,%f,%f,%f,%d,%d,%d,%d,%d,%d,%s,%s,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d\n",
		    HouseInfo[i][hEntrancex],HouseInfo[i][hEntrancey],HouseInfo[i][hEntrancez],HouseInfo[i][hExitx],HouseInfo[i][hExity],
		    HouseInfo[i][hExitz],HouseInfo[i][hHealthx],HouseInfo[i][hHealthy],HouseInfo[i][hHealthz],HouseInfo[i][hArmourx],
		    HouseInfo[i][hArmoury],HouseInfo[i][hArmourz],HouseInfo[i][hOwner],HouseInfo[i][hDiscription],HouseInfo[i][hValue],
		    HouseInfo[i][hHel],HouseInfo[i][hArm],HouseInfo[i][hInt],HouseInfo[i][hLock],HouseInfo[i][hOwned],HouseInfo[i][hRooms],
		    HouseInfo[i][hRent],HouseInfo[i][hRentabil],HouseInfo[i][hTakings],HouseInfo[i][hVec],HouseInfo[i][hVcol1],HouseInfo[i][hVcol2],
		    HouseInfo[i][hDate],HouseInfo[i][hLevel]);
    		fwrite(file2, string3);
			fclose(file2);
		    format(string2, sizeof(string2), "[Haus zu verkaufen - %s]\nPreis: $%d\nLevel: %d\n/buyhouse zum kaufen",HouseInfo[i][hDiscription],HouseInfo[i][hValue],HouseInfo[i][hLevel]);
		    HouseInfo[i][Text] = Create3DTextLabel(string2,COLOR_FORSELL,HouseInfo[i][hEntrancex], HouseInfo[i][hEntrancey], HouseInfo[i][hEntrancez]+1,15.0,0);
		    AddStaticPickup(1273, 1, HouseInfo[i][hEntrancex], HouseInfo[i][hEntrancey], HouseInfo[i][hEntrancez], 0);
		    pickups++;
		    OnPropUpdate();
		    return 1;
		    }
		 }
		return 1;
	}
>>Godfather<<
Hoffe ihr könnt mir Helfen =)
		
		
		
	