Jump to content

.:HyPeX:.

Members
  • Posts

    1,255
  • Joined

  • Last visited

Everything posted by .:HyPeX:.

  1. .:HyPeX:.

    Radians

    Well, great, thanks a lot!
  2. .:HyPeX:.

    Radians

    Yeah, just came across the math.sin and math.cos expected radians (Why? thought they expected just degrees) and apparently, thats the reason... But my question still persists, why using radians in sin/cos instead of direct degrees...?
  3. I belive as the wheels are part of GTA's mechanics that they cannot be removed/modified. I had an issue related to this awsell some time ago, not sure if it was fixed or changed in 1.4 thought.
  4. .:HyPeX:.

    Radians

    Hello guys, could someone be kind and explain me radians a little better? I finished school year and dont have my maths teacher to ask to.. So this is my question pretty much: -- i = 0-360 local width = math.cos(i) local height = math.sin(i) This makes an oval, it wont make a perfect circle, even thought it should. But: --i = 0-360 local width = math.cos( math.rad(i) ) local height = math.sin( math.rad(i) ) This makes a perfect cricle, and an explanation why it does would totally appreciated. Greetz PD: I've readed all over the internet, but couldnt find a place that related cos & sin to radians, and cant get to understand radians itself... I do understand how sin & cos work, so that part can be skipped...
  5. Yeah, basically wiki is for the kind of people like: "Umm so i draw a text with dxDrawText and stuff.. what what the syntax...? Or maybe a createText object.. lets check how thats it" Anyways On-Topic: Usually people miss it a bit, but you actually need to learn Lua first, then go over MTA's API (Wich is actually the wiki kinda, lel), else you might get confused on theorical stuff.
  6. .:HyPeX:.

    Help

    Yep, its actually function(source,cmd)
  7. Actually, my final code isnt laggy, tested it with some really slow PCs. The prototype was lagging becouse it was drawing ~ 100 circles wich were made of about 20 dxDrawLine themselves.
  8. Been on Wiki for a year now: https://wiki.multitheftauto.com/wiki/DxDrawCircle In a start i used that to write draw the small circles in the first prototype, proved too laggy and not so good looking, so i rewrote mine down again to skip using that function How so?
  9. Hello everyone, today i came across radians, sin, cos and stuff, and in a start i tried to make smth like this... But in-game prototipes were awful, so keeped playing, and finished doing a function for making animated circles but with lines... (Since using circles again proved extremly laggy aswell ) I asked my friend MVM to record it for a clear demonstration of the animation... PD: This is just a test script, it contains a basic loop of the function with this: I had no idea what to do with this so if it is usefull, please tell me, if you want the function pm me on skype @tsbreuer
  10. try this if (string.sub(message,0, 1) == "/") then or this if (string.sub(message,-1) == "/") then
  11. Te pregunte porque lo guardas como un string, no que lo guardes como un string. Sorry for spanish Ah, no idea lel, i was just randomly writing numbers down to give an example
  12. No, i'll save it as a number. This number will be given by the race resource (getTimePassed or smth).
  13. Yeah i had aswell an issue with that, you should then later on set the position with setElementPosition if necessary.
  14. Hello guys, i want to order a table so that all the rows are in numerical order by the first value of each table. How to do this? Example: local luaTable = { {time="200", acc="crap", name="shit"}, {time="300", acc="crap2", name="crapy"}, {time="100", acc="crap5", name="shiity"} } local NewTable = orderTable(luaTable, 1} function orderTable(table,Pos) for i,v in ipairs(luaTable) do if table[i][pos] > table[i+1][pos] then end end end -- It would end something like this: NewTable = { {time="300", acc="crap2", name="crapy"}, {time="200", acc="crap", name="shit"}, {time="100", acc="crap5", name="shiity"} } the function is just a random wild guessing i'm doing, i've got no clue to what to do here. Greetz
  15. No, i want to add a table to the first table! @Feche1320 - It would be much easier to have a sub-array for my own purpouses
  16. No, not really, but i could use that too. What i meant is this (or something like it, should work for explainatory purpouses): local db = dbConnect("sqlite", "crap.db") local dbExec( db,"CREATE TABLE IF NOT EXISTS table_MyBootTable();") local dbExec( db,"CREATE TABLE IF NOT EXISTS IN table_MyBootTable table_SubTable(Column1, varchar);")
  17. Hey guys, i'm using a database to store stuff and i was wondering if it was possible to have a table inside another table in databases...? Greetz
  18. Hello guys, how can i remove/hide the | bar while writing in the edit boxes? Greetz
  19. Well that's not working so i'll try this new way. Thank you guys!
  20. were you found this "attribute" to the onClientRender? just to know
  21. The race resource gets messed up becouse destroying the car makes all the "cache" variables the race is using nil making it go totally wrong causing huge errors. In the end restarting is the only solution else than kicking the player.
  22. The race resource gets messed up becouse destroying the car makes all the "cache" variables the race is using nil making it go totally wrong causing huge errors. In the end restarting is the only solution else than kicking the player.
  23. They're both post_gui true, and i'm drawing dxDrawImage before dxDrawRectangle. Still dxDrawImage is shaded by the rectangle... i belive this is due to the fact one is dxDrawImage and the other is dxDrawImage, but there should be a way arround this..
  24. Well then i'm not really sure what it is there for, normally you'd expect a debug for that..
×
×
  • Create New...