Help with script -
C0oL3r - 06.02.2018
Hello, i've created that:
Код:
new Float:SmallHouses[][] =
{
{2468.5205, -1698.2686, 1013.5078, 2},
{2233.6655, -1115.2365, 1050.8828, 5},
{2259.5210, -1135.8721, 1050.6328, 10},
{226.7883, 1240.0251, 1082.1406, 2},
{223.0944, 1287.0757, 1082.1406, 1},
{2807.5542, -1174.7574, 1025.5703, 8},
{2218.4031, -1076.2836, 1050.4844, 1},
{-42.5458, 1405.4698, 1084.4297, 8},
{2282.8955, -1140.2854, 1050.8984, 11},
{266.4993, 304.9344, 999.1484, 2},
{243.7172, 304.9277, 999.1484, 1}
};
and when i compile i get from all lines "tag mismatch" but i can't delete the last numbers because it's the interior of all locations, any method to fix?
Re: Help with script -
Hrb - 06.02.2018
You have variable only for Float numbers: "new Float:Small Houses" so you can't use interior ID in that variable, because it is integer.
Try something like this:
Код:
enum SmallHouses_Info
{
Float:SH_X,
Float:SH_Y,
Float:SH_Z,
SH_Interior
}
new SmallHouses[][SmallHouses_Info] =
{
{2468.5205, -1698.2686, 1013.5078, 2},
{2233.6655, -1115.2365, 1050.8828, 5},
{2259.5210, -1135.8721, 1050.6328, 10},
{226.7883, 1240.0251, 1082.1406, 2},
{223.0944, 1287.0757, 1082.1406, 1},
{2807.5542, -1174.7574, 1025.5703, 8},
{2218.4031, -1076.2836, 1050.4844, 1},
{-42.5458, 1405.4698, 1084.4297, 8},
{2282.8955, -1140.2854, 1050.8984, 11},
{266.4993, 304.9344, 999.1484, 2},
{243.7172, 304.9277, 999.1484, 1}
};
new r = random(sizeof(SmallHouses));
SetPlayerPos(playerid, SmallHouses[r][SH_X], SmallHouses[r][SH_Y] , SmallHouses[r][SH_Z]);
SetPlayerInterior(playerid, SmallHouses[r][SH_Interior]);
Re: Help with script -
C0oL3r - 06.02.2018
I solved, now here
Код:
new DB_Query[255];
strcat(DB_Query, "INSERT INTO `HOUSES` (`EnterX`, `EnterY`, `EnterZ`, `ExitX`, `ExitY`, `ExitZ`, `InsideInt`, `OutsideInt`, `Level`, `Owner`, `Price`, `Pickup`, `Icon`)", sizeof(DB_Query));
strcat(DB_Query, "VALUES ('%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', %d', 'None', '%d', '%d', '%d')", px, py, pz, SmallHouses[randomsmall][EH_X], SmallHouses[randomsmall][EH_Y], SmallHouses[randomsmall][EH_Z], SmallHouses[randomsmall][EH_Interior], pinterior, 5, 500, 1, 1, sizeof(DB_Query));
i got "warning 202: number of arguments does not match definition"