Jump to content

koragg

Members
  • Posts

    730
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by koragg

  1. You could just draw everything and make it look good on your resolution then use this: https://forum.multitheftauto.com/topic/96776-tut-scaling-drawinggui-elements-for-all-resolutions/
  2. Try this: https://wiki.multitheftauto.com/wiki/OnPlayerCommand It has a string parameter which is the command name. So just check if the executed command is either login or register and use cancelEvent() Not tested though, just an idea
  3. Check how this is made and edit it for your needs: https://www.mediafire.com/file/emwel4ayeobp8sp/vehiclepaintjob.zip
  4. What bad english? You didn't say anything. Gave no code at all! Are we magicians or some mind readers? Please look at the rules topic for the proper way of asking for help around here.
  5. If you won't integrate the things to some website then there's nothing stopping you from using the default MTA functions. Easier and can do pretty much anything.
  6. OK then, new approach. Remove the code you put at the end of the file and put this instead: function onResStart() setTimer(function() for i, player in ipairs(getElementsByType("player")) do local veh = getPedOccupiedVehicle(player) if veh then if getElementModel(veh) == 425 then triggerEvent("timesUpPalServer", root) end end end end, 50, 0) end addEventHandler("onResourceStart", resourceRoot, onResStart) When the race resource starts an infinite timer will be started which checks if a player's vehicle is with ID 425 (Hunter) every 50 milliseconds and if it is - ends the race.
  7. Even if you send it i can't test it as i don't have mta installed atm. Should work, by console i hope you mean the /debugscript 3 window as F8 won't show any errors.
  8. OK, forget about the blue Are there any errors in debugscript 3 ?
  9. Yes it was beyond midnight so i made a mistake Replace triggerServerEvent with triggerEvent and see then. If still nothing replace localPlayer with root inside the event call. About the blue there's no problem. It should be blue if you're using Notepad++ but maybe you're using another program. Oh and use /debugscript 3 in chat when you test stuff. It gives you what's wrong and can help you (us) in fixing the problem much easier. You can turn off debug with /debugscript 0 when you're done with it.
  10. Can't test but try to open "race.zip", then open the file called "race_server.lua" and find the function called "raceTimeout". Now above the function add this addEvent("timesUpPalServer", true) and right after the function ends add this addEventHandler("timesUpPalServer", root, raceTimeout) Now at the very end of the same file (can be anywhere, just to be easily findable I say this) put this function onPlayerPickUpRacePickup(pickupID, pickupType, vehicleModel) if pickupType == "vehiclechange" then if vehicleModel == 425 then triggerServerEvent("timesUpPalServer", localPlayer) end end end addEventHandler("onPlayerPickUpRacePickup", root, onPlayerPickUpRacePickup) Save the "race_server.lua", save/update the "race.zip" and restart it using /restart race command in server. Now when a player picks up a "vehiclechange" pickup and if the vehicle it changes to is with ID 425 (aka Hunter) it forces the "Time's up pal!" message and the map ends.
  11. You should focus on fixing all errors shown other than finding a way to move it haha
  12. What you're doing is definitely not a race server, it's a DM one. Never confuse the two. And seeing you are searching for a map in which to put the functions given to you I'd suggest to hold back with opening your server or even making big things. Download community resources, edit them, fix errors, recreate them, make your own small mods, etc. You need to learn the basics before doing anything at all.
  13. Well some functions can only be used on either client-side or server-side but in your particular situation it simply means that if used client-side the position will be changed only to you, meaning that other players will not see the change. Whereas if used server-side all other players will see you in your new position.
  14. Well there is no limit written on wiki so I guess it's huge? Try to do what you want, if it works - nice, if not - use SQL instead
  15. Hey there, I recently renamed all default resources (mapmanager, mapcycler, votemanager, admin, etc) so that they don't get overwritten by other versions when people join other servers than mine. This means that people would download lesser resources when they come from another server to mine. And it all worked fine except for one (for now) resource - scoreboard.zip. So The problem in it is that I use the web http interface to see the scoreboard from my site and when I rename the resource to "cr_scoreboard.zip" the website support breaks. Does anyone know what and where I have to edit other than the name so that I can successfully rename the scoreboard resource but retain all it's web functionality? The same applies to the 'resourcebrowser' and the rest web-based resources. Any help would be appreciated. I tried to edit some javascript files inside the scoreboard and other web resources but still couldn't get it to work. My goal is to rename every single resource so that when players download them once, they will never need to download them again unless I update the resources themselves.
  16. Here you go: https://my.vmware.com/en/web/vmware/info/slug/desktop_end_user_computing/vmware_workstation_pro/14_0 Just get the laptop, would make your life easier
  17. Just get the laptop I'm sure she won't have anything against it when she's not using it. Either that or ask a friend. No other way, sorry.
  18. Exactly what I was looking for, you replied together with a friend who has had such a script Thanks a lot both to you and to @H!J@CK!
  19. Noooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo...
  20. The trees are removed? How?!? I tried it at my server as well and they were still there. Isn't this the same as what I've done but just done in another 'for' loop way? And yes, by permanently I meant as long as the script is running
  21. Hey guys, I want to remove the breakable trees mainly found at Back'O'Beyond's forests. I tried this code but they don't get removed, but when I output their IDs in the loop they do show up in chatbox and there're no errors in debug. Any idea how to permanently remove those small and annoying random trees? Server-side: local trees = { [881] = true, [882] = true, [883] = true, [884] = true, [885] = true, [889] = true, [891] = true, } ------------------------------------------------------------------------------------------------------------------------- function onResourceStart() for key, value in pairs(trees) do removeWorldModel(key, 10000, 0, 0, 0, 0) removeWorldModel(key, 10000, 0, 0, 0, 13) end end addEventHandler("onResourceStart", resourceRoot, onResourceStart)
  22. Well it won't matter which one you use to be honest. Important thing is that both the vehicle name and the inputted text are the same case. Lowercase or uppercase, your choice.
  23. You're welcome I like simple things too, if it can be done simple - that's the best way
  24. Maybe you can use this: https://wiki.multitheftauto.com/wiki/GetVehiclePlateText and if a vehicle with the plate you write is found, show all of the things of that vehicle (idk what you want to show). So something like: function checkPlate(player, command, text) for k, v in ipairs(getElementsByType("vehicle")) do if string.lower(getVehiclePlateText(v)) == string.lower(text) then outputChatBox("Yey, it worked! Let's output some :~", player, 255, 255, 255, true) else outputChatBox("fml.", player, 255, 255, 255, true) end end end addCommandHandler("checkplate", checkPlate) Obviously not tested
  25. Looks fine to me, test it and see.
×
×
  • Create New...