Jump to content

JeViCo

Members
  • Posts

    605
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by JeViCo

  1. Up. Am i able to include the missing library as a part of module instead of referring to it?
  2. I've recently tested my module on Debian 9.11 server (VPS hosting) and got this error: MODULE: Unable to load mods/deathmatch/modules/ml_base.so (liblua5.1.so.0: cannot open shared object file: No such file or directory) I compiled and tested it on Ubuntu (local VM via VirtualBox) and it worked perfectly. Did i miss something in makefile? My current Makefile.mak: https://pastebin.com/k0Nhi9ya
  3. Hello guys! I've recently found out that i can't use 2+ different shaders on same texture. I tried to work around layered argument in dxCreateShader function and DepthBias variable in shader and got nothing. Only one shader can exist at the time. I tried to apply one shader over another one so I used gTexture0 variable (defined in mta-helper.fx) to get material and draw my own texture over it. What am i missing? shader pseudo-code: // Fix by JeViCo // Link: https://vk.com/jevico texture gTexture0 < string textureState="0,Texture"; >; texture tex; technique Draw { pass P0 { Texture[0] = gTexture0; AlphaBlendEnable = true; } pass P1 { Texture[0] = tex; } } Of course i can make single-file shader however this is not what i'm trying to achieve
  4. You can create a timer after you switched to the RPG and remove it if you switched to another weapon Use toggleControl("aim_weapon", false) on each onClientWeaponSwitch event triggering and allow to aim when the timer executes out (just insert toggleControl("aim_weapon", true) inside the timer)
  5. 1) Try to use source as the variable name. It may confuse you in future (see pre-defined variables) 2) not (v == source) is similar to v ~= source. Technically the last one is more correct. Also you didn't mention what bugs appear
  6. why don't you use timers to make the delay?
  7. You can kill the timer and recreate it lmao use sourceTimer variable inside timer's callback function
  8. Found community script. Install it and use exported functions https://community.multitheftauto.com/?p=resources&s=details&id=3685
  9. We can't help you until you give us more details. Also, check your debug (/debugscript 3)
  10. Imagine that server has ~100 players on it. You're telling the server to open panel on client-side. The server doesn't know which player you're talking about and it opens it on every single client. This is what happens when you use triggerClientEvent("Start", ThePlayer) To fix it tell the server to use specific client(player) by adding player variable as the first argument: triggerClientEvent(ThePlayer, "Start", ThePlayer) Same thing was shown above BTW this is the single difference between triggerClientEvent and triggerServerEvent
  11. try to use addEvent function below the toggleOnPlayerMove variable
  12. This is the scripting section and not "how to leak scripts"
  13. 1) Fast model loading (high amount of custom models (map & skins & vehicles) takes a lot of time to replace especially on older PCs while loading .img files directly takes a couple of minutes to load everything) 2) Interface enhance (working around main menu mostly)
  14. several servers use custom clients however i get kicked when i try to run some sort of trainer. According to kick reason It looks like default MTA's anti-cheat. Did servers' owners upgrade their anti-cheat or use old version of MTA? Can i increase compatibility manually somehow?
  15. Anti-cheat doesn't work in custom clients (except for SD). It feels like i turned off it manually using <disableac></disableac> Can i enable it somehow? It seems to be a big security issue for custom clients BTW i downloaded it on github on 27.10.2019
  16. I know that variable access speed higher for local variables. Does this work on functions as well? Can i do something like this at the beginning of the script: local tocolor = tocolor local dxGetTextWidth = dxGetTextWidth local dxGetFontHeight = dxGetFontHeight local dxDrawText = dxDrawText local dxDrawImage = dxDrawImage local getElementPosition = getElementPosition local getElementRotation = getElementRotation local getPedCameraRotation = getPedCameraRotation local getDistanceBetweenPoints2D = getDistanceBetweenPoints2D local dxGetMaterialSize = dxGetMaterialSize local getElementData = getElementData
  17. I've recently tried to do something like this function drawSlot() end addEventHandler("onClientRender", root, drawSlot) setTimer(removeEventHandler, 3000, 1, "onClientRender", root, drawSlot) however i keep getting warning: 'removeEventHandler' expected function at argument 3 got nil everything works fine by the code below: setTimer(function() removeEventHandler("onClientRender", root, drawSlot) end, 3000, 1) Is that mta bug? btw _G["drawSlot"] gives same warning
  18. You should use getPedTask to detect that action. onVehicleStartEnter event triggers even if there is a distance between player and vehicle
  19. Yes, you're right. A little mistake on line 3: if getElementModel(vehicle) == 411 then
  20. By column types and column length i mean this Apologizing for the inaccuracy
×
×
  • Create New...