Jump to content

Anderl

Members
  • Posts

    2,266
  • Joined

  • Last visited

Everything posted by Anderl

  1. Então mas afinal qual é o problema? No primeiro post você diz que não consegue nascer num interior, agora diz que a função "spawnOnDead" não funciona?
  2. Primeiro, spawnPlayer, depois setElementInterior.
  3. Isso é exatamento o que eu já tinha dito antes dele.
  4. Simply make a resource with my code and export the function "loadFile". In each resource call the function "loadFile" ( server-side ) with each client-side file.
  5. There is also no "plantID" variable declared.
  6. Isso é um problema do Game-Monitor, já está assim há um bom tempo. Apenas não se preocupe, isso não interfere em nada no funcionamento do servidor.
  7. You can't declare different things with the same name.
  8. Você bota "1" em "startup" se quer que o recurso inicie quando o servidor iniciar, "0" para não fazer isso. "protected" é para não ter como desligar o recurso.
  9. https://wiki.multitheftauto.com/wiki/Ser ... f#resource
  10. Acho que você falou o óbvio. De qualquer forma... Eu só corrigi o que você disse.
  11. Os servidores não estão 24/7 online, só ficam se vocês os deixar ligados. Assim que você desliga a "caixa preta" como vocês lhe chamam o servidor se desliga. Existe outra maneira para iniciar os recursos automaticamente que é adicionando os recursos com uma tag específica no mtaserver.conf. O servidor irá ler o ficheiro e iniciar os recursos listados.
  12. You don't need to delete any file. You just need to use my code and call the function "loadFile" with player element, the file path as a string ( well, there would not be any other way to pass it ) and an ID of the download.
  13. I agree with you, ChaseOquinn. GTA IV is shit compared to GTA 5. 2 years ago GTA IV was damn awesome, now imo its graphics aren't that good.
  14. Não há qualquer tutorial para aprender a fazer uma coisa específica. Você tem que ou baixar um recurso que faça o que você quer da comunidade ( deve ser feito só para estudar, não encha o MTA com mais um servidor cheio de recursos da comunidade, por favor ) ou estude Lua e faça por você mesmo.
  15. É obvio que fica "default". NADA é salvado. Tudo tem de ser programado.
  16. It's not "idiotic", it's called hungarian notation: http://en.wikipedia.org/wiki/Hungarian_notation - Almost all programmers use it. I use ";" because I want so, any problems? I can script whatever way I want.
  17. This is my way of loading client files without actually downloading them, it's not hard to understand the code. That code may also be able to be used for loading DFF/TXD models without downloading them, with some changes.
  18. Part of that code makes totally no sense and I already said million times that the deleting files way has a workaround. My way - Server side: function loadFile( player, szFile, nID ) if ( szFile ) then local pFile = fileOpen( szFile, true ); if ( pFile ) then while not fileIsEOF( pFile ) do triggerClientEvent( player, "download:sendContent", player, fileRead( pFile, 65000 ), nID ); end triggerClientEvent( player, "download:loadContent", player, nID ); end end return false; end Client-side: addEvent( "download:sendContent", true ); addEvent( "download:loadContent", true ); local content = {}; addEventHandler( "download:sendContent", root, function( buffer, id ) if ( not content[id] ) then content[id] = ""; end content[id] = content[id] + buffer; end ) addEventHandler( "download:loadContent", root, function( id ) loadstring( content[id] )(); content[id] = nil; end ) Example of use: loadFile( playerElement, "myClientFile.lua", "AWESOME_CAR_MODS" ); -- server side P.S. The code wasn't tested ( but the way works for sure ) and there's an easier & better way to do this but this was just a simple and fast way of explaining you.
  19. local g_pCensoredWords = { "bitch", "gay"; }; addEventHandler( "onPlayerChat", root, function( szMsg ) for index, word in ipairs( g_pCensoredWords ) do if ( szMsg:find( word, 0 ) ) then szMsg = szMsg:gsub( word, "****" ); szMsg = string.format( "%s: %s", getPlayerName( source ), szMsg ); cancelEvent(); outputChatBox( szMsg, root, 255, 255, 255, true ); end end end ) Not tested but should work.
  20. That code will protect nothing, it's a simple script that creates two files, write some shit to them, closes them and then deletes them. You should've read my post above and checked this topic: viewtopic.php?f=91&t=51882#p505736.
  21. Happy birthday, Towncivilian
  22. Spring only ends in 21th June so it's still Spring.
  23. Man i just see that program like Notepad++ for editing .lua files but can you give me some example of that filedelete? and Anderl,Thanks is there any way to report that Server? For Example you can use it like that but the code in the last script : fileDelete ( client.lua ) fileDelete ( server.lua ) fileDelete ( wall.png ) There's still a workaround for that way, and server files don't need to be deleted because they aren't even downloaded.
  24. Do you realise that I or anybody else can report you anytime for using a nulled version of WHMCS?
×
×
  • Create New...