New admin panel for dayz.st (PHP)

Well I'm not sure about the new functions yet, first thing is to rebuild the current scripts, but better.
Expect it to be out in 3-5 days.
 
What information would you need to make the panel work well with Celle?

Currently mass recruiting admins thanks to your panel, but we play Celle - so gotta make sure it works properly with it
 
celle have another coordinates then chernarus we need all the coordinates from celle for when you will teleport players to another players the coordinates works now only for chenarus
 
What about TP to a city/location?

Perhaps allow the admins to create their own list of coords to TP players to, if that isn't possible, I can always just go and get all the coords for the various towns.
 
i dont know of he is making tp to a city/location i think only to player but every map have another coordinates
 
Alright I went ahead and placed a marker in each town on the map and all relevant places I could think of for now. I did it for celle, since i'm most familiar with it.

Code:
 0
        POSITION=[8769.3633, 2077.6267, 0]
        NAME=Celle Courtyard
        TEXT=Celle Courtyard
1
        POSITION=[7593.5557, 1075.5316, 2.5749207e-005]
        NAME=SAF Control Tower
        TEXT=SAF Control Tower
3
        POSITION=[10796.543, 794.20032, 1.0967255e-005]
        NAME=Wienhausen
        TEXT=Wienhausen
4
        POSITION=[11945.233, 2269.1538, 9.5367432e-007]
        NAME=Lachendorf
        TEXT=Lachendorf
6
        POSITION=[6976.8833, 2576.8459, 4.7683716e-006]
        NAME=Hambuhren
        TEXT=Hambuhren
8
        POSITION=[6156.8647, 2619.8801, -1.1444092e-005]
        NAME=Ovelgonne
        TEXT=Ovelgonne
10
        POSITION=[4671.6343, 443.48831, 9.5367432e-006]
        NAME=Fuhrberg
        TEXT=Fuhrberg
11
        POSITION=[4672.1519, 3009.2664, 2.0980835e-005]
        NAME=Wietze
        TEXT=Wietze
13
        POSITION=[5618.9297, 3712.0496, -4.7683716e-006]
        NAME=Sudwinsen
        TEXT=Sudwinsen
14
        POSITION=[5576.0605, 4354.6401, -9.5367432e-007]
        NAME=Winsen
        TEXT=Winsen
15
        POSITION=[7112.8071, 4622.9976, -2.0980835e-005]
        NAME=Wolthausen
        TEXT=Wolthausen
16
        POSITION=[11830.458, 5652.0806, 2.6702881e-005]
        NAME=Eschede
        TEXT=Eschede
17
        POSITION=[9038.9385, 3837.918, -4.9591064e-005]
        NAME=Schuen
        TEXT=Schuen
18
        POSITION=[11102.345, 11203.669, 8.5830688e-006]
        NAME=NAF Control Tower
        TEXT=NAF Control Tower
19
        POSITION=[10436.042, 10689.137, -2.8610229e-006]
        NAME=Fassberg
        TEXT=Fassberg
20
        POSITION=[6848.2852, 11163.889, 2.6702881e-005]
        NAME=Wietzendorf
        TEXT=Wietzendorf
21
        POSITION=[2984.6731, 10950.419, 1.9073486e-006]
        NAME=Dorfmark
        TEXT=Dorfmark
23
        POSITION=[715.7384, 11086.646, 7.6293945e-006]
        NAME=Benefeld
        TEXT=Benefeld
24
        POSITION=[1606.4475, 9430.5176, 1.9073486e-006]
        NAME=Fallingbostel
        TEXT=Fallingbostel
26
        POSITION=[571.11353, 8693.5762, 5.7220459e-006]
        NAME=Dushorn
        TEXT=Dushorn
28
        POSITION=[447.49429, 3814.2073, -5.7220459e-006]
        NAME=Schwarmstedt
        TEXT=Schwarmstedt
