New admin panel for dayz.st (PHP)

Manatee, you could always make a new sqm in the 3d editor, place 1 building or vehicle, copy it's coords from in the sqm file, add it to the database with that php script, and then see if they are the same or not.
 
Manatee, you could always make a new sqm in the 3d editor, place 1 building or vehicle, copy it's coords from in the sqm file, add it to the database with that php script, and then see if they are the same or not.

I think we've got our wires crossed. That list I gave you is good. I made it in the editor, I used it in the DB. Biedi and DB coords are the same for celle. It's legit. What you are saying to do, I've done a thousand times in the past and it has always worked. Those coords are good for use in the DB NOT in the mission.sqm.
 
Well, okay, I'll add them then. Just wanted to make sure, as I'd rather prevent issues from happening than to fix them.
I'm sorry for the misunderstanding. Thanks for the list, much appreciated.
 
If you need anything else, I'm more than willing to help. I do not have coding skills, but any grunt work type deal, i'll pitch in.. It's the least I can do - I've learned so much on opendayz
 
If people could send me their server PBO's, that would be great.
I currently need the server PBO's for these maps:
  • Lingor
  • Utes
  • Panthera
  • Fallujah
  • Zargabad
  • Namalsk
  • Celle
  • Thirsk
  • Oring
  • Thirsk winter
Thanks.

Edit: got 'em all, thanks larrgoo!
 
Would greatly appreciate some help-

Uploaded, following error message
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[28000] [1045] Access denied for user 'bliss_****'@'***' (using password: YES)' in /home/a2363092/public_html/DayZ.stAdminPanelPHP-master/index.php:6 Stack trace: #0 /home/a2363092/public_html/DayZ.stAdminPanelPHP-master/index.php(6): PDO->__construct('mysql:host=db.d...', 'bliss_***', '***') #1 {main} thrown in /home/a2363092/public_html/DayZ.stAdminPanelPHP-master/index.php on line 6

I initally had the same error as urbanskaters on page 1, removed the port number, then got this. Rechecked all the passwords from dayz.st in config, should all be correct. Not sure where else to go..

Thanks for your time
 
Aaand i just found the problem- on cutting and pasting the config file, it clipped the lines down, so index couldnt pull the password. Stupid me.
 
Hi, just my thoughts on your coordinates issue.
I believe the coordinates that Manatee posted Are correct, I have placed my character at the described positions manually from the game DB

For example, the North End of Highway 7.

POSITION=[5035.2646, 12151.317, -6.1988831e-006]


so Manatee provided the X,Y,Z. I usually ignore the Z and let the game go its thing, it usually close to 0 within the game DB.

As a second test, I placed my player into the NAF control tower.
Manatee coordinates provided: POSITION=[11102.345, 11203.669, 8.5830688e-006]
Within the Game, the GPS says I'm at: 706,225

This map 'Celle' is a little bit different because the counting is offset from where the map actually starts, but if you look at the map texturing carefully, where the debug forest ends on the WEST, this is X=0 even though the GPS says ~60 something. - but in any case, those X,Y positions should be ok.

They can be implemented into the DB as follows:

World Position:

[Direction, [X, Y, Z]]

for direction, I think this is [0..360] where 0 = 360 = North.

So the 2 test positions that I did and the associated DB world positions are:
POSITION=[5035.2646, 12151.317, -6.1988831e-006]
DB: [203,[5035.2624,12151.317,0.001]] <- i didn't change the z value from spawn.

POSITION=[11102.345, 11203.669, 8.5830688e-006]
DB: [203,[11102.345, 11203.669, 0.001]] <- right inside the control tower!


You should technically be able to get ANY position just by looking at the map and counting the grid lines. The X starts counting from the WEST while the Y starts counting from the SOUTH. so 6000M from the west and 3000M from the North = [direction,[6000,10000,Z]].

The Y is 10 000 because the DayZ Celle map is 13000 x 13000 M. :D

