Jump to content

Anubhav

Members
  • Posts

    2,277
  • Joined

  • Last visited

Everything posted by Anubhav

  1. Right! Make a invisible ped. Not really attach it, you could probably use setElementParent and then getElementParent? createPed setElementAlpha setElementParent getElementParent
  2. Anubhav

    Tables

    Or this: local stuff = {} stuff[1] = {1, 2, 3} stuff['proThingBro'] = {131931,3131,13131} for i, v in pairs( stuff ) do local string = tostring( v[1] ) ..","..tostring( v[2] )..","..tostring( v[3] ) outputChatBox( string ) end They're very useful for many things. You can use them for complicated stuff too, and they also are fast.
  3. A: To be. Q: Who created the book "Learn Python the Hard Way"?
  4. Then what is above the spinner that 100 MB.etc? I get it every server I visit.. probably my wooden laptop
  5. A: Life is the time you spend after using computers. Q: What is what?
  6. Anubhav

    problem

    dxDrawTextOnElement is defined? It should be this: addEventHandler("onClientRender", getRootElement(), function () for k,v in ipairs(getElementsByType("player")) do if getPlayerTeam(v) == getTeamFromName("Army") then if not v == localPlayer then dxDrawTextOnElement(v,"Army",1,20,0,255,0,255,1,"bankgothic") end end end end) The problem is when you're looping through a table, localPlayer (the client running the script), when that player element comes, it will stop the loop completely by using return. If there were 10 players and his number was first on table, it would not show it. Use "not".
  7. Anubhav

    The last reply

    nah its just i wasnt here.. Bali is a badass place
  8. [quote name=..&G:..] So... wut is this? On my server it shows about 1000MB on top of that spinny thing, and it appears again when the login panel is displayed, freezing the client for a minute or so. In older MTA versions, there was nothing like this, just freeze, (i think). I think it is a loading sign of resources maybe?
  9. organisation* seperate* Indentation (4 spaces is best) is how I really make my code look clean.
  10. yes. because it is easy to compile the code rather than taking years and waiting for the website to load.
  11. I'm not a pro C++ developer, but clearly you got some things wrong there. DirectX is nothing more than Microsoft Windows' 3D graphics library, so it is not a language by itself, to start with. GTA V, on the other hand, uses DirectX, not OpenGL (have you ever seen the DirectX version option that GTA V has in its graphics settings?). And I have never heard the words "coordination dll". GTA: SA, GTA IV and GTA V are very different games, and making a mod like MTA: SA work with any of them is a very difficult task, because although MTA tries to build its own engine on top of GTA: SA, it still depends on assembly hooks and memory manipulation of the game itself. And, as you can probably conclude, GTA: SA executable and memory has (almost) nothing in common with GTA IV or GTA V ones. Back to the topic, I think that Lua is fine to use as a MTA: SA scripting language. Sure, it is not the fastest and most known thing out there, but it is designed with embedding in mind, it has a good learning curve, it is well documented, it is powerful and, most importantly, safe. C++, on the other hand, is lower-level, and things like memory manipulation are difficult to sandbox without reducing functionality. So, in the end, C++ doesn't simply cut it. That was some nice information.. Thanks. Also if C++ was better, why wouldn't MTA Team choose C++ only?
  12. Better idea: You could do this, save the source code and encrypt it in a file, then de-crypt it and open the code. The player could edit it and choose if he wants it to get compiled and still will be able to use the source code. There will be a source code file ofc.
  13. Dude he did not ask for the code and the problem is solved. He had a doubt about the operators. Also that untested script won't work. Try to find the problem yourself.
  14. are you blind? he was giving a example, but that won't help either. I have no idea how to do this and editing of the example and making defining element should be done by the @OP.
  15. Anubhav

    security

    hide your keyboard and write while your friends see the password at the screen
  16. You give me a hard laugh. Did you just copy this topic from somewhere?
  17. DELETE: https://community.multitheftauto.com/in ... s&id=12713 DONE
  18. Anubhav

    set timer

    killTimer also.
  19. You should use CREATE TABLE IF NOT EXISTS
  20. Use it client-side.
  21. Yes, that is what the code does, but it is a bit strange nevertheless. If the file is big, that tiny code will be a CPU and memory hog, and I think that unless you are trying to hash something untrustful securely it is not necessary to hash the file by parts. And by the way, if you need more confidence against hash collisions, you can use the SHA512 algorithm MTA provides. After studying that resource of the file, I reliazed that he used it to get the file's md5 hash string. Like when you download they show you that original file's MD5, sha hash.etc, I assume it is used for that purpose.
×
×
  • Create New...