Jump to content

mommytellme

Members
  • Posts

    178
  • Joined

  • Last visited

Everything posted by mommytellme

  1. Name the functions better than "gówno" because otherwise in the end you start to get lost in your code
  2. Thank you for your help, but I decided to make this system more robust so that I will not be able to use this solution.
  3. This system fractions and is 85 lines, not the entire required. Paste the most important passage: local f = exports.DB2:pobierzWyniki("SELECT * FROM `prs_frakcje` WHERE `id` = "..getElementData(source, "fid")) local u = exports.DB2:pobierzWyniki("SELECT * FROM `prs_frakcje_players` WHERE `uid` = "..getElementData(plr, "auth:id")) setElementData(plr, "f.name", f.nazwa) setElementData(plr, "f.id", f.id) local rank = fromJSON(f.ranks) outputChatBox(#rank) -- !!!! prints 0
  4. mommytellme

    fromJSON

    Hello! When i type local rank = fromJSON(f.ranks) outputChatBox(rank) where f.ranks is text from database and its equals [{"1":"Szeregowy", "2":"Test"}] it give me a error: bad argument outputChatBox [exepcted string at argument 1 got nil] Why?
  5. getElementsByType returns table so: callRemote ( "http://www.website.com/mtasdk/refreshdata.php", #getElementsByType ( "player" ) ) is the correct form
  6. Write /debugscript 3 in chat, not in server console.
  7. Chyba już jest implementowany MTA:Script editor domyślnie.
  8. any errors in /debugscript 3?
  9. okay, whatever. But I have another problem. I upload into module all the files from the package, I tried to compile and blew me these errors: -------------- Build: Debug Win32 in ml_base (compiler: GNU GCC Compiler)--------------- mingw32-g++.exe -shared -Wl,--output-def=Debug\libml_base.def -Wl,--out-implib=Debug\libml_base.a -Wl,--dll Debug\CFunctions.o Debug\CThread.o Debug\CThreadData.o Debug\extra\CLuaArgument.o Debug\extra\CLuaArguments.o Debug\ml_base.o -o Debug\ml_base.dll D:\bullet\bin\Debug\libbullet.a D:\MTABulletPhysics\ml_devkit\ml_base\lib\lua5.1.lib Debug\extra\CLuaArgument.o: In function `ZN12CLuaArgument4ReadEP9lua_Statej': D:/MTABulletPhysics/ml_devkit/ml_base/extra/CLuaArgument.cpp:209: undefined reference to `lua_type' D:/MTABulletPhysics/ml_devkit/ml_base/extra/CLuaArgument.cpp:220: undefined reference to `lua_toboolean' D:/MTABulletPhysics/ml_devkit/ml_base/extra/CLuaArgument.cpp:226: undefined reference to `lua_touserdata' D:/MTABulletPhysics/ml_devkit/ml_base/extra/CLuaArgument.cpp:232: undefined reference to `lua_tonumber' D:/MTABulletPhysics/ml_devkit/ml_base/extra/CLuaArgument.cpp:239: undefined reference to `lua_tolstring' Debug\extra\CLuaArgument.o: In function `ZNK12CLuaArgument4PushEP9lua_State': D:/MTABulletPhysics/ml_devkit/ml_base/extra/CLuaArgument.cpp:268: undefined reference to `lua_pushnil' D:/MTABulletPhysics/ml_devkit/ml_base/extra/CLuaArgument.cpp:274: undefined reference to `lua_pushboolean' D:/MTABulletPhysics/ml_devkit/ml_base/extra/CLuaArgument.cpp:280: undefined reference to `lua_pushlightuserdata' D:/MTABulletPhysics/ml_devkit/ml_base/extra/CLuaArgument.cpp:286: undefined reference to `lua_pushnumber' D:/MTABulletPhysics/ml_devkit/ml_base/extra/CLuaArgument.cpp:295: undefined reference to `lua_pushstring' D:/MTABulletPhysics/ml_devkit/ml_base/extra/CLuaArgument.cpp:299: undefined reference to `lua_pushstring' Debug\extra\CLuaArguments.o: In function `ZN13CLuaArguments13ReadArgumentsEP9lua_Statej': D:/MTABulletPhysics/ml_devkit/ml_base/extra/CLuaArguments.cpp:58: undefined reference to `lua_type' Debug\extra\CLuaArguments.o: In function `ZNK13CLuaArguments4CallEP9lua_StatePKc': D:/MTABulletPhysics/ml_devkit/ml_base/extra/CLuaArguments.cpp:96: undefined reference to `lua_pushstring' D:/MTABulletPhysics/ml_devkit/ml_base/extra/CLuaArguments.cpp:97: undefined reference to `lua_gettable' D:/MTABulletPhysics/ml_devkit/ml_base/extra/CLuaArguments.cpp:102: undefined reference to `lua_pcall' D:/MTABulletPhysics/ml_devkit/ml_base/extra/CLuaArguments.cpp:105: undefined reference to `lua_tolstring'
  10. I have it downloaded and join my unit? I think no.
  11. nope. #include "./mods/deathmatch/logic/lua/CLuaFunctionDefs.Object.cpp" ===== fatal error: ./mods/deathmatch/logic/lua/CLuaFunctionDefs.Object.cpp: No such file or directory
  12. I am writing module, I want it to access the functions / variables from the MTA. Give up?
  13. mommytellme

    Module

    Hi. Can I use MTA variables from module level? Eg. An array that stores the created objects. I want to try to integrate game with the new physics engine.
  14. yes, in path of image write :res1/image.png
  15. Podczas pisania funkcji na dole pojawiała by się jej składnia. Przydatne, często jak coś pisze i zapomnę składni jakiejś funkcji to muszę na wiki patrzyć.
  16. I saw on one server to detect the type of soil, and tear the wheels if too fast on the entrance.
  17. Hi. Can I somehow get the type of ground, after which the player moves? For example, sand, grass, asphalt.
  18. It has to be dynamic. You can use bounding box instead of colshapes then Thanks. I'm write that code: local x1, y1, z1, x2, y2, z2 = getElementBoundingBox(obiekt) local x,y,z = getElementPosition(obiekt) local x1 = x - x1 local y1 = y - y1 local z1 = z - z1 local colshape = createColCuboid(x1, y1, z1, x2, y2, z2) outputChatBox(x2.." - "..y2.." - "..z2) setElementData(obiekt, "colshape", colshape) attachElements(obiekt, colshape, 0, 0, 2) but the colshape is too small, and when object is move, the colshape is in its place. Can You help me?
  19. It has to be dynamic.
  20. mommytellme

    Physics

    Hi there! I create a simple physics, I would like to create around the object colshape to detect a collision, but do not know how to detect where to start to create, and where to end colshape. Thanks in advance for your help and sorry for my poor English
  21. I want the camera to be rotated by the rotation of the plane, so I wrote this code: function camera () local veh = getPedOccupiedVehicle(localPlayer) if veh then if getVehicleType(veh) == "Plane" then local raz, dwa, trzy, cztery, piec, szesc = getCameraMatrix() local rotX, rotY, rotZ = getElementRotation(veh) setCameraMatrix(raz, dwa, trzy, cztery, piec, szesc, rotZ) end end end addEventHandler("onClientPreRender", root, camera) But it does not work, when you enter the Hydra camera locks in place. How do I fix this?
  22. mommytellme

    Shaders

    Hi, I found something like this: http://adf.ly/iDTSd (sorry for adf.ly) This is a mod improves the graphics, in the middle of .fx files. Is it possible to run it in the MTA?
  23. mommytellme

    HASH

    Thank you, that I was looking for! God has sent you to me! : D
×
×
  • Create New...