Jump to content

Saml1er

Retired Staff
  • Posts

    1,058
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Saml1er

  1. That's mta problem. Try it with race gamemode. It will not work.
  2. Nope. Just use ids as suggested by trosfera. That's what I did. Try it.
  3. guiSetInputMode("no_binds_when_editing")
  4. I'll tell you a very simple way. DX local myResX, myResY = 1024, 768 -- This is my resolution. Relace it with yours ^^ local sx, sy = guiGetScreenSize ( ) sx,sy = sx/ myResX, sy/myResY -- divide it by your resolution and so on you can easily scale dxDrawImage ( sx * 100, sy*100, sx*40, sy*40 ) -- RELATIVE SIZES. This will fit on all resolutions ;p GUI -- For gui set the relative optional arguement to true local myResX, myResY = 1024, 768 -- This is my resolution. Relace it with yours ^^ guiCreateWindow ( 40/myResX, 30/myResY, 300/myResX , 600/myResY, "Relative sized window", true )
  5. Nab bonana Mr.Tasty is right. Its because of that shadow. U need to remove hex codes from shadow string.
  6. I created a vertical scroll bar script with dx functions. You can take a look if you want.
  7. Saml1er

    Maths help

    Bro, we're on the same boat. viewtopic.php?f=91&t=84143
  8. How am I suppose to use it? local font = dxCreateFont("bankgothic",20) local txt = "starting next map:" dxDrawText(txt, sx*(291/1024), sy*(598/768),sx*( 594/1024), sy*(620/768), tocolor(175, 58, 196, 255),dxGetTextWidth(txt,sx*(1/1024), font),font, "left", "top", false, false, true, false, false) EDIT: I just don't understand how to calculate relative size for dxCreateFont. Maybe this? https://wiki.multitheftauto.com/wiki/DxGetFontHeight
  9. Hello! How do calculate relative size for dxCreateFont? local font = dxCreateFont("bankgothic",20) dxDrawText("starting next map:", sx*(291/1024), sy*(598/768),sx*( 594/1024), sy*(620/768), tocolor(175, 58, 196, 255),sx*(1/1024),font, "left", "top", false, false, true, false, false)
  10. DDC is not using Bonsai's script. DDC mgm was made 1 year ago by Karevan.
  11. Ban from internet. Such kind of people shouldn't be helped in the first place.
  12. Hello! It took me like 2 hours to make this script so later I thought that selling it will not be fair. It does nothing special but simply renders 3D lines. http://www.dailymotion.com/video/x2bt2f ... videogames Start from 2:10, Skip my boring gameplay Download: https://community.multitheftauto.com/index.php?p= ... s&id=10689
  13. local t = { 5, 6, ja = "4" , ya= "8" } local str = toJSON ( t ) -- Now we have a json string local t2 = fromJSON ( t ) -- Now we convert it back to table for _, v in pairs ( t2 ) do outputChatBox (v ) -- output the values end
  14. Saml1er

    Matrix rays

    I believe you can do something like this. local x,y,z = getPositionFromElementOffset(element,0,4,0) local int_RayX = x local int_RayY = y local int_RayZ = z
  15. Saml1er

    Matrix rays

    Check the first example. https://wiki.multitheftauto.com/wiki/GetElementMatrix
  16. Well I think you misunderstood this. I'm sure thid error starts after 17 because there is no 18 index in table.
  17. JSON is the best method to save data. It doesn't lagg at all. XML will lagg. MTA JSON functions don't work that good. You should download jeffery's json module for lua.
  18. Nono. isPedDead will also get waiting players so it's useless. local function getRaceAlivePlayers () local theTable = { } local players = getElementsByType("player") for i=1, #players do local v = players[i] if getElementData (v,"state") == "alive" then theTable[#theTable+1]=v end end return theTable end
  19. Download FileZilla and connect via ftp and add files withouy any problem
  20. You could've simple added this simple script in your map resource. -- server side local objs = getElementsByType("object", resourceRoot ) for i=1, #objs do setElementDimension (objs[i], 1) -- desired dimension end
  21. I understand, this is not the issue. The function is to be called on elements so it's a good thing pickups are elements. I think you are confusing the normal pickups (created with createPickup) with the race pickups (created with createObject). I thought they were same.
  22. Ye log ab keh rahay hain ke hum log army ke bacho ko kidnap kerenge.
  23. Saml1er

    Gate problem.

    CreateColCircle has only 3 arguements. So it should be createColCircle ( X , Y, radius ) I hope this helps. EDIT: All you need to do is createColCircle (-13.60, 2067.30, 19) -- Now decrease 19
×
×
  • Create New...