function getvgui($name, $type = 'img', $path = 'vgui/inventory') { $img = GetMaterial($name, $type, $path); if ($img) { if ($type == 'img') { return "<img src='{$img}' alt='{$name}' height='128' width='256'/><br>"; } if ($type == 'bare') { return $img; } if ($type == 'css') { return " style=\"background-image: url('{$img}');\" class='vgui'"; } } }
} // Set return to point if name matches, but keep going to find controlpoint match if available if ($name == $cp || $point['pos_name'] == $cp || $point['pos_targetname'] == $cp) { $return[] = $point; } } } //var_dump($return); return $return; } // Display map if selected if ($map) { // Load gametype data $gametypes = array_keys($maps[$map]['gametypes']); // Display map overview $img = GetMaterial($maps[$map]['overview']['material'], 'bare'); echo "\t\t\t\t\t\t<img src='{$img}' class='map-image' id='map-image' alt='{$map}' style='z-index: 0;'/><br />\n"; // Include overlays if they exist if (file_exists("{$datapath}/maps/overlays/{$map}.txt")) { $data = parseKeyValues(strtolower(file_get_contents("{$datapath}/maps/overlays/{$map}.txt"))); foreach ($data as $layername => $layerdata) { foreach ($layerdata as $pname => $pdata) { if ($pdata['pos_name'] == '') { $pdata['pos_name'] = $pname; } $map_objects[$layername][] = $pdata; } } } // Set navmesh to map name by default $navmesh = $map;