Problem with houses.
#7

Код:
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;
}
This is at house_create
Reply


Messages In This Thread
Problem with houses. - by MaestrulFritz - 16.04.2018, 18:01
Re: Problem with houses. - by jasperschellekens - 16.04.2018, 18:06
Re: Problem with houses. - by MaestrulFritz - 16.04.2018, 18:18
Re: Problem with houses. - by jasperschellekens - 16.04.2018, 18:22
Re: Problem with houses. - by MaestrulFritz - 16.04.2018, 18:28
Re: Problem with houses. - by jasperschellekens - 16.04.2018, 18:33
Re: Problem with houses. - by MaestrulFritz - 16.04.2018, 18:36
Re: Problem with houses. - by kovac - 16.04.2018, 18:41
Re: Problem with houses. - by MaestrulFritz - 16.04.2018, 18:47
Re: Problem with houses. - by MaestrulFritz - 16.04.2018, 18:51

Forum Jump:


Users browsing this thread: 4 Guest(s)