31
        POSITION=[614.74182, 5104.7773, -3.8146973e-006]
        NAME=Hademstorf
        TEXT=Hademstorf
33
        POSITION=[2702.6433, 4069.988, -1.9073486e-006]
        NAME=Thoren
        TEXT=Thoren
34
        POSITION=[2301.0278, 1215.074, -3.0517578e-005]
        NAME=Mellendorf
        TEXT=Mellendorf
36
        POSITION=[1678.7277, 2053.5579, -9.5367432e-006]
        NAME=Lindwedel
        TEXT=Lindwedel
37
        POSITION=[8469.7305, 6320.751, -3.8146973e-006]
        NAME=Eversen
        TEXT=Eversen
38
        POSITION=[8414.5283, 8088.9531, 6.2942505e-005]
        NAME=Beckedorf
        TEXT=Beckedorf
40
        POSITION=[6851.1323, 6618.6309, 2.2888184e-005]
        NAME=Offen
        TEXT=Offen
41
        POSITION=[6247.1572, 5803.9072, 3.8146973e-006]
        NAME=Walle
        TEXT=Walle
43
        POSITION=[4542.5371, 5519.3491, 3.8146973e-006]
        NAME=Meissendorf
        TEXT=Meissendorf
44
        POSITION=[6760.0996, 7975.769, 5.7220459e-006]
        NAME=Bergen
        TEXT=Bergen
46
 
        POSITION=[8349.6416, 9591.1768, 3.8146973e-005]
        NAME=Bonstorf
        TEXT=Bonstorf
47
        POSITION=[9515.9932, 10121.562, 2.4795532e-005]
        NAME=Muden
        TEXT=Muden
48
        POSITION=[9001.0996, 8901.415, -3.8146973e-005]
        NAME=Hermannsburg
        TEXT=Hermannsburg
50
        POSITION=[8513.2227, 3162.3447, 1.1444092e-005]
        NAME=Gross Hehlen
        TEXT=Gross Hehlen
51
        POSITION=[9380.126, 3269.1462, 1.9073486e-006]
        NAME=Vorwerk
        TEXT=Vorwerk
52
        POSITION=[9036.2773, 2586.5928, 2.8610229e-005]
        NAME=Hehlentor
        TEXT=Hehlentor
54
        POSITION=[8350.9766, 2752.293, 2.4795532e-005]
        NAME=Klein Hehlen
        TEXT=Klein Hehlen
55
        POSITION=[12195.065, 977.573, -1.8119812e-005]
        NAME=Eastmost along river
        TEXT=Eastmost along river
56
        POSITION=[59.358772, 5208.2036, 3.7670135e-005]
        NAME=Westmost along river
        TEXT=Westmost along river
57
        POSITION=[17.684713, 12274.881, 0]
        NAME=NW Corner
        TEXT=NW Corner
58
        POSITION=[12186.046, 12218.783, -2.4795532e-005]
        NAME=NE Corner
        TEXT=NE Corner
59
        POSITION=[12213.908, 29.648508, -2.0980835e-005]
        NAME=SE Corner
        TEXT=SE Corner
60
        POSITION=[46.516766, 31.434532, 0]
        NAME=SW
        TEXT=SW
61
        POSITION=[5035.2646, 12151.317, -6.1988831e-006]
        NAME=Northern point on Highway 7
        TEXT=Northern point on highway 7
62
        POSITION=[3567.832, 142.28204, 1.1444092e-005]
        NAME=Southern end of Highway 7
        TEXT=Southern end of Highway 7
63
        POSITION=[1594.113, 4385.8452, 0]
        NAME=Highway 7 Bridge
        TEXT=Highway 7 Bridge
64
        POSITION=[4421.6313, 8189.4146, -5.3405762e-005]
        NAME=Dusty Middle-ish Part
        TEXT=Dusty Middle-ish Part
 
Also - Would it be possible to insert a list of custom Skins/vehicles/weapons/ammo somewhere into the Admin panel... Seeing as how the actual Dayz.ST panel will probably never incorporate these things into it.
 
