Jump to content

JR10

Retired Staff
  • Posts

    2,947
  • Joined

  • Last visited

Everything posted by JR10

  1. 'veh' is a string and not an element. I'm guessing getElementData(veh, 'vehicle') is the vehicle you want to use, so just use that instead of 'veh'.
  2. It's done by replacing other skins using engineReplaceModel and engineImportTXD.
  3. onClientGUIClick > guiGridListSetSelectedItem(gridlist, 0, 0)?? If not, please explain better.
  4. source is not defined in setPlayerSpawn, you need to add it as an argument. addEventHandler ( "onPlayerLogin", getRootElement ( ), function ( ) setPlayerSpawn (source ) end ) function setPlayerSpawn ( player ) setPlayerSpawnPosition ( player ) end function setPlayerSpawnPosition ( player ) local positions = { { -894.90002, 1963, 0.6, 14 }, { -893.40002, 1963.4, 60.6, 14 }, { -891.79999, 1963.8, 60.6, 14 } } local randomize = math.random ( 1, #positions ) spawnPlayer ( player, positions [ randomize ] [ 1 ], positions [ randomize ] [ 2 ], positions [ randomize ] [ 3 ], positions [ randomize ] [ 4 ] ) end
  5. viewtopic.php?f=148&t=38203 I would suggest saving logs in .txt files instead of SQL.
  6. table.sort(mytable, function(a,b) return a.number > b.number end)
  7. Server: addEventHandler('onPlayerLogin', root, function() triggerClientEvent(source, 'reqBrowserDom', root) end) Client: addEvent('reqBrowserDom', true) addEventHandler('reqBrowserDom', root, function() requestBrowserDomains({"mtasa.com", "facebook.com", "fbcdn.net"}) end)
  8. The scenario you mentioned is okay with the flow you suggested. Now imagine play time, there are no native functions to manipulate play time. Are you going to query the database each time the play time is updated? I hope not. You can use element data as a session storage, when the player leaves, you can get the element data and save it into an SQL database. You can also use tables instead of element data, with each player as the key, it's more efficient this way.
  9. Check this one: viewtopic.php?f=148&t=38203#p393074
  10. There's a visibleTo argument in createBlip, you can use it on the players in the team.
  11. JR10

    DX

    Mainly with dxDrawRectangle and dxDrawText. Take a look here: https://github.com/Woovie/dxGUI
  12. Ranking up with different weapons for each rank, getting more armor, more health, better clothing (Like hats, t-shirts, visual only). Also, earning money to use on those "small activities" you mentioned.
  13. Already suggested numerous times. If it was easy, it would have been made by now.
  14. Make sure you have the latest MTA server version and re-download the latest version of the resource. The resource is tested in the latest version, everything should work fine.
  15. Languages are made to suit a specific purpose, like making web apps or native programs, and all can achieve a lot of things. They are all powerful, as powerful as you make them. And I'm not going to be the asshole who mentions Assembly. It depends on your goals. Do you want to develop desktop apps? Websites? Mobile apps? If you want to develop for desktop, then you need to decide between cross-platform and Windows. If your main target is Windows, learn one of the .NET languages along with the .NET framework. Of course, C# is an instant recommendation. If you want cross-platform, learn Java. You could also Google the differences between Java and C#. Read about Python as well. If you want to develop web apps, you will need to learn the front-end languages, that is, HTML, CSS and JavaScript. You will also need to learn a back-end language, like PHP or the Node.js platform (JavaScript ran on the server). If you want to make mobile apps, learn Java (Android) or Objective-C/Swift (iOS). I would say the easiest to learn for beginners (imo) is Python. It's simple, yet powerful. You can make desktop and web apps with it (with frameworks), and it will teach you the very basics. And just stay away from C/C++ for now, it's not easy to learn, especially for beginners.
  16. If you're talking about walking and running then it's possible with setPedControlState.
  17. You're better off using getCursorPosition since you're using dx and onClientRender.
  18. I'm guessing you removed the classlib file. Just remove the Cursor.lua file from the meta.xml and try again. If it still spits errors, just download the latest version and don't mess with the meta.xml. If you haven't removed anything, I guess I will have to take a look.
  19. Again, knock yourself out.
  20. No one's stopping you. If it was simple it would have been done and added by now, it's not.
  21. There's a setting for it in meta.xml
  22. Stop discussing it here.
  23. JR10

    |REL| Rob system

    viewtopic.php?f=91&t=31891#p340283
  24. https://github.com/Woovie/dxGUI/archive/develop.zip
  25. JR10

    Server RAM Usage

    No, it's not normal for a local server with 1 player to consume 1.2gb of RAM. Use the Lua Memory section to find out what's consuming that much.
×
×
  • Create New...