Rajat_Pawar Posted August 4, 2013 Share Posted August 4, 2013 Hello guys. I am here on the internet, to learn languages, I have learnt a lot (from C++, PAWN, C, SQL, VB, ASM85) and I just finished learning my last (PAWN from SA-MP). Now I am here, to learn LUA! What best to learn a language than where it's implementation is required? Anyways, LUA seems easy, though a bit not user friendly. I tried looking at the WIKI, all commands are easy, but the GUI screwed me up. Anyways, what would you guys suggest to START with? I have no idea where to start from. Where did you guys start from when you scripted? I tried a gamemode, and it's working. PS/OFF-TOPIC: I loved MTA's account saving system and not having to save it manually. Is there a way to get it and show it on webpages, EXCEPT MySQL? Link to comment
myonlake Posted August 4, 2013 Share Posted August 4, 2013 I begun scripting in Lua a few years ago and the thing I did was pretty much testing community resources and making changes or adding additional features to them. I read the Wiki a lot and tried out all the fancy functions and events and pretty much experimenting gave me a better picture of the language and right now I must say everything is possible and there's nothing that could stop me from doing something. For your question, when you do the function getAccounts() it gives you a table. Now most likely if you know anything about PHP, you could while/for-loop the table and then display all elements in the table on the website with the callRemote() function. This is what I think could work. Of course MySQL is an option but if you want to make it some way else then I guess this is one of the options you can use alternatively. It's nice to hear that you look for other options as well instead of going with the mainstream options that all servers use (usually the mainstream stuff are efficient and powerful than any other options - but trying out is never for bad). Also about your GUI problems. I had the same issue when I looked up the GUI functions and events. I literally knew nothing how they worked and I had problems making anything work. I found a boat rent script on the community site and I used it as a base ground for learning. I changed the label and button texts, which was a big thing for me even though it's a very small thing. Then I started understanding that you can actually resize the window size and do stuff with it. Then I found ways to create nice and working GUI windows and use them with the server-side script. After all the manual setting I found the GUI Editor and that's the only thing I am using nowadays to create GUI stuff. Sometimes I create them manually if it's a simple thing (all DX drawings I do manually always) but the GUI Editor is great when making complex and big stuff - especially when you want everything to look precise and fancy. You could try the GUI Editor as well. Remember, you have to make the actual GUI functionality yourself client-side. There are small example snippets in the Wiki, use them and use the community resources as well (try to grab a small resource at first). https://community.multitheftauto.com/in ... ils&id=141 P.s. There are a lot of community made tutorials here on the forums. Use them as well - most of them are very useful! Link to comment
Rajat_Pawar Posted August 4, 2013 Author Share Posted August 4, 2013 Thanks for that long, detailed and nice reply. MySQL is a bit tiring and I (feel) have worked with it enough to last a lifetime! I can try that PHP callRemote method, but I am doubtful if it is secure (enough) ! I have been thinking about starting a cops and robbers server here because upon research I found out that there are no proper CNR servers here! Anyways, thanks for that reply. I am going to try create a game mode with basic CNR functionality! Cheers! EDIT: Where do you PASTE the GUI editor files? I have no idea. QUESTION: Is it necessary to use ACL for admin scripts? Can't I do something like: 1) Save a field in player stats named "AdminLevel" 2) Check if it is above 0 3) Allow the player to use a certain command only then Link to comment
motax Posted August 4, 2013 Share Posted August 4, 2013 Yes, it's possible without ACL, you can use SetElementData and then GetElementData after that an if statement. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now