Jump to content

Orange

Members
  • Posts

    327
  • Joined

  • Last visited

Everything posted by Orange

  1. I lost the wiki :F Anyway, here's simple code: SQL = MySQL:Connect("host", "user", "pass", "db", true) -- the true means that if the connection to the database is lost, the script tries to reconnect local Query = self.sql:Query("SELECT * FROM users") -- executes a simple query outputChatBox(Query:numRows()) -- prints the number of registered users on the chatbox Check the part "MySQL.return" on http://docs.openframe.co.cc/files/serve ... s-lua.html in order to see which other functions can you use with the Query variable. btw, the docs aren't updated, there's also a function called :itTable, which you can use with ipairs ^^ If you want to use the query generator, check README.txt in ActiveRecord class ( viewtopic.php?f=108&t=33727 )
  2. That's pretty easy project. It just needs more improvements, which author didn't mention: 1) Important thing, we DO NOT NEED TO RENDER BLOCKS UNDER THE GROUND LEVEL! (which makes it as simple as ONLY with this method, the distance that you can see can be 27x27, which isn't really small ^^ 2) You can REPLACE BLOCKS with groups of them. Are you on the ground? Use 2x2 group of blocks, that's pretty easy to do If you're on a flat green area, you can mix them into 3x3, which makes the view as large as 81x81, AWESOME THING LULZ. Now, find a scripter less lazy than me who has enough skill and continue doing the idea
  3. Orange

    Tazer

    Check my old resource: https://community.multitheftauto.com/index.php?p= ... ils&id=529 Just change the weapon from Deagle to a weaker one
  4. @will: you're doing the same, lulz Anyway, I think that it's just making the server less overloaded. Who needs it? IMHO, nowadays, no server have that bad capacity so they can't perform special actions.
  5. Well, I always wanted to ask this question. Does ANYONE use the object-oriented LUA? Maybe "halfly object-oriented", because there's a lot of work to create a class of every element, and people are too lazy :F I hope that someone does, I don't want to be the only one person in MTA scripting scene, who uses OOP lua :F
  6. 1.0.1 released, lulz. I won't update anything in that package, check out the classes
  7. Finally, I'm releasing something for OpenFrame. Here's the MySQL Active Record class. It's a simple query generator - you'll be sure that you won't make any query errors with it ^^ CHECK README FOR USAGE AND INSTALLATION TIPS REQUIRES OPENFRAME 1.0.1 FINAL Download: http://code.google.com/p/mta-openframe/downloads/detail?name=activerecord-1.0.zip Have fun and stop asking SQL questions on Scripting forums :F (If it doesn't work, tell me it, because I'm using a newer version of openframe than the 1.0f)
  8. I've got 1 question. What would I get from that?
  9. Orange

    Errors

    You don't need them. If you don't write a "local" before the name of variable, it'll be global
  10. I've converted some maps to MTA:SA, but they're just big FAILS. I thought that "de_rats_1337" would be good, but without ladders, it sucks. You can try to convert the maps. Here's how I do that: 1) get the bsp file of the map 2) use bspviewer or somewhat to export it to .obj or .3ds file (I've forgotten the ext) 3) using ZModeler or 3ds Max or GMax, convert it to dff. Also, you have to export the textures, which needs more work (each texture is in another package)
  11. No, you can't. CJ uses TXDs packed in file not replaceable by mta
  12. A bit offtopic, but... Uniwersytet znajduje się gdzie?
  13. AHHAHAH! Someone wants to steal my script's idea You failed, sir Google this crap and script 10 lines, as I did!
  14. I did same but without nightvision. Anyway, good work. I hope that it's more optimized that my script
  15. Yes, of course. As far as I remember, you can't share same database using SQLite (it's bundled with mta server), while MySQL is other application.
  16. Remove SET = SQL_MODE "NO_AUTO_VALUE_ON_ZERO";
  17. In my opinion, both databases are for other usages. I use MySQL for storing thousands of informations - from items bought ingame to statistics, while SQLite might be used for smaller amounts of data. Imagine something like that: We have to read 2000 rows from database. MySQL: 1) Module connects to the database server 2) Executes the query 3) MySQL SERVER tries to get the data, while MTA Server isn't really overloaded. 4) The server returns the information from database - this one is faster SQLite: 1) MTA Server opens the large SQLite database 2) Executes the query 3) MTA SERVER tries to get the data - if the performance of the server isn't good - the server may be overloaded, so, for example, network troubles may happen. 4) MTA Server gives the info to the script Again, let's imagine a smaller database: about 100 rows. MySQL: 1) Module connects to the database, it's about 10ms when on same server (initialization) and more if it's in other 2) Query 3) Returning - next 10 ms SQLite: 1) Server instantly reads the file 2) Makes a query 3) Returns data - it should be about 2 times faster than in MySQL That's all. Anyway, when using MySQL in both cases, YOU WON'T NOTICE THE LAGS (unless your MTA Server is in Europe, while MySQL in Chile O,o). That's why I use it ;P
  18. You can try to create a rendering engine using DirectX functions, but I'm not sure that it'd be fast
  19. Remi-X, we know eachother from clan... Was it called USP or somewhat? You remember that I was a noob scripter in that times. Now I am pr0 My current project is a multistate multi-gamemode imitating script made using OpenFrame (I am doing it fully OOP). Maybe think about things like that? Whatever, learning "really advanced LUA" is impossible - LUA is too simple Go into OOP and improve your theory and practic skills - create OOP gamemodes etc. My server (Andromeda Race/DD/DM) has fully OOP script
  20. Hai! Can someone create a replace script for this mod: http://www.gtagarage.com/mods/show.php?id=8203 ? Because I can't find the IDs :F
  21. @The Kid: Lal, the prob is I am a 3d lame :< I can't export .dffs - they crash MTA @kevenvz: I won't release full source code (I mean, I will compile it) - the gm will be extendable using third-party resources @dzek: Counter-Strike does something else, but (of course) that's a good idea. The prob is I am 3d lame (again same ). What do you think about 2d images?
  22. @CHC: Not SAME but smiliar - using SAME coords for wall, effect is SAME, but code is other. I tried to add hands, but it isn't possible - it will result few ugly lines on the screen.
  23. Sorry for doublepost, but: setPedAimTarget doesn't work for local players, so I decided to again use EvgeniZ's idea (well, the new script is still in code, but commented - I will uncomment it in 1.1 ;P) Files got somehow big (lol) and I couldn't upload them to my host :< I have to put links here - these images show how do weapons look in the FPS camera - now working with HUD: M4 - pretty nice, zoom works well: http://aservers.pl/csmod/m4.png Deagle - small weapon, so it doesn't look really nice: http://aservers.pl/csmod/deagle.png Knife - OMFG, it sucks - when you sprint, knife is sometimes on the screen and out of it - but when walking, it looks mostly fine (it also disappears): http://aservers.pl/csmod/knife.png
  24. So, can you write a short text for me? My English isn't really good
×
×
  • Create New...