Jump to content

GTX

Members
  • Posts

    1,273
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by GTX

  1. GTX

    [DayZ] Animations

    Your server side script is missing. Which animation do you want to stop? You can stop animation by putting: setPedAnimation(source, false)
  2. GTX

    my source bugs

    Variable "reason" is not defined. On line 12 just change to "if reason then". I think it should be fine.
  3. CNRPANEL.button[1] = guiCreateButton(10, 41, 372, 310, "Cop", false, CNRPANEL.staticimage[1]) 10, 41, 372, 310 10/1024 = 0.009765625 41/768 = 0.05338541666 372/1024 = 0.36328125 310/768 = 0.40364583333 Numbers in red represent YOUR resolution, where GUI perfectly fits on screen. CNRPANEL.button[1] = guiCreateButton(sWidth*0.009765625, sHeight*0.05338541666, sWidth*0.36328125, sHeight*0.40364583333, "Cop", false, CNRPANEL.staticimage[1]) You can also use relative values (between 0 and 1), but then change 6th argument to true.
  4. I gave you the link, why don't you use it? CNRPANEL.staticimage[2] = guiCreateStaticImage(0, 0, sWidth, sHeight*0.04036458333, "imgs/tab.png", false, CNRPANEL.staticimage[1]) Assuming you're using 1024x768.
  5. function round(num, idp) return tonumber(string.format("%." .. (idp or 0) .. "f", num)) end Usage: round(kil/dea, 3)
  6. It's either your meta or script name you defined doesn't exist. Show me the meta.
  7. https://wiki.multitheftauto.com/wiki/Cl ... _functions
  8. Client side: setTimer(function() setVehicleColor(getPedOccupiedVehicle(localPlayer), math.random(0, 255), math.random(0, 255), math.random(0, 255)) end, 2000, 0)
  9. https://wiki.multitheftauto.com/wiki/Gu ... esolutions If you still don't know how to do that, show us the code.
  10. function applymods() for num=1, #modTable do if (modTable[num]) then if (fileExists(modTable[num][2])) and (fileExists(modTable[num][3])) then -- I have all mods in client folder txd = engineLoadTXD(modTable[num][2]) engineImportTXD(txd, modTable[num][4]) dff = engineLoadDFF(modTable[num][3]) engineReplaceModel(dff, modTable[num][4]) end end end end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), applymods)
  11. setTimer(function() setTeamColor(teamstaff, math.random(0, 255), math.random(0, 255), math.random(0, 255)) end, 2000, 0) Is that what you want?
  12. What do you mean in easy way? Put them in a table? markers = { createMarker(..), createMarker(..) }
  13. GTX

    Questions

    Question one: https://wiki.multitheftauto.com/wiki/Se ... kerEnabled Question two: Show us the code.
  14. Oh, I thought the discussion in this topic is about MTA server. Well, I suggest you to use VMWare running Windows 7. Inbuilt (In Windows 8 Pro) Hyper-V Manager could be used too, I think.
  15. If you're using MySQL/SQLite: SELECT name, time FROM toptimesTable WHERE map='"..map.."' ORDER BY time ASC LIMIT 1 Let me know if you're using different structure.
  16. You don't need virtual machines. Just open another server with different port.
  17. GTX

    Pickup problem

    If you want to trigger a function when pickup is picked, use onClientPickupHit. Edit: anumaz, it's onClientPickupHit, not OnClientPickupHit. Beware, it's case-sensitive!
  18. You can't just start using DX like that. You need to learn coordinates and know maths very well.
  19. If I was able to smack somebody once in my entire life without any police or so on my doorstep, it would be you.
  20. There is blowfish for Lua: https://github.com/bungle/lua-resty-net ... owfish.lua
  21. GTX

    setPedArmor

    thx man You're welcome.
  22. You can't access Console account. Console account is logged in by server console itself. I checked in internal.db for Console password. It's empty (http://prntscr.com/75kjhd).
  23. GTX

    setPedArmor

    Client-side: function click() if source == Health_Button then triggerServerEvent("armor::set", localPlayer) end end addEventHandler("onClientGUIClick", resourceRoot, click) Server-side: function setArmor() setElementHealth(source, 200) setPedArmor(source, 100) end addEvent("armor::set", true) addEventHandler("armor::set", root, setArmor)
  24. GTX

    setPedArmor

    setPedArmor is server-side only function.
×
×
  • Create New...