Manatee, I'm sorry, but I need the database coordinates. The ones you gave me are in-game editor coordinates and probably not the same. If you tell me the coordinates you get in-game (on a gps) from Lachendorf and it's +- 715*136, then these coordinates are correct. Can you test this for me please?
 
Well seeing as how I normally use the 3d editor and transfer that into my mission.pbo and it all shows up in the right place, those coords are a match to ingame, the only issue with them is that they are in the XYZ order in the 3d editor and not in such order in the DB, I believe its XZY in the DB.
 
The mission.pbo entries are not the same as the database entries, they usually require some calculations.
Can you check if the coords of Lachendorf are 715*136 approximately to make sure please? I don't want to add wrong values.
 
I agree, mission and DB aren't the same coords. But when I imput vehicles into my DB I use the 3d editor. it reads my SQF and it inserts them.. regardless of map it works... Here's what it looks like.. Perhaps I'm misunderstanding something... if that's the case I'll go check ingame

Code:
<?php
/* 3D Editor Mission File Parser
* (For Bliss Hives ONLY)
*
* This will take your mission.sqm file and add any new vehicles to your vehicle table and all spawn points
* to your world_vehicle table
* Written by: Planek
*
* You can go through and edit
* Edit this info to match your database config//
*
*/
 
// DATABASE CONNECTION INFO //
 
 
$dbhost = ';
$dbname = '
$dbuser =
$dbpass = '
 
$fileName = '; //path to your mission.sqm file
$chance = ; //Set a default chance for all vehicles spawns created
$worldID = ; // Check your world table for your specific world ID.
$instance =/// instance number
///////////////////
 
// DO NOT EDIT ANYTHING BELOW THIS LINE //
/*--------------------------------------*/
 
$conn = mysql_connect($dbhost, $dbuser, $dbpass);
mysql_select_db($dbname, $conn);
$missionfile = file_get_contents($fileName);
$rows = explode("\n",$missionfile);
array_shift($rows);
$vehiclecount =0;
?>
 
<table border=1px>
<tr><th>Class Name</th><th>Position</th><th>Vehicle ID</th></tr>
<?php
 
        $IDQuery = "SELECT id
        FROM world_vehicle;";
        $resultIDQuery = mysql_query($IDQuery);
        while ($row = mysql_fetch_array($resultIDQuery, MYSQL_NUM))
            $userDataIDs[] = $row[0];
        $id = max($userDataIDs)+1;
     
     
