Jump to content

CourtezBoi

Members
  • Posts

    35
  • Joined

  • Last visited

Everything posted by CourtezBoi

  1. Congrats on 20 years, and thanks to everyone who made the last 20 years possible. - Daniel Lett
  2. This video is a long one but a good one I think, let me know
  3. Feel free to let me know here what the issue is and I will certainly try to point you in the right direction When the server starts, loaded doesn't mean running. It loads all resources in the mods/deathmatch/resources directory by plucking out the meta.xml file, but the configuration file determines what gets started. More videos will be coming soon, as soon as my computer is repaired and I get it back from HP
  4. In this episode we dive deeper into OOP with lua and learn about __index and metatables!
  5. In this episode we take a look at MTA:SA's OOP methods!
  6. In this episode we build a payday system!
  7. You can embed the youtube link wherever you'd like, just please don't download the video and repost it, as that doesn't really help me at all.
  8. Creating your own MTA server with many scripts, yes. New Video!
  9. In this episode we hook our GUI up to the backend!
  10. In this episode, we discuss building our first GUI in MTA:SA!! We also dive a bit further into the event system, and how we can use it for custom events.
  11. In Episode 5 we cover how to use the ACL to build a basic staff system
  12. Episode 4 is up! In this episode we discuss setting up authentication using MTA's built in authentication system.
  13. Episode 3 comin' at ya! In this episode, we go over the basics of using Git to store changes to our code, and review the homework from episode 2!
  14. I've decided to try creating tutorials to teach scripting from the ground up. I get asked this a lot as a developer at Owl Gaming, and I figured it would be something fun to try! I really believe that what you learn as a Multi Theft Auto developer will help you later in life. Personally I've been scripting MTA servers for the past six or seven years, and have turned that into a career in web development, where I now work at Weebly, one of the website builders you see frequently used by people for their MTA server. So give it a try, and if you get good, come join me as a developer at Owl and let's make something fun together. In episode one, I cover the basics of setting up MTA for scripting your own server, and getting started with your first resources. In episode two I cover at a high level data types, creating your first SQLite database, and improving upon our vehicles resource so we can restart it without deleting all of our created vehicles.
  15. If you enable /debugscript 3 does it show any errors? Replace: if executeSQLQuery( "SELECT balance FROM banking WHERE account = ?", account ) then with if #executeSQLQuery( "SELECT balance FROM banking WHERE account = ?", account ) > 0 then Might work, I don't often work with SQLite.
  16. You're calling the database for the inventory server side, so you need to transfer that array to the client side, run a loop through that and insert the array into the visual table you're displaying to the user. Thats about all I can think of to say for method without seeing any code or exactly what you're trying to accomplish.
  17. Integer basically means a whole number, eg 1, 3, 12, etc. Primary key means that the rows are indexed and sorted by that item. So when you fetch the rows, they will be in order by your primary key. Typically the primary key is an automatically incrementing integer, so when you create a new row it sets the item automatically to the next number after the previously added entry. For your banking table, you only have account and balance, so your primary key would be account, though it wouldn't automatically be set, because you set it to link to the account ID. So you might do account REFERENCES accounts.id; or something along those lines to link between banking.account and your account id. This isn't necessary but it enforces referential integrity so you won't have any bank accounts that aren't linked to a valid account.
  18. addEventHandler ( 'onPlayerQuit', root, function ( ) local account = getAccountName(getPlayerAccount ( source )) local balance = getElementData ( source, 'Balance' ) if executeSQLQuery( "SELECT balance FROM banking WHERE account = ?", account ) then executeSQLQuery ( "UPDATE banking SET balance = '?' WHERE account = '?'", account, balance ) else executeSQLQuery( "INSERT INTO banking (account, balance) VALUES ('?', ?)", account, balance ) end end ) Haven't tested this but it should work for you.
  19. It's difficult to help you without some more information, code, etc.
×
×
  • Create New...