22.01.2018, 01:47
Esse cуdigo vai checar se o ъltimo veнculo colocado na posiзгo estб prуximo da mesma.
PHP код:
enum gcsInfo {
Float:gcsX,
Float:gcsY,
Float:gcsZ,
gcsVID
};
static const gCarShowSlots[][gcsInfo] =
{
{1098.5062, -1754.9224, 13.1775},
{1098.5096, -1757.9258, 13.1775},
{1098.5859, -1760.8698, 13.1764}
};
for(new i = 0; i < sizeof(gCarShowSlots); i++)
{
if(!GetVehicleModel(gCarShowSlots[i][gcsVID]) || GetVehicleDistanceFromPoint(gCarShowSlots[i][gcsVID], gCarShowSlots[i][gcsX], gCarShowSlots[i][gcsY], gCarShowSlots[i][gcsZ]) > 1.0)
{
gCarShowSlots[i][gcsVID] = CreateVehicle...
}
}