Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 14/06/24 in all areas

  1. There have been some updates for the new 1.6 functions, but it is still an ongoing process. Feel free to pull for newest version if you want to try out some of the new stuff with it's up to date syntax. Of course for the patches as well. Special thanks to: @srslyyyy @FernandoMTA Known syntax to-do's in the near future: fxCreateParticle (wiki link) Done! by FileEX EngineSet/GetPoolCapacity by TheNormalnij
    2 points
  2. modloader_reborn is a resource for servers to replace game models with little effort. Easy to use. Optimized script. No configuration required. Drag & drop DFF/TXD files to the correct folders. Readme & Download: https://github.com/Fernando-A-Rocha/mta-modloader-reborn
    1 point
  3. Just some context why your code is not working as intended. You are currently closing the file after running the first command. Do this on onClientResourceStop + resourceRoot. Don't forget to add newlines with \n. After every command run fileFlush, so that the file writes are actually written to the file.
    1 point
  4. Please disregard the post above.. This is a working code ----server addCommandHandler("adminchat", function(player, _, ...) local account = getAccountName(getPlayerAccount(player)) --get the player account for _,v in ipairs(getElementsByType("player")) do if isObjectInACLGroup("user." .. account, aclGetGroup("Staff")) then --- this section you can customize which ACL role they are. outputChatBox("#7D6608[Admin]#9A7D0A"..getPlayerName(player):gsub("#%x%x%x%x%x%x", "").."#7D6608: #FFFFFF"..table.concat({...}, " "):gsub("#%x%x%x%x%x%x", ""), v, 255, 255, 255, true); --- thisplay chat you can customize as well. else outputChatBox("You don't have enough access to use this chat!") end end end ) ---client bindKey("h", "down", "chatbox", "adminchat"); Please hit like on 2 of my posts if these helped you
    1 point
  5. Então eu não sei se você viu isso no meu canal: Victor Scripting, mas ok vms lá vou deixar um exemplo a qual está na wiki do mta no seguinte link: https://wiki.multitheftauto.com/wiki/FetchRemote server-side: Este exemplo mostra como você pode buscar uma imagem de uma página da web e transferi-la para um cliente específico: function startImageDownload( playerToReceive ) fetchRemote ( "http://www.example.com/image.jpg", myCallback, "", false, playerToReceive ) end function myCallback( responseData, error, playerToReceive ) if error == 0 then triggerClientEvent( playerToReceive, "onClientGotImage", resourceRoot, responseData ) end end client-side: addEvent( "onClientGotImage", true ) addEventHandler( "onClientGotImage", resourceRoot, function( pixels ) if myTexture then destroyElement( myTexture ) end myTexture = dxCreateTexture( pixels ) end ) addEventHandler("onClientRender", root, function() if myTexture then local w,h = dxGetMaterialSize( myTexture ) dxDrawImage( 200, 100, w, h, myTexture ) end end ) ou seja note que o fetchRemote pega/baixa essa imagem através do link dela e envia para a function: myCallback como parâmetro e a function myCallBack leva o objeto para o client-side através do triggerClientEvent. No client side ela recebe a imagem como um objeto e transforma numa textura através do dxCreateTexture e no evento onClientRender ela puxa a imagem pela sua variável.
    1 point
  6. I don't know, if does not work, test code from below. client-side server-side OBS: The first version of this code ins't work. use this one.
    1 point
×
×
  • Create New...