Jump to content


Retired Staff
  • Posts

  • Joined

  • Last visited

Everything posted by ChrML

  1. Good to see you're still here, Ed! I certainly will tell you if I'm going to London, it would be nice to actually meet eachother after all these years of internet chatter! I actually started learned basic C++ from http://cplusplus.com by following the tutorials only about 2 years before I started working on the MTA team. I started several smaller game projects first where I did mistakes and gradually learn how to lay out code and structurize big projects. But note that I had quite a bit self-learned experience from other programming languages such as Delphi and Basic, which I started coding a little basic stuff when I was 12-13 years old. Learning to code is not about the language you learn as you can adapt what you learn to most languages. It's all about coding experience and structure . Start in the small, for example LUA- scripting is a great way to start as the results come quickly. I encourage you to learn coding and begin on a few small projects to learn. It's very fun and it makes you very intelligent. Just don't do as me and skip all the social life, hehe, you certainly want friends and girlfriends aswell, it's a bitch to get into that stuff as an adult when everyone else is experienced. Coding for only 3 days would be hard, hehe, as it takes a bit more than 3 days to get deep into the codebase again.
  2. Hi folks, It's been a long while since I've been working on MTA or even posting on this forum.A long time ago I was an active MTA developer for quite a few years. I joined when GTA:SA was very new, less than a month old, and the rest of the team had started developing the first MTA:SA Race. From then on I was on the team during MTA: Race and the first releases of Deathmatch with the resource system known from today. Then my activity faded out. Geez, this must be almost 5 years ago, time flies by! Unfortunately my life has been very busy those years as I've been getting more social life (my previous life had nothing of that, hehe). Then went from school to work and started on other projects such as working on my car. That unfortunately means significantly less time for real dedicated programming. With only a few hours every other day, it's not easy to be just as into the project and work with the kind of dedication and addiction such a huge project requires. That's the reason for my activity fading out and it's unfortunately unlikely that I will ever come back as an active developer again. But, what I came here to say is that I'm really impressed with the quality of this community and the dedication shown here over all these years. And I'm very proud that I have been a part of it! It's very cool to see all these amazing resources still being made and that there are still people working very hard on MTA itself. All the hours being put into it! I hope MTA and the community will continue to live for many many years. There are lots of amazing mods out there for a lot of games, but the MTA community is definitly the coolest and the biggest of them all. Keep it going mates! Good work! Cheers from Norway, Christian "ChrML" Lundheim - Former MTA Developer
  3. ChrML

    Ped functions

    Peds will be serverside at one point. Not sure if this is for DP3 or not yet. Basically all the syncing code is there, it just needs to be written to flexibly allow serverside scripts to manage peds and being aware of their states, hopefully without depending on clients.
  4. I've noticed the lack of drawing functionality in dp2, so dp3 now contains a way to draw lines, for example a speedometer needle, both on top and below GUI.
  5. Report your crash dumps from the server here. Please only report dumps from dp2. It'll be of great help to us . You can upload your dump to a free upload site, your homepage or attach it to your thread, as long as we can download them. If you have a description of what happened around the time it crashed, please include that too. Thanks
  6. Looks like it should work to me. Add some debug output around and see if your events are called. The gui stuff should all be created inside the onClientResourceStart event.
  7. fileCreate and fileOpen should now work inside zipped resources from DP2 and newer. You also have a fileGetSize, so you can find the end of file without actually reading all of it.
  8. The mapmanager resource has a function to check: getRunningGamemode http://development.mtasa.com/index.php? ... ap_manager For example: local resource = call ( getResourceFromName ( "mapmanager" ), "getRunningGamemode" ) if ( resource ) then -- gamemode is running else -- gamemode is not running end
  9. The easiest way is putting the player that created a vehicle in the vehicle element using setElementData. ie setElementData ( createdVehicle, "creator", playerThatCreatedIt ). When a player exits, just loop through all the cars looking for a matching "creator" and delete it if the car is empty. If it's not empty, perhaps change the creator to the current driver of the car. There is no way to detect an element being created yet. We might have to add something like onElementCreate for a future release.
  10. niemi: That's to start the resource with the server. It doesn't have to be there. Just type "refresh" in the console once you've added your resource and then "start resourcename" to start it.
  11. Try this code local cars = getElementsByType ( "vehicle" ) for theKey,theVehicle in ipairs(cars) do local rand1 = randInt(0,126) local rand2 = randInt(0,126) local rand3 = randInt(0,126) local rand4 = randInt(0,126) setVehicleColor ( theVehicle, rand1, rand2, rand3, rand4 ) toggleVehicleRespawn ( theVehicle, true ) setVehicleRespawnDelay ( theVehicle, 5000 ) end
  12. Not sure what you mean by where MTA stores the player info. You can use getElementsByType to retrieve a table over all the players in the server. The onPlayerJoin events when he joins.
  13. You can do an isElement followed by a getElementType call to check if the vehicle is still valid in the timer functions .
  14. ChrML

    Player kick

    Any errors in the server console?
  15. No problem Mulder, example is good . Other than that that resource doesn't need an ACL entry because it doesn't use restricted commands/functions.
  16. Yep, there are known bugs to the engine functions. They will be sorted out as soon as possible.
  17. Try changing it to: LookAt can't be set in the same frame as the position due to a bug in dp1. Also you had a typo in your code, ste instead of set. If it still doesn't work, add some chatbox output to see if the code even executes.
  18. I believe I answered you in #mta.scripting, but I'll put the answer here so everyone sees it. fileOpen and fileCreate don't work inside zipped up resources in dp1. That's fixed in dp2. For now extract the resource to a folder.
  19. Do a /debugscript 3 in the console. Do you see any errors?
  20. Remember to restrict the maxping and the pingwarning commands. Add this to the Everyone group: <right name="command.maxping" access="false"/> <right name="command.pingwarning" access="false"/> And this to the group you want to have access to it: <right name="command.maxping" access="true"/> <right name="command.pingwarning" access="true"/> Mount: For safetyness, you can add a "true" argument at the end of addCommandHandler. Will make it restricted and disabled by default unless allowed by ACL.
  21. Yeah we do have a plan that you can include sounds just like any other resource file (ie a picture), and play it from the client. Will be added later after a stable r1 I guess.
  22. I'd run it on the clientside onClientResourceStart. Attach it to getResourceRootElement(getThisResource()). Like: addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), installSabre ) This will make it run when the player joins and is done downloading the sabre files and when the resource is started and you're done downloading. It should only require installing once, but MTA has some problems with the custom vehicle models atm so it might be a bit buggy. Will be fixed in a later preview version.
  23. There is such command built into MTA. Try /msg
  24. ChrML

    Help Errors

    getClientLevel no longer exists. It did before the ACL was implemented and got deprecated.
  25. You mean setting the ingame time to the same time as the real time? Use setTime, see wiki for details. If you want it to run at the same speed like the real time does, you probably need a clientside script that inside the onClientRender event forces the game time to equal the real time. function onRender () local time = getRealTime() local hours = time.hour local minutes = time.minute setTime ( time.hour, time.minute ) end addEventHandler ( "onClientRender", getRootElement (), onRender ) This will set the GTA time to the real time every frame so it can't go any faster. Not sure if it'll create some flickering though on weather or the clock display.
  • Create New...