Iv made the base script im just wondering how to get the x and y's right and moving here is the base
what im wonding how to do is making the markers x in the centre of the background and the dot centered when the player writes /setgps then when the player moves the dot will move either down up right left or diagonally depending where the player is to where the marker is.
i cant figure out how to make the max dots x and y depending on how big the gmap is and making it only move a tiny bit.
PHP Code:
//#CLIENTSIDE
function onCreated() {
new GuiBitmapCtrl("GPS_Background") {
x = 210;
y = 10;
width = 100;
height = 100;
bitmap = "GPS_Background.png";
}
new GuiBitmapCtrl("GPS_Marker") {
x = 240;
y = 40;
width = 10;
height = 10;
bitmap = "GPS_Marker.png";
}
new GuiBitmapCtrl("GPS_Dot") {
x = 255;
y = 55;
width = 10;
height = 10;
bitmap = "GPS_Dot.png";
}
new GuiTextCtrl("GPS_X") {
profile = GuiBlueTextProfile;
height = 20;
width = 200;
x = 315;
y = 65;
red = 1;
green = 1;
blue = 1;
}
new GuiTextCtrl("GPS_Y") {
profile = GuiBlueTextProfile;
height = 20;
width = 200;
x = 315;
y = 80;
red = 1;
green = 1;
blue = 1;
}
onTimeout();
}
function onTimeout() {
GPS_X.text = "X: "@client.gpsx;
GPS_Y.text = "Y: "@client.gpsy;
settimer(0.05);
}
function onPlayerChats() {
if (player.chat == "/setgps") {
player.chat = "GPS Marker Set!";
client.gpsx = player.x;
client.gpsy = player.y;
}
}