Jump to content

xTravax

Members
  • Posts

    665
  • Joined

  • Last visited

Everything posted by xTravax

  1. Hi there, I did a page documentation of one cpp file with it's 15 functions, what do you think, is it good? CAdditionalVertexStreamManager
  2. Yes, you're right about this. I completely forgot about it. If i want an idea to get going, I should contribute as well. I'll take your idea of grabbing function names and their parameters to at least start the base of documenting the MTA code I just have to figure out how everything works on Wiki, to not mess it up. I'll post updates here when I add some stuff to Wiki.
  3. What is stopping me from documenting this stuff? Lack of knowledge perhaps? Great, so you did some documentation back there, that's pretty great, so since you feel proud for doing that page, why don't you document more stuff then? (Uh please don't get this sentence like I'm trying to personally fight with you, I'm not). The people who currently work/contribute to the project certaintly know lot of code of it what it does, or what it probably does, it's easier for someone who already has the knowledge to document a function, rather than telling someone of zero knowledge of it like me to do it. I am wondering if you guys are just trying to cause a fight in here to get this topic and idea thrown away just because you consider me some selfish bastard who wants other people to do stuff for me, while I'm not doing that, but I'm rather suggesting this topic idea to everyone so everyone could contribute.
  4. I have no idea what the hell is your problem, I see you've barely read my posts, you probably just read some sentences and took them out of context to look bad. Where did I blame MTA Developers for lack of documentation, or even forced them to do any massive documentation? I have suggested that anyone could contribute to making documentation of MTA code, they don't have to be from MTA Team, they could be even random people. I didn't say that they are egoistick dickheads, I said that Arran portrayed them that way, because many requests get denied just because they can be done by someone else or because they don't have time for it. I understand how much current active MTA Developers work to keep this project up to date, and also MTA Contributors. I have no idea where you're getting information that I'm not respecting their work. Because it's really hard to get to know a code which isn't really too well documented, hence the reason why I made this topic in first place. I don't want documentation so just I could selfishly know how to code for MTA, I want the documentation so that everyone can get into contributing without spending months of testing and trying to understand how everything works in there since functions aren't really documented. Also, since you're so clearly bad at reading, keep in mind that I'm not making anyone to do this instantly, or forcing MTA Team to do this. I am suggesting that MTA code gets documented over time by any person. Function by function for instance, after a year or so the documentation could reach the half of MTA code perhaps, or even whole code, and make it easier for other people to learn how to contribute faster. With proper documentation, getting ready to contribute to MTA could take weeks or even days to learn, and at moment it takes months because of lack of documentation, and even after few months of testing and stuff, you still know very little. By this topic I am encouraging people to help out this project by documenting it, so that we would have more contributors in advance. I am not forcing anyone to do it.
  5. I was just waiting for someone to say this. "We are MTA Team, we have a huge ego, you should oblige us, screw you if you have requests, your request can be done in a very harder way, so why should MTA Team make it easier for you?" - This is exact thing what you're portraying right now. If you'd have read my post, you'd have seen that I've said that it could be done over time, not instantly right now. Throughout time file by file, or document by document could be documented. Those 17 pull requests are mostly sitting there, some of them get included over time. There would be way more pull requests if there was more documentation about the code. Right now, to become good at contributing what you'd have to do is spend few months learning, testing, experimenting how everything works, all by yourself, and probably wait for hours/days/weeks for someone to even reply to you how to do certain thing to code when you have no idea how to accomplish something. Even with Discord this takes that long. What do you have now, like 3-4 contributors and 2-3 MTA Staff members working on code, you really find that number of people to be so great? With bigger documentation that number would easily be able to increase, perhaps even to 20-30. This game might be old as well but it's still being played by a lot of people, and more contributors could mean that complex stuff such as custom animations, custom IDs and such could be much easily and faster implemented. I'm waiting for someone's reply which will say how I'm wrong and that it's just a waste of time (again).
  6. Good to hear that there is already pretty enough documentation to get started. I've checked the source code for a bit, and found out like I thought that there are lots of files e.g related to animations, but you can't really guess which one does what just from looking at names, you need to take a look on the code as well to get more into it. It would be cool though if at least some important files which are big or are constantly used if they at least could be documented on Wiki since there are thousands of files back there. If someone did a little youtube series on coding for MTA that might even be easier than writing all those Wiki pages haha. Definitely. Youtube came to my mind as I was writing this post, it might be even easier to do than create/code all those Wiki images. Some dev(s) when they get time could record at least basic stuff, how to compile, how to make your own Lua function in C++, and so on, it doesn't need to go into huge detail or series, but at least the basics, if the dev who records the videos wants to make more videos that's even better since people will more easily understand how stuff works. This youtube idea is like when you want to learn a new language and you start watching tutorials on that language, basically like that. I know my idea might be or sound exhausting but I just think that if this idea was partially or fully did one day, that in the future it would help out people who would like to contribute to MTA, and that is what I would like to see, more contributors, even I would like to learn how to contribute but it's a bit hard to start as I mentioned earlier Thank you for replying to my topic, if you want to say anything more related to this topic, feel free to do so as I'm interested what you guys back at MTA Team think of this
  7. Hello I would like to propose an idea. My idea is that MTA's full source code gets documented on Wiki. It might be a hard job to document everything, but there's no rush, it could go little by little until someday the whole source code is explained on wiki. Also there could be an introduction page where is explained how to compile mta by yourself, and how to do your first function, and so on (Similar how scripting introduction page explains Lua scripting) The reason why I'm proposing this idea is because contributing to MTA's codebase seems a bit too hard, and not very explained in my opinion, especially for the newer people who'd like to contribute. Simply put, even by reading source code itself, sometimes we don't know what something does even if it's commented in the code. I think that by achieving this idea we could get people into easier understanding how everything works and how to contribute since everything would be explained on Wiki. This would equal more pull requests,bigger and faster progress, and perhaps some more developers in mta team haha. P.S Writing everything on Wiki might take a long time, but throughout say a year I think it could be fully documented (It wouldn't be just 1 guy writing wiki pages, anyone who knows the functions and how they operate could help out by writing a wiki page, hell I'd even help out make the pages, a dev would just need to explain to me how a function works and I'd make the page if they don't have time do so) Thank you for reading, please tell me what you think of this
  8. can anyone help plz ?? i dont know what to check on performance browser to see what use my fps alot ...
  9. hello im having fps drops for unknown reason while using my gamemode, i didn't find anything useful on performancebrowser, what do i do? how do i detect what is causing fps drops in my scripts?
  10. this myth true ?? like 4096 slots vs 128 slots, will 4096 slots take more ram of server ??
  11. Oh god. @naser that is same code and it wouldn't work @dimos that's the same code with an error, using serverside function in client event (which also is unnecessary because the player is dead for sure) @dakilla i'm in a vehicle, i wouldn't make this topic if i weren't in a vehicle, why would i even want to destroy an un-existant vehicle anyway?
  12. addEventHandler("onPlayerWasted",root, function() destroyElement(getPedOccupiedVehicle(source)) end ) this doesn't work it says expected element at argument 1, got boolean can someone explain why this most easiest code in the universe doesn't work? i guess getPedOccupiedVehicle returns false when driver is dead, is there any workaround for this?
  13. xTravax

    PC Gaming Rig

    How much was the customs? (Croatian: carina)
  14. Didn't find it there. I thought that this was in oop or something because of ':' stuff. I will keep digging because i'm not using the default race gamemode, and this allign function could help me a lot. Anyway, thanks. If I run into some kind of problem, i'll make a post below. edit: for anyone looking for that Vector3D function location, it's in _commons.lua file in race gamemode.
  15. It would work? I don't see where would ':' functions be defined though..
  16. Labivilla i'm using my own race. @Noki that rotation thing works sometimes and sometimes doesn't. The vehicle doesn't get front directioned and 'flipped' like in the video, that's probably because setElementRotation works in some cases, and in some not, and maybe that's why race uses matrices/vectors, but i don't know how to do those. also, the thing is that if car is in air, and currently rotated like it's on roof, it should rotate the vehicle to front and not on roof normally, but i dont' know how to achieve that. edit: i believe this is how it's done in race but i don't understand it function directionToRotation2D( x, y ) return rem( math.atan2( y, x ) * (360/6.28) - 90, 360 ) end function alignVehicleWithUp() local vehicle = g_Vehicle if not vehicle then return end local matrix = getElementMatrix( vehicle ) local Right = Vector3D:new( matrix[1][1], matrix[1][2], matrix[1][3] ) local Fwd = Vector3D:new( matrix[2][1], matrix[2][2], matrix[2][3] ) local Up = Vector3D:new( matrix[3][1], matrix[3][2], matrix[3][3] ) local Velocity = Vector3D:new( getElementVelocity( vehicle ) ) local rz if Velocity:Length() > 0.05 and Up.z < 0.001 then -- If velocity is valid, and we are upside down, use it to determine rotation rz = directionToRotation2D( Velocity.x, Velocity.y ) else -- Otherwise use facing direction to determine rotation rz = directionToRotation2D( Fwd.x, Fwd.y ) end setElementRotation( vehicle, 0, 0, rz ) end
  17. hey guys how could i always flip a car in front direction? i mean look like here car is currently in certain rotation while at wallride, and when it hits the pickup it gets correct, and front direction rotation how could i achieve this front direction thing nevertheless of the vehicle state(whether its on roof, half on roof or not on roof at all) ? In race code it uses some vectors and/or element/camera matrix to calculate this, but i don't really understand it.. Thanks in advance
  18. hi i got a problem guyz i am using this sort of function to load DM maps but it dont work, it load all other maps even DD and Race function LoadDMMaps() for _,resource in pairs(getResources()) do if getResourceInfo(resource,"type") == "map" then if getResourceInfo(resource,"gamemodes") == "race" then if string.find(getResourceInfo(resource,"name"),"[DM]",1) then local MapName = getMapName(resource); local MapAuthor = getMapAuthor(resource); table.insert(Maps.DM,{resource,MapName,MapAuthor}); outputDebugString("loading dm maps... count: "..(#Maps.DM),0,0,187,255); end; end; end; end; end; setTimer(LoadDMMaps,50,1) why does this happen? it's suppose to put in table only maps which have [DM] in their names...
  19. hello, what would be easiest way to change value from e.g 0 to 20 (like goes up 0,1,2,3 to 20) and when it reaches 20 it goes to 0 like (20,19,28 to 0) and then starts doing this again over and over again(like a loop) thanks in advance
  20. Hi I've got this code: executeSQLQuery( 'CREATE TABLE IF NOT EXISTS SerialData ( serialPlayer TEXT, key STRING, value TEXT )' ) aType = {["number"] = true,["string"] = true} function setSerialData(serial,key,value) outputDebugString("setSerialData '"..key.."', '"..tostring(value).."'") if type(key) == "string" and aType[type(value)] then if getSerialData( serial, key ) then executeSQLQuery( 'UPDATE SerialData SET serialPlayer = ?, key = ?, value = ?', serial, key, value ) return true else executeSQLQuery( 'INSERT INTO SerialData( serialPlayer, key, value ) VALUES( ?, ?, ? )', serial, key, value ) return true end end end function getSerialData(serial,key) outputDebugString("getSerialData") if type(key) == "string" then result = executeSQLQuery( 'SELECT value FROM SerialData WHERE key = ? AND serialPlayer = ?', key, serial ) end if result and type(result) == "table" and #result > 0 then if result[1]["value"] then return result[1]["value"] else return false end end return false end function removeSerialData(serial,key) if type(key) == "string" then if getSerialData(serial,key) then executeSQLQuery( 'DELETE FROM SerialData WHERE key = ? AND serialPlayer = ?', key, serial ) return true end end end it works flawlessly, though there's one problem When i use those functions to store data on my serial, it works but if i log out and make completely new account and login to it, that data will get lost(returning false) for unknown reason Does anyone know why does this occur?it only occurs onPlayerLogin and this code above is not even executed when data gets corrupted
  21. its because it keeps certain data in appdata folder and in the registry, on another computer if mta isn't installed, usb portable wont work
  22. yes i am using teaEncode already and i didnt need that topic to get teaEncode idea by myself but this doesnt work please help someone
×
×
  • Create New...