Jump to content

Bonsai

Members
  • Posts

    1,031
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Bonsai

  1. Thats indeed a bug. Somewhere in this topic was a solution how to fix that. Bonsai
  2. Just use WHERE to get the value you want to check. If it returns something useful, its existing.
  3. Try to freeze the player.
  4. Make visible on: https://wiki.multitheftauto.com/wiki/OnClientMarkerHit
  5. I guess you could use WHERE to select rows with teamname == var, if the result is empty, its not existing yet. http://www.tutorialspoint.com/sqlite/sq ... clause.htm
  6. Like this? test[1].columnName
  7. addEvent("openteams.getTeamLeader.serverGave") needs to be addEvent("openteams.getTeamLeader.serverGave", true)
  8. Ahh, you can just pass the player - "element" when triggering a server event. Just use it as the source. https://wiki.multitheftauto.com/wiki/TriggerServerEvent In that function which is called when you trigger that event you can simply use "source" or "client" to do stuff with the "local" player. setPedFightingStyle (source,15) --or client
  9. localPlayer is predefined on clientside. Also, gui's are clientside, so it can't be used by anyone else than the local player, so you don't need to check who clicked.
  10. Bonsai

    internal.db

    They are hashed. You could only compare if the passwords are equal. So no stealing there, if thats the intention
  11. More or less synced, but you don't need to do any additional stuff.
  12. I'm not sure if timers are better, but that way you could limit it to X times per second, instead of depending on fps. Timers depend on fps too, but the function won't be called on any frame.
  13. There isn't much that could do that. ScreenSource + postGUI most likely. Never tried tho.
  14. Whats so bad about that watermark...
  15. ?! dxDrawText(clean(chat.line), function clean(text) return string.gsub(text, '#%x%x%x%x%x%x', '') end ...
  16. Meanwhile I discovered the problem is caused by the uppercase letter "Y" followed by, in this case, lowercase "o". It also happens with a few others. I guess that means its not related to my scripting, but a bug in general? Bonsai
  17. if chatbox.useNewMessageScrollAnimation then dxSetRenderTarget(chatbox.renderTarget, true) dxSetBlendMode("modulate_add") end --Lines for i, chat in ipairs(chatbox.tabs[chatbox.selectedTabIndex].chats) do dxDrawText(clean(chat.line), chatbox.textPosX+1, chatbox.textPosY+chatbox.height-(chatbox.lineHeight*(i-chatbox.scroll))+(chatbox.lineHeight*chatbox.newMessageScrollValue)+1, chatbox.width, chatbox.height, tocolor(0, 0, 0, chat.alpha), chatbox.fontSizeX, chatbox.fontSizeY, chatbox.font, "left", "top", false, false, false, true) dxDrawText(chat.line, chatbox.textPosX, chatbox.textPosY+chatbox.height-(chatbox.lineHeight*(i-chatbox.scroll))+(chatbox.lineHeight*chatbox.newMessageScrollValue), chatbox.width, chatbox.height, tocolor(255, 255, 255, chat.alpha), chatbox.fontSizeX, chatbox.fontSizeY, chatbox.font, "left", "top", false, false, false, true) end dxSetBlendMode("blend") if chatbox.useNewMessageScrollAnimation then dxSetRenderTarget() dxSetBlendMode("add") dxDrawImage(chatbox.posX, chatbox.posY, chatbox.width, chatbox.height, chatbox.renderTarget, 0, 0, 0, tocolor(255,255,255,255), chatbox.postGUI) dxSetBlendMode("blend") end function clean(text) return string.gsub(text, '#%x%x%x%x%x%x', '') end
  18. Hey, I'm using dx functions to draw a line of text on the screen. With a little offset I draw the same line with black color behind it (shadow). The first line starts to look weird after the first color code at "/block" is applied. It looks worse when the background changes due to camera movement. I have no idea whats causing this problem. I draw it as described in here: https://wiki.multitheftauto.com/wiki/DxSetBlendMode Bonsai
  19. Hey there, does this function load the whole xml file at once? If so, do I have to expect problems loading a huge xml file, lets say few Mb? Bonsai
  20. Thats something you should work on then!
  21. Don't use gui functions onClientRender. Use dx.
  22. Did you use "include" in meta? The resource that includes others will start/stop/restart those.
×
×
  • Create New...