16.04.2018, 18:36
Код:
House_Create(playerid, address[], price) { static Float:x, Float:y, Float:z, Float:angle; if (GetPlayerPos(playerid, x, y, z) && GetPlayerFacingAngle(playerid, angle)) { for (new i = 0; i != MAX_HOUSES; i ++) { if (!HouseData[i][houseExists]) { HouseData[i][houseExists] = true; HouseData[i][houseOwner] = 0; HouseData[i][housePrice] = price; HouseData[i][houseMoney] = 0; format(HouseData[i][houseAddress], 32, address); HouseData[i][housePos][0] = x; HouseData[i][housePos][1] = y; HouseData[i][housePos][2] = z; HouseData[i][housePos][3] = angle; HouseData[i][houseInt][0] = 2269.8772; HouseData[i][houseInt][1] = -1210.3240; HouseData[i][houseInt][2] = 1047.5625; HouseData[i][houseInt][3] = 90.0000; HouseData[i][houseInterior] = 10; HouseData[i][houseExterior] = GetPlayerInterior(playerid); HouseData[i][houseExteriorVW] = GetPlayerVirtualWorld(playerid); HouseData[i][houseLights] = false; HouseData[i][houseLocked] = false; House_Refresh(i); mysql_tquery(g_iHandle, "INSERT INTO `houses` (`houseOwner`) VALUES(0)", "OnHouseCreated", "d", i); return i; } } } return -1; }