13.02.2014, 05:22
(
Последний раз редактировалось bugsy94; 13.02.2014 в 12:47.
)
Hello, i have two-dimensional array and enum, in array i have an integer and positions for trailers, i need compare first number in array(1,2,3...) with number which i set player and after all take once random positions and spawn trailer.
But when i wrote command on server, it write: "Server: Unknown command" and trailer is not spawned...I think that error is in if..please help
Sorry for my bad engilsh
But when i wrote command on server, it write: "Server: Unknown command" and trailer is not spawned...I think that error is in if..please help
Код:
enum CorpProp
{
id_firma,
Float: tX,
Float: tY,
Float: tZ,
Float: tA,
Float: cpX,
Float: cpY,
Float: cpZ,
Float: cpS,
}
new trailers[][CorpProp] =
{
{1, 2875.0837, 938.3555, 11.2461, 90.0000},
{2, 2874.9983, 934.0735, 11.2461, 90.0000},
{3, 2874.8254, 929.4396, 11.2461, 90.0000},
{4, 2874.8284, 924.6432, 11.2461, 90.0000},
{5, 2874.7375, 920.9322, 11.2461, 90.0000},
{6, 2874.6543, 917.0178, 11.2461, 90.0000},
{7, 2874.5366, 912.9464, 11.2461, 90.0000},
{8, 2873.8799, 908.7018, 11.5861, 90.0000}
};
//in callback
new n, a[MAX_VEHICLES], b;
for(new v = 0; v < sizeof(trailers); v++)
{
if(trailers[v][id_firma] == Info[i][firma])
{
a[b] = v;
b++;
}
}
n = a[random(b)];
Info[i][naves] = CreateVehicle(435, trailers[n][tX], trailers[n][tY], trailers[n][tZ], trailers[n][tA], random(126), random(126), -1);

