Jump to content

MIKI785

Members
  • Posts

    1,131
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by MIKI785

  1. fetchRemote ( "http://www.example.com/image.jpg", myCallback, "", false) function myCallback( responseData ) if fileExists("image.jpg") then fileDelete("image.jpg") end local file = fileCreate("image.jpg") fileWrite(file, responseData) fileClose(file) guiCreateStaticImage(x, y, x, y, "image.jpg", bool) --Provide the XYs end This works for me
  2. Just read the wiki... https://wiki.multitheftauto.com/wiki/DxDrawColorText, it says: It works the same as dxDrawText, except clipping and word-wrapping (not implemented yet).
  3. Hello, as it's not on the wiki page i'm asking here. What is the exact limit of the text length to be outputted by this function? Does the limit ignore hex codes if the last argument is set to true? Thanks. Edit: i see that the wiki says that the limit is 128 chars, i was blind
  4. It works now out of nowhere
  5. Didn't help, it worked before with no problems it's just today..
  6. I and other people i asked got a problem that master server list shows only 69 servers... i don't know if the problem is on my side or on the server's side. Master server list is internet tab in server browser.
  7. MIKI785

    godmode

    You can't cancel this event. Use this client sided instead: addEventHandler("onClientPedDamage", root, function (attacker) if getElementType(attacker) == "player" then cancelEvent() end end)
  8. The debug must output something then, you still didn't reply on the debug....
  9. You didn't change anything there... the same code.
  10. What about the debug?
  11. Why the onClientResourceStart? Why? function draw() dxDrawImage(1049, 696, 13, 34, "mtalogo.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawImage(406, 674, 656, 32, "mtalogo.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawImage(406, 726, 656, 32, "mtalogo.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawImage(406, 696, 20, 35, "mtalogo.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) end addEventHandler("onClientRender", getRootElement(), draw) The same thing... i don't think the problem was in that, the debug doesn't output anything? EDIT: You had ')' in the code that didn't close anything.
  12. Learn basics first, this is advanced scripting and you're posting here help topics almost every day asking for help with basic things. You can't do this if u don't know the basics first, that's quite logical.
  13. It's not that easy you know, you can't just make a button and move player to some arena on click
  14. His client side script is obviously fine as the error is on the server side... Does the addEvent and addEventHandler execute? Put some output between them, i don't see any problem in that code. PS: Don't use ;
  15. Just use guiSetText
  16. Are you trying to change the picture? This way is just stupid. Use guiStaticImageLoadImage instead.
  17. MIKI785

    help

    That's quite logical, because the marker is created in every client's game individually. Make the marker server sided and after clicking the button use triggerServerEvent to destroy the marker. In this case it's maybe better to use server side onMarkerHit and triggerClientEvent to show the gui.
  18. Yes, it's client side. Why would you want it server side? There's no need.
  19. Just use root in the event handler... but it will be called on start of every resource, to make it for maps only do it server sided and check for type attribute in info node in meta.
  20. Not sure if it'll work but try this: function deleteTag ( source, command, thePlayer ) local spec = getPlayerFromNamePart ( thePlayer ) if ( spec ) then if getElementType ( spec ) == "player" then local oldName = getPlayerName ( spec ) setPlayerName ( spec , string.gsub ( oldName , "%[s%]" , "" ) ) setPlayerTeam ( spec, nil ) outputChatBox ( "Player has been removed from SPEC team" , source ) end else outputChatBox ("Unable to remove player from SPEC team" , source ) end end addCommandHandler ( "nospec" , deleteTag )
  21. It gets downloaded automatically if the type is client, no need to do anything else.
  22. Yes, if it's client side then only the client where you created it will see it.
  23. Colshape should do it. Check the wiki for relevant functions.
×
×
  • Create New...