//#CLIENTSIDE function onCreated() { SetPref(); DrawMap(); onTimeout(); } function SetPref() { this.mapimage = "delt_deltlite-mapimg.png"; this.scale = 8; this.mapdim = {11, 7}; this.marker = "plisticononline.png"; } function DrawMap() { MapImage.destroy(); MapContainer.destroy(); new GuiControl("MapContainer") { useownprofile = true; width = 2112 / thiso.scale; height = 1344 / thiso.scale; x = 15; y = screenheight - height - 35; profile.border = 1; new GuiBitmapCtrl("MapHead") { bitmap = thiso.marker; extent = {16, 16}; } } new GuiBitmapCtrl("MapImage") { extent = {2112 / thiso.scale, 1344 / thiso.scale}; x = 15; y = screenheight - extent[1] - 35; bitmap = thiso.mapimage; } MapContainer.bringtofront(); } function PlaceOnMap() { MapHead.x = (player.x * (this.scale / 2)) / this.mapdim[0]; MapHead.y = (player.y * (this.scale / 3)) / this.mapdim[1]; MapHead.hint = "X:" SPC player.x NL "Y:" SPC player.y; } function onTimeout() { PlaceOnMap(); setTimer(0.05); } function onPlayerEnters() { if (player.gmap == NULL) { MapContainer.visible = MapImage.visible = false; } else { MapContainer.visible = MapImage.visible = true; } }