Jump to content

Anderl

Members
  • Posts

    2,266
  • Joined

  • Last visited

Everything posted by Anderl

  1. @Cadu12, that won't do the job, I guess. I think that what is happening is that the gamemode is killing the ped when he enters and it calls onPlayerWasted then.
  2. Didn't I just tell you million times that it's not: pixels .. ".png" But: "file.png" ? Is it that hard to understand that?
  3. The statement with "not varArgs" condition is not needed, it was just to show you that it would not work outside of the scope ( in this case, out of the if statement ). So: A local variable out of anything -> not shared with other files; A local variable in a function -> not shared with the rest of the script, it's only shared in the function and ONLY if it's out of a statement or any function inside of that one. A local variable in a statement/function inside function -> not shared with its "main function" neither with the rest of the script.
  4. Anderl

    Lua help

    Just read one? Everybody reads whatever he wants, so you read any.
  5. To be more accurate, a local variable is shared ONLY in the scope it was defined. Example: function myFunction( ... ) --blabla my code if ( ... ) then local varArgs = { ... }; outputChatBox( varArgs[1] == "I like cookies." and "..............................." or varArgs[2] == "I love them." and "No, you don't.", root, 255, 255, 255, false ); end if ( not varArgs ) then outputChatBox( "varArgs not defined in this scope.", root, 255, 255, 255, false ); end end Output: ............................... / No, you don't. varArgs not defined in this scope.
  6. Tenho estado um pouco ocupado mas se alguém tiver um projeto que pareça interessante e esteja afim de pagar uma quantia justa de dinheiro pelo trabalho realizado, me contacte.
  7. You wrote "setElementPostition" instead of "setElementPosition" and forgot a '=' after variable names.
  8. Isso é só para rir, não? Um ficheiro não é mágico para escrever uma linha "isPedDead" e ele vai adivinhar o que você quer. MTA usa Lua e as funções todas estão inbutidas em Lua. Se você não sabe Lua, não pode fazer nada.
  9. Alternatively, you could also try this dpkg package for CentOS: http://pkgs.org/centos-5-rhel-5/epel-x8 ... 4.rpm.html.
  10. Without knowing which system you're using it's impossible to tell you the right commands. Check if your system is CentOS, if it is use these commands: yum update; yum install dpkg; The code above that says that is for Debian won't apply for that system, anyway.
  11. Já lhe falaram os eventos e funções necessárias acima. Se você não consegue entender como fazer, é porque não sabe nada sobre Lua.
  12. apt-get update; apt-get install dpkg And then run the codes that didn't work.
  13. É melhor você começar a estudar Lua primeiro.
  14. Debian is an operation system, lolz. For your problem: You gotta install libreadline over SSH.
  15. O código apenas não tem nada haver com o que você quer fazer e não faz o menor sentido porque você se limitou a copiar partes de outros códigos.
  16. Graphic card is only the main thing when the game is GPU bound. There are lots of games that are CPU bound like BF3.
  17. Use mysql_error to get more details about the error.
  18. Why the hell do you need an i7 with an old HD6800 series card? Should have came with an i5 and a better graphics card if the machine is for gaming. i7 is waste of money because it gives like 1-2% more performance than i5 and basically everything. Not worth the money unless you do video rendering/image editing.
  19. You didn't understand what I said.
  20. If you don't like to wait why even make topics requesting help? People only help if they want, when they want.
  21. Anderl

    I need help.

    It doesn't take file as a parameter, it takes a string with a code. http://pgl.yoyo.org/luai/i/loadstring Example ( this example only works in any software with default Lua package ( e.g. Lua interpreter that comes with Lua for Windows ): local luaf = io.open( "file.lua", "r" ); -- this opens a file with read permissions assert( luaf, "blabla lua file not loaded" ); loadstring( luaf:read( "*all" ) )(); -- loads the code that is read from the file --now tries to call a function from that file if (initSomethingElse()) then print( "Yes, it did work." ) end And for MTA:SA, no, you don't need any download function. Just use file functions. Of course, to do that you need to make sure everything that everything the client-side file needs is already downloaded ( all that can be easily programmed not to be downloaded, and I mean it gets loaded/the client receives the file but without actually downloading the file ).
  22. Anderl

    I need help.

    Alternatively, you could make a custom "downloader" and use loadstring to load your code instantly so you don't need neither to wait download to end or to have to do all that with server-side text functions.
×
×
  • Create New...