for($i=0;$i<count($rows);$i++)
{
    $direction = 0;
    if (strpos($rows[$i],'_this = createVehicle [') !== false)
    {
        $strings = explode("\"",$rows[$i]);
        $firstOpenBracket = strpos($rows[$i], "[");
        $secondOpenBracket = strpos($rows[$i], "[", $firstOpenBracket + strlen("]"));
        $firstCloseBracket = strpos($rows[$i], "]");
     
        if (strpos($rows[$i+2],'_this setDir') !== false)
        {
            $firstSpace = strpos($rows[$i+2]," ");
            $secondSpace = strpos($rows[$i+2]," ",$firstSpace+strlen(" "));
            $thirdSpace = strpos($rows[$i+2]," ",$secondSpace+strlen(" "));
            $forthSpace = strpos($rows[$i+2]," ",$thirdSpace+strlen(" "));
            $period = strpos($rows[$i+2],".");
            $direction = substr($rows[$i+2],$forthSpace+1, $period-$forthSpace-1);
        }
     
        $pos = "[$direction," . substr($rows[$i],$secondOpenBracket, $firstCloseBracket-$secondOpenBracket+1) . "]";
        $pos = str_replace(array(' '), '',$pos);
        $newPos = explode(",",$pos);
        if (count($newPos) == 3)
        {
            $pos = "[$direction," . substr($rows[$i],$secondOpenBracket, $firstCloseBracket-$secondOpenBracket) . ",0]]";
            $pos = str_replace(array(' '), '',$pos);
        }
     
        //Class Check (Will insert a new classname if it doesnt exist)
        $checkClassNameQuery = "SELECT *
        FROM vehicle;";
        $resultClassNameQuery = mysql_query($checkClassNameQuery);
        $userDataClassNameQuery;
        $userDataVehicleIDs;
        while ($row = mysql_fetch_array($resultClassNameQuery, MYSQL_ASSOC))
            $userDataClassNameQuery[] = $row['class_name'];
 
        $matchFound = 0;
        for($j=0;$j<count($userDataClassNameQuery)-1;$j++)
        {
            if ($strings[1] == $userDataClassNameQuery[$j])
            {
                $matchFound = 1;
            }
        }
        $checkClassNameIDQuery = "SELECT id
        FROM vehicle;";
        $resultClassNameIDQuery = mysql_query($checkClassNameIDQuery);
        while ($row = mysql_fetch_array($resultClassNameIDQuery, MYSQL_NUM))
            $userDataVehicleIDs[] = $row[0];
        $classCount = max($userDataVehicleIDs) + 1;
        if($matchFound == 0)
        {
            echo "Inserting new Class Name at index, " . $classCount;?><br><?php
            $insertClassQuery = "INSERT INTO `vehicle` (`id`, `class_name`, `damage_min`, `damage_max`, `fuel_min`, `fuel_max`, `limit_min`, `limit_max`, `parts`)
            VALUES ('$classCount', '$strings[1]', '[0.8]', '[0.9]', '[0]', '[0.2]', '[1]', '150', 'motor');";
            $resultInsertClassQuery = mysql_query($insertClassQuery);
        }
        //Class Check End
     
        //TorZar BEGIN CODE
        $b = time ();
        $tortime = date("y-m-d H:i:s", $b);
     
        $torIDQuery = "SELECT id
        FROM instance_vehicle;";
        $torresultIDQuery = mysql_query($torIDQuery);
        while ($torrow = mysql_fetch_array($torresultIDQuery, MYSQL_NUM))
            $toruserDataIDs[] = $torrow[0];
        $torid = max($toruserDataIDs)+1;
     
     
        //TorZar END CODE
     
        $getIDQuery = "SELECT *
        FROM vehicle
        WHERE class_name = '$strings[1]';";
        $resultIDQuery = mysql_query($getIDQuery);
        $userDataIDQuery = mysql_fetch_array($resultIDQuery, MYSQL_ASSOC);
        $vehicle_id = $userDataIDQuery['id'];
     
     
        $insertQuery = "INSERT INTO `world_vehicle` (`id`, `vehicle_id`, `world_id`, `worldspace`, `chance`)
        VALUES ('$id', '$vehicle_id', '$worldID', '$pos', '$chance');";
     
     
    //'id', 'world_vehicle_id', 'instance_id', 'worldspace', 'inventory', 'parts', 'fuel', 'damage', 'last_updated', 'created'
        $torinsertQuery = "INSERT INTO `instance_vehicle` (`id`, `world_vehicle_id`, `instance_id`, `worldspace`, `inventory`, `parts`, `fuel`, `damage`, `last_updated`, `created`)
        VALUES ('$torid', '$id', '$instance', '$pos', '[]', '[]', '[0.1]', '[0.85]', '$tortime', '$tortime');";
        $resultInsertQuery = mysql_query($insertQuery);
        $torresultInsertQuery = mysql_query($torinsertQuery);
        $vehiclecount++;
        $id++;
        ?><tr><td><?php echo $strings[1]?></td><td><?php echo $pos?></td><td><?php echo $vehicle_id?></td></tr><?php
    }
}
?>
</table><br><br><b>
<?php
echo $vehiclecount;
 
?> </b>vehicles added to the database spawn tables.<br>
<a href="http://127.0.0.1:78/dayz/">RETURN</a>
 
Back
Top