Jump to content

Rataj

Members
  • Posts

    98
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Rataj

  1. That will be problem in another script where you set exported database connection to variable, you probably assigned marker to that variable.
  2. That should work, but don't put your function definition inside loop. Try it like this: function MarkerHit ( hitPlayer, matchingDimension ) if (hitPlayer == localPlayer) then guiSetVisible(window, true) showCursor(true) end end for k,v in ipairs( spots ) do marker = createMarker ( v[1],v[2],v[3], "Cylinder", 1, 255, 255, 255, 100 ) addEventHandler ( "onClientMarkerHit", marker, MarkerHit ) end
  3. Really cool idea! Keep it up.
  4. [quote name=..&G:..] I am trying to attach an object to the vehicle. I know I 've tried this function with a player and an NPC, and whenever I turned arround, the NPC was still facing north I know this is happening with peds sometimes, but objects worked for me. Around two months ago I was making script to attach boxes on truck and rotation was updating well. Maybe try to fill rotation offset arguments. Updating rotation manually on render would be fix, but not very clean one.
  5. I think "attachElements" actually does that.. Which type of element are you attaching, Object?
  6. Why is there even event handler named "onDuty" when you don't call it from anywhere? Also look at your timers in the text part, you should read how timers work here. And merge your "duty" commands together, it will be more clean, than two command handlers with same command. I understand you're beginner, but you should start by reading Scripting Introduction, it can help you a lot. If you need any further help, feel free to contact me.
  7. Rataj

    Gate Script

    What about making your own using https://wiki.multitheftauto.com/wiki/MoveObject?
  8. Rataj

    Gate Script

    What about making your own using https://wiki.multitheftauto.com/wiki/MoveObject?
  9. Find paid scripter or learn it by yourself. https://wiki.multitheftauto.com/wiki/Scripting_Introduction can help you a lot.
  10. In client side you should not define player in function bindKey. Try to use it like this instead: bindKey("enter", "down", clientSubmitLogin) Also you need to edit condition in start of function, because it will not go through using it like this.
  11. Pomožte mi udělat menší průzkum a hlasujte v anketě. Případně připište do odpovědí proč, nebo napište jaký jiný mód, který v anketě není hrajete.
  12. Probably account data "bank.balance" is empty - returning false.
  13. Edit your TXD and DFF, add it to meta.xml and then use this client-side script: txd = engineLoadTXD("lspd.txd") engineImportTXD(txd, 596) dff = engineLoadDFF("lspd.dff", 596) engineReplaceModel(dff, 596) And if you are planning to replace more skins (compatible for objects even with collision file too) in one script I recommend you to use array with this function: local skins = {596,597,598,599} function applySkins() for k,v in ipairs(skins) do if(fileExists("skins/"..v..".col"))then col = engineLoadCOL("skins/"..v..".col") engineReplaceCOL(col,v) end if(fileExists("skins/"..v..".txd"))then txd = engineLoadTXD("skins/"..v..".txd") engineImportTXD(txd,v) end if(fileExists("skins/"..v..".dff"))then dff = engineLoadDFF("skins/"..v..".dff") engineReplaceModel(dff,v) end end end addEventHandler("onClientResourceStart",getResourceRootElement(),applySkins)
  14. Well, you can check distance between players using getDistanceBetweenPoints3D and use it as you want for this.
  15. Rataj

    Please enter

    Well, you should draw rope (line), then you create invisible object, attach player to that object and move object to the end of rope (ground).
  16. round(1603.9251708984, 3) This will return 1603.925
  17. Use "setElementPosition" instead of "spawnPlayer".
  18. Rataj

    Bug :-/

    Well, just to explain it more. First you need to use this https://wiki.multitheftauto.com/wiki/CreateBrowser Then you can load URL using https://wiki.multitheftauto.com/wiki/LoadBrowserURL And in this event https://wiki.multitheftauto.com/wiki/OnClientRender You will use for example this function to draw it into 3D space https://wiki.multitheftauto.com/wiki/DxDrawMaterialLine3D EDIT: Also you can look at https://wiki.multitheftauto.com/wiki/CEF_Tutorial
  19. Rataj

    Bug :-/

    In 1.5 were CEF added, so there is no need to use shaders for this. https://wiki.multitheftauto.com/wiki/CreateBrowser
  20. Just to explain (to prevent making same mistake), variable 'matchingDimension' outputs either 'true' or 'false' se there is no need to check player's dimension again.
  21. Consider make that using addition (or subtraction) instead of multiplication. Example: -- Left top corner local car = getPedOccupiedVehicle ( localPlayer ) local health = getElementHealth ( car ) local currenthealth = math.floor( health/10 ) dxDrawText(tostring(currenthealth).." % ", 100, 50, 200, 50, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) -- Right bottom corner local sx,sy = guiGetScreenSize() local car = getPedOccupiedVehicle ( localPlayer ) local health = getElementHealth ( car ) local currenthealth = math.floor( health/10 ) dxDrawText(tostring(currenthealth).." % ", sx-100, sy-50, x, y, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false)
  22. Meno v hre: Rataj Slovensko/Cesko: Česko Server: [CZ/SK] Skimo RolePlay
×
×
  • Create New...