On the Chernarus Map for example, Skalisty Island GPS is around 136,121
http://dayzdb.com/map#5.135.124
the X = 136000, this is easy because if you look at the map in game, the map texture itself starts at x = 000.
the Y however starts at ~153 on the south end.. So If i just count the grid lines up from where the map starts, I count around 3000M
the Database coordinates can be calculated from the West side to be 13600 meters
and from the south, around 3000, the sql DB world position can then be determined as
[0, 13600.00,3000.0, 0.01]] <- that puts the player onto the island from the database side.

I hope this was helpful.

also thumbs up on the php project.
 
Not that good, I'm afraid.
I don't have enough time on my hands lately.
I know the feeling, just dont stress hard enough to get bald... LOL.

anyway, not to push anything but I wrote a little bit of code that you might be interested in integrating.
I've seen for example the Player Gear editor screen where there is a GPS, but the admin cannot edit the GPS coordinates - also these coordinates would have to be converted to DB on player save.

The code is pretty much generic, you just need to add the Map image and some variables for that Map itself.
I have already added Chernarus and Celle, I think its a good example since those maps GPS coordinates vary VERY much.

the variables:
PHP:
    // available and supported maps for the converted.
    // $map_name = array("..."Full Map Name"...");
    // $map_id = array("..."simple_name"...");
    $map_names = array("Celle","Chernarus","Lingor Island");
    $map_id = array("celle","chernarus","lingor_island");
 
    // map actual dimensions in meters
    // $mapid_dimension = array(xMax, yMax)
    $celle_dimension = array(12290.0, 12290.0);
    $chernarus_dimension = array(15360.0, 15360.0);
    $lingor_island_dimension = array(10240.0, 10240.0);
 
    // in game gps coordinates
    // $mapid_gps = array(xMin, yMin, xMax, yMax, scale, digits on GPS, direction)
    $celle_gps = array(5957, 1130, 7186, 2359, 10, 4, "up");
    $chernarus_gps = array(000, 153, 153, 000, 100, 3, "down");
    $lingor_island_gps = array(000, 000, 102, 102, 100, 3, "up");

converting from GPS to DB
and converting from DB to GPS
PHP:
            case "GPS2DB" : // convert GPS to DB formula
                $gpsvalue = $_POST['gps'];
                $x = ((int) substr($gpsvalue, 0, $digits))*$scale - ($gxMin*$scale);
                $y = $yMax - abs($gyMax - (int) substr($gpsvalue, $digits, $digits))*$scale;
                $dbvalue = "[0[$x.0,$y.0,0.001]]";
            break;
            case "DB2GPS" : // convert DB to GPS
                $dbvalue = $_POST['db'];
             
                // conversion format:
                // [###[#######,########,#####]]
                // remove first [ and last 2 ]] => ###[######,#######,######
                // get index of first [, return substr from index to end
                // expand ######,######,###### into an array where x[0], y[1], z[2]
             
                $str = substr($dbvalue, 1, strlen($dbvalue)-3);
                $index = strpos($str, "[")+1;
                $str = substr($str, $index, strlen($str));
                $vals = explode(",", $str);
                $x = $vals[0]; // x db coordinate
                $y = $vals[1]; // y db coordinate
             
                // gps x coordinate
                $gx = str_pad((int)($x/$scale)+$gxMin, $digits, "0", STR_PAD_LEFT);
             
                // some maps y increases Northwards, and some maps
                // y increases Southwards, so add the lowest value
                // y to the calculated y coordinate
                // gps y coordinate
                $pos = (int)(($yMax - $y)/$scale);
                if($dir == "up") {
                    $pos = $pos + $gyMin;
                } else {
                    $pos = $pos + $gyMax;
                }
                $gy = str_pad($pos, $digits, "0", STR_PAD_LEFT);
             
                $gpsvalue = $gx . $gy;
            break;

you can see a live example at: http://dev.kaganovsky.ca/dayz

Some notes: Chernarus uses a GPS coordinate system of 3x3 digits while Celle uses 4x4.
The maps obviously different size, but for some reason the y values increase in opposite directions
so that needed to be taken into account.

The full source code can be downloaded here:
https://www.dropbox.com/s/yql9zw2qixtqc3f/dayz_convert.zip
 
Please help, I just need a step by step guide. I don't really understand the whole webhost, and ftp
thanks
 
Back
Top