Jump to content

IIYAMA

Moderators
  • Posts

    6,061
  • Joined

  • Last visited

  • Days Won

    208

Everything posted by IIYAMA

  1. You can create the teargas effect with the createEffect function. https://wiki.multitheftauto.com/wiki/CreateEffect All: https://wiki.multitheftauto.com/wiki/Client_Scripting_Functions#Effects_functions It is only the visualisation of the effect. And sound can be enabled/disabled. Enjoy.
  2. It captures there as a scissor. (as The_GTA explains) But what problems are you referring to? (Re-writing your script is not one of them ?)
  3. You capture it in the left-top-corner of your screen and use dxDrawImage to draw it at the correct location. Everything you capture will not be drawn (immediately). That is how it is suppose to work.
  4. The following function can change the scale over the x, y and z axis: https://wiki.multitheftauto.com/wiki/SetObjectScale Which would have the same outcome. (requires a relative value instead of an absolute value.)
  5. It does have some benefits. Some very good ones. But I could also find a few cons, how would you address the following? 1. You have to write more code. (More than double in some cases) 2. You need to know the exact table keys. For some functions those are obvious, for other that might become complicated based on the context and requires more wiki info: x, x1, x2, text, message, speed, velocity, time, duration. This is a language as well as a logic issue. It needs some clear rules in order to function. 3. Somebody has to update the wiki with a 3e syntax. 4. A lot of object instance creation and disposal on onClientRender is a combination I rather not recommend.
  6. It doesn't appear to be making use of GTA objects. Atleast I base that on the previews. A Serverside implementation could be interesting, when you add the collisions yourself.
  7. Looks very cool CrosRoad. Will there also be a Serverside implementation? (Would be nice to have a {backwards compatible} module) And will it be possible to create separate environments on multiple threads?
  8. Indeed, my bad. According to the docs, you need to use ORDER BY, before you can use LIMIT in an UPDATE query.
  9. The database should to be considered the truth of what the balance actually is, not your elementdata. See here how to update the balance: dbExec(conexiune,"UPDATE afacere SET balance = balance + ? WHERE NR=? LIMIT 1", payout, ID) You need a second 'SELECT' query for updating the elementdata.
  10. You can use https://wiki.multitheftauto.com/wiki/BindKey as replacement. You can bind it on specific keys like 'mouse1' (left click) or control names like 'fire', to achieve your goal.
  11. There was literally nothing? No need to play the fool. To be precise, your previous topic's were locked for the following reason: Since people already replied to this topic, I will wait an amount of time before I may or may not come to the conclusion that you are doing the following:
  12. Locked for the same reason as this topic:
  13. If you are not interested in scripting and here for recruiting, then this is not the section for you. See section guidelines: You should recruit people only there: https://forum.multitheftauto.com/forum/149-looking-for-staff/ Locked
  14. You should only combine them when for example they contain utility functions, like: https://wiki.multitheftauto.com/wiki/CheckPassiveTimer When setting the file to shared, it will make a file copy for the server and a copy for every player/client. <script src="test.lua" type="shared" /> Serverside code runs on the server. > MTA Server.exe Clientside code runs on every player individuality. > MTA San Andreas.exe (There are as much clientsides as there are players > variables are not shared) Running code on the wrong application, doesn't sounds like a good idea to me. Serverside shouldn't draw UI. Clientside shouldn't kick/ban players. > With other words: A player client(MTA San Andreas.exe) shouldn't be able to ban another player, because the server(MTA Server.exe) is the only application that is able to ban a player.
  15. You should work with the resolution you have yourself. Since that is the only absolute measure you have when building your interface. If you have your monitor on 1280x720 and you use 1920x1080. You can't calculate width/height exactly with your own pixels. So if you want 100% of the height of your screen and you fill in 720, the output is 720 / 1080 = 0.666666666667 = ~67% height! If you did use 1280x720: 720 / 720 = 1 = 100% height! That is what we want to see.
  16. You can place a tables in tables. (Note: Not literally as under the hood only a reference to the sub tables will be saved in the outer table. But that is another story...) local veh = { -- < outer table {411, 2505.1791992188, -1664.51953125, 13.391730308533, 0, 0, 90}, -- < inner tables separated by , {411, 2505.1791992188, -1664.51953125, 13.391730308533, 0, 0, 90} } And using a loop to process them all: function Vehicles() for i=1, #veh do createVehicle(unpack(veh[i])) end end addEventHandler("onResourceStart", root, Vehicles)
  17. Do not use "", they are making the inner content a string. A string is a character set, which is not very handy for spawn dimensions. local veh = {411, 2505.1791992188, -1664.51953125, 13.391730308533, 0, 0, 90} Try this: local veh = {411, 2505.1791992188, -1664.51953125, 13.391730308533, 0, 0, 90} function Vehicles() createVehicle(unpack(veh)) end addEventHandler("onResourceStart", root, Vehicles)
  18. You could also check if the same issue appears when the resource is zipped. That situation creates issues for the call-trace Lua debug functions. So it might be similar to this as well.
  19. It could be from a loadstring environment. 'loadstring' is a function used to load a string in to code. One of the most tricky functions you can run in Lua(MTA). https://www.lua.org/pil/8.html
  20. outputChatBox outputs by default to all players. You need to specify the receiver. https://wiki.multitheftauto.com/wiki/OutputChatBox
  21. And what doesn't work exactly? I do not see any issues to be honest.
  22. Try this: local elementList = {} function rotateobj(obj) elementList[#elementList + 1] = obj end function rotateElementsInList (timeSlice) local normalizedSpeed = timeSlice / 16.66667 -- based on 60 fps (1000 / 60) -- Other method: getTickCount() % 360 = 0 t/m 359 for i=1, #elementList do local element = elementList[i] local rotX, rotY, rotZ = getElementRotation(element) setElementRotation(element, rotX, rotY, rotZ + normalizedSpeed) end end addEventHandler("onClientPreRender", root, rotateElementsInList) local obj = createObject(1947, 193.71983, -105.13480, 1.54872-1) exports["rotobj"]:rotateobj(obj)
  23. The server root is at the place where the server launcher is: MTA Server(.exe) You could rename the folder which contains the launcher, to your server name: Program Files (x86)\MTA San Andreas 1.5\server\mods\deathmatch Renaming folders deeper does not make any sense, because that is not the container of your server. > If there is for example a tree in front of you, and a leaf nearly falls off. Would you start calling that leaf also a tree? ?
  24. MTA locates it's files based on folder names, if you change the folder name, MTA can't find them. Why do you want to change it?
  25. You can also use this selector if you want all columns from a specific table: jobs_sys.* But it could override some of the table values, if the names are the same from the 2+ tables.
×
×
  • Create New...