Spc

Members
  • Content Count

    40
  • Joined

  • Last visited

Community Reputation

1 Neutral

1 Follower

About Spc

  • Rank
    Rat
  • Birthday July 24

Details

  • Location
    Poland

Recent Profile Visitors

479 profile views
  1. I tried something like that local w = dxGetTextWidth(v, 1, newsFont) local rows = math.ceil(w/370) local h = rows * dxGetFontHeight(1, newsFont) (of course I tried math.floor and without) But still don't work.
  2. function darmanKardan (thePlayer, command, player) if player then local taraf = getPlayerFromName(player) setElementData(taraf,"healrequest", "pending") outputChatBox("#00ff00The doctor is willing to heal you. Do you accept?", taraf, 255, 255, 255, true) else outputChatBox("#ff0000Syntax: /heal <Name>", thePlayer, 255, 255, 255, true) end end addCommandHandler("heal", darmanKardan) function acceptHeal (thePlayer, command) local requestStatus = getElementData(thePlayer, "healrequest") if (requestStatus == "pending") then setElementData(player,"healrequest", "unpending") setElementHealth(player, 100) outputChatBox("#00ff00You have been healed by the doctor.", thePlayer, 255, 255, 255, true) else outputChatBox("#ff0000[Error]: #ffffffYou have no pending request.", thePlayer, 255, 255, 255, true) end end addCommandHandler("aheal", acceptHeal) Try it.
  3. Hey, I have problem with calculating the whole text height. local sw, sh = guiGetScreenSize() local newsFont = dxCreateFont("fonts/Lato.ttf", 8) local NEWS = {} -- example texts here function renderNews() local height = 0 for _, v in ipairs(NEWS) do local h = math.ceil((string.len(v) / 65)) * 25 dxDrawRectangle(sw-385, 95+height, 370, h, tocolor(0,0,0,155)) dxDrawText(v, sw-380, 100+height, sw-15, 100+h+height, tocolor(255,255,255,255), 1, newsFont, "left", "top", true, true) height = height + h + 10 end end I don't have any idea how to do that. I want the height to match every text.
  4. Spc

    [Question] Priv

    You added that file to meta.xml?
  5. Hey, I want to change green elements from the world (grass, trees). I want to change them so that the world looks deserted (maybe just simply darken them). Is there any way to do that? For example shader or just changing textures.
  6. I fixed it, thanks for help. All works.
  7. I used getScreenFromWorldPosition and sometimes the function returns false when i was looking at explosion position, and sometimes function returns float when i wasn't looking at explosion xyz.
  8. Hey, I'm making a flashbang and i need check, is player looking at XYZ position. For example: The explosion xyz is 0,0,0 and if player camera looks at it, something happens.
  9. Code: addEventHandler("onClientRender", getRootElement(), function() if getElementData(localPlayer, "auth:uid") then if isPlayerHudComponentVisible("radar") then -- the hiding don't work -- some DX draw end end end)
  10. Hey, I want to disable custom HUD (my own created) with command /showhud. These functions didn't work: addCommandHandler onPlayerCommand isPlayerHudComponentVisible("radar") Any sollution?
  11. Spc

    [HELP] Fake "hitbox"

    How can i detect shoot in colshape from checking if is something between two elements??
  12. Spc

    [HELP] Fake "hitbox"

    I want to check if the player has shooted in the colshape.
  13. I have a large skin with bugged hitbox, so I wanted to make a "fake hitbox". In onClientPlayerWeaponFire is a parameter "hitElement" but it doesn't work on colshape. Any sollution?
  14. Spc

    Help me with setTimer

    Maybe this? ship = createObject(8493, -5704.3999023438, 3755.1000976563, 15.60000038147,0,0, 261.49658203125) moveObject (ship,20000, -5195.1303710938, 3695.7001953125, 15.60000038147) setTimer(function() moveObject (ship,30000, -5195.1303710938, 3695.7001953125, 199.60000038147) end, time*1000, 1) in the place "time" enter the time in seconds for how long the timer function should be performed