Jump to content


Veteran Driver VII
 TruckersMP Profile
  • Posts

  • Joined

  • Last visited

About ClumsyZombie

  • Birthday 11/24/1979

Profile Information

  • Gender

TruckersMP Information

Recent Profile Visitors

1482 profile views

ClumsyZombie's Achievements



  1. Happy Birthday! I wish you a pleasant game!

  2. Wondering when truckers MP is going to update ATS so we can get online and play NM??
  3. So I tried something like this below to say hey for the next section of code use the below DB. <?php try { $pdo = new PDO('mysql:host=**********.com;dbname=dbname','user','password'); $sql = "SELECT * FROM users ORDER BY id DESC" ; $q = $pdo->query($sql); $q->setFetchMode(PDO::FETCH_ASSOC); } catch (PDOException $e) { die("Could not connect to the database $dbname :" . $e->getMessage()); } $pdo = null; $truckmp = $row['truckermp']; $apiResponse = json_decode(file_get_contents("https://api.truckersmp.com/v2/bans/".$truckmp.""), true); function checkUser($apiResponse) { return $apiResponse['error'] == false ? true : false; } ?>
  4. I think I found the issue. the main one is that I have 2 different DB calls to 2 different tables in this file so it is grabbing the one closer to it and not the one in the top of the file. like it should be. So going to have to figure that part out. It is grabbing the one right above it when the one above it has nothing to do with that. So i need to figure that out to tell it to use the top DB PBO request for the user table and not the jobs table one that is right above it.
  5. @rayray5 I did the following playing around and what is crazy is it works some times and not others. it is wired. <?php $truckmp = $row['truckermp']; $apiResponse = json_decode(file_get_contents("https://api.truckersmp.com/v2/bans/".$truckmp.""), true); function checkUserID($apiResponse) { return $apiResponse['error'] == false ? true : false; } ?> <div class="container"> <center><h3> -Truckers MP Punishment Details- </h3> <div class="well well-sm" style="width: 80%;"> <div align="left"> <?php if (checkuserID($apiResponse)) { foreach ($apiResponse['response'] as $row) { echo "<b>Time Added: </b>".$row['timeAdded']."<br> <b>Expiration: </b>".$row['expiration']."<br> <b>Reason: </b>".$row['reason']."<br> <b>Admin Name: </b>".$row['adminName']."<br><br>"; } } else { echo $apiResponse['descriptor']; } ?> </div> </div> </center> </div>
  6. Man Thank you so much @RayRay5 I wasn't sure were to just ask for help you provided so much details it is crazy. Thanks figured I was just missing something crazy., It is ok to ask stuff like that here correct? I am just looking to learn and just not a good place to learn as no one wants to show anyone anything because they are scared people are going to steal it. I just want to learn and write my own but have someone show me how they did stuff. Nothing Major I not for sure wanting to use anyone code I want it to be my own. That is why i have been looking at the API's so hard I would like to figure out how to look at hidden API's I know there is tons out there. Man thanks a ton I tried reaching out to people that have made stuff and they just don't want to talk to me.
  7. So i am playing around nothing big just learning so I know not to do a ton of request. This is just mine and just learning. I have some code I am trying to do so I can do calls to the https://api.truckersmp.com/v2/bans/ So I have in a DB someones truckers MP id it is like <?php echo $row['truckermp']; ?> calls for it from my DB. What I wanted to do is have that command about pull the truckers MP ID from the DB and place it in the URL from the calls I have above this. Kind of like before So i am wondering If i need to put it in a function since I am learning I am not stressed about this just wanting to figuer it out and then my next move is to have it pull once and have it placed in my own DB so I am not doing calls to truckers mp API much at all. But it doesn't work So i have a users table that has a field of truckermp and well I might be doing this wrong. I know is I put in https://api.truckersmp.com/v2/bans/24 it works pulling back users 24 details. So how do i code it to pull what I have in the DB. Before you ask I already have all my DB stuff working in other code on the site fine it is just with this one Line wanting to know if anyone could point me the right way or show me where I am wrong. Thank you all. I am just learning so please don;t hurt me too bad in your comments back. <div class="container"> <center><h3> -Truckers MP Punishment Details- </h3> <div class="well well-sm" style="width: 80%;"> <div align="left"> <?php $apiResponse = json_decode(file_get_contents("https://api.truckersmp.com/v2/bans/<?php echo $row['truckermp']; ?>"), true); ?> <?php foreach ($apiResponse['response'] as $row) { ?> <?php echo "<b>Time Added : </b>"; echo $row['timeAdded'] ?><br> <?php echo "<b>Expiration : </b>"; echo $row['expiration'] ?><br> <?php echo "<b>Reason : </b>"; echo $row['reason'] ?><br> <?php echo "<b>Admin Name : </b>"; echo $row['adminName'] ?><br> <br /> <?php } ?> </div> </center> </div>
  8. So I have not see any Admins or Dev's at all on here are they working on the issue at all?
  9. @El1teZombiezHD Was thinking something about pulling the users current position on the map and or what details I could pull via ets2map API that could be useful. With the current player API v2 you can't tell if the user is online or offline. That is where the ets2map.com API comes in just wondering what else I would be allowed to use and or See Also if there is plans on releasing some of the API information for ets2map.
  10. Honestly looking for impersonation on some new crap to learn and do. Wanted to see what is out there.
  11. @Kat_pw and others. I know there is documentation on truckersmp.com API but any documentation on ets2map.com API anywhere? Wondering what we can use I have seen the check if a player is online http://tracker.ets2map.com/doko/{id} but is there any other API we can use from the ets2map site?
  12. @HumaneWolf Thanks for the information.
  13. @Bomlife @illtag Thank you both so much for the help!
  14. I have been toying with this Truckers MP API and well 2 days now been able to get everything else figured out. I wanted to pull the game time API into my site and then display it in Human readable. This is what I have so far. <?php $gametime = json_decode(file_get_contents("https://api.truckersmp.com/v2/game_time"), true); ?> <?php echo "Current Game Time: "; echo $gametime['game_time'] ?><br> So I am trying to figure out when I make the call and this display it how can I convert it and show in human readable. When I go to a converter site it says that Current Game Time: 2423486 = Thu, 29 Jan 1970 01:11:26 GMT Is this not EPOCH time that is reported back in the API? Also any way you all know to convert that I would be greatful..... Just looking for some help as i just started hitting this hard and I am a basic php guy so bear with me please.
  15. ^ So I submited a bug with all that ia did to make it happen and then how to make it work to them. it is listed at https://forum.ets2mp.com/index.php?/topic/26770-unable-to-launch-multi-player-launch-with-software-or-hardware-multi-monitor-system-0206-alpha/ Not sure what else I can do so that I get it noticed and then review it and maybe have a fix for it. Anyone else know what else I can do so that it gets looked at?
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.