SaNoR

Members
  • Content Count

    32
  • Joined

  • Last visited

  • Days Won

    1

SaNoR last won the day on October 15 2018

SaNoR had the most liked content!

Community Reputation

13 Decent

1 Follower

About SaNoR

  • Rank
    Rat

Recent Profile Visitors

404 profile views
  1. SaNoR

    Dx Visibility

    function Dx () if getPlayerTeam(localPlayer) == getTeamFromName("Admins") then dxDrawText("text", 1, 1, 1, 1, tocolor(250, 120, 4, 255), 7.00, "bankgothic", "center", "center", false, false, false, false, false) end end
  2. SaNoR

    Hex Name colors

    You're welcome.
  3. SaNoR

    Hex Name colors

    dxDrawText( un:O(killRow[r]["killerName"]), killRow[r]["killerNamePos"]["leftX"] + 1, killRow[r]["killerNamePos"]["topY"] + 1, killRow[r]["killerNamePos"]["rightX"] + 1, killRow[r]["killerNamePos"]["bottomY"] + 1, label_shadowColor, 1, label_font, "right", _, _, _, _, true) dxDrawText( killRow[r]["killerName"], killRow[r]["killerNamePos"]["leftX"], killRow[r]["killerNamePos"]["topY"], killRow[r]["killerNamePos"]["rightX"], killRow[r]["killerNamePos"]["bottomY"], killRow[r]["killerNameColor"], 1, label_font, "right", _, _, _, _, true) This should help. I just forgot to do it
  4. SaNoR

    Health problem

    I test it in local server and everything works fine. Maybe you're problem in "ArMoR" event.
  5. SaNoR

    Health problem

    function armor(loss) local Health = getElementHealth(source) local Armour = getPedArmor(source) if Armour - tonumber(loss) >= 0 then setPedArmor(source, Armour - tonumber(loss)) else setPedArmor(source, 0) end if getPedArmor(source) == 0 then setElementHealth(source, Health + (Armour - tonumber(loss))) end end addEvent("ArMoR", true) addEventHandler("ArMoR", getRootElement(), armor)
  6. SaNoR

    Hex Name colors

  7. SaNoR

    Hex Name colors

    function renderClientKillPanel () for r = 1, rows do if killRow[r] then dxDrawText( killRow[r]["killerName"], killRow[r]["killerNamePos"]["leftX"] + 1, killRow[r]["killerNamePos"]["topY"] + 1, killRow[r]["killerNamePos"]["rightX"] + 1, killRow[r]["killerNamePos"]["bottomY"] + 1, label_shadowColor, 1, label_font, "right", "top", _, _, _, true) dxDrawText( killRow[r]["killerName"], killRow[r]["killerNamePos"]["leftX"], killRow[r]["killerNamePos"]["topY"], killRow[r]["killerNamePos"]["rightX"], killRow[r]["killerNamePos"]["bottomY"], killRow[r]["killerNameColor"], 1, label_font, "right", "top", _, _, _, true) dxDrawImage( killRow[r]["reasonIconPos"]["leftX"], killRow[r]["reasonIconPos"]["topY"], icon_width, icon_height, imagePath[ killRow[r]["deathReason"] ] ) dxDrawText( killRow[r]["victimName"], killRow[r]["victimNamePos"]["leftX"] + 1, killRow[r]["victimNamePos"]["topY"] + 1, killRow[r]["victimNamePos"]["rightX"] + 1, killRow[r]["victimNamePos"]["bottomY"] + 1, label_shadowColor, 1, label_font, "right", "top", _, _, _, true) dxDrawText( killRow[r]["victimName"], killRow[r]["victimNamePos"]["leftX"], killRow[r]["victimNamePos"]["topY"], killRow[r]["victimNamePos"]["rightX"], killRow[r]["victimNamePos"]["bottomY"], killRow[r]["victimNameColor"], 1, label_font "right", "top", _, _, _, true) end end end addEventHandler ( "onClientRender", root, renderClientKillPanel )
  8. SaNoR

    dx list scrolling

  9. SaNoR

    bone_attach - cannot resume dead coroutine

    setTimer(function() if coroutine.status (clearing_nonexisting_peds) == "dead" then clearing_nonexisting_peds = coroutine.create(forgetNonExistingPeds) end coroutine.resume(clearing_nonexisting_peds) end, 1000, 0)
  10. SaNoR

    Level System Help!

    function Exp(user, cmd, Player, Quantity) local AccountPlayer = getAccountName(getPlayerAccount(user)) if isObjectInACLGroup("user."..AccountPlayer, aclGetGroup("Admin")) then if Player and Quantity then local Playername = getPlayerFromName(Player) if Playername then if Quantity:match("^%d+$") then local lvl = getElementData(Playername, "Level") or 1 local exp = getElementData(Playername, "Exp") or 0 local Maximumprogress = getElementData(Playername, "maximumprogress") if tonumber(exp) + tonumber(Quantity) >= Maximumprogress then setElementData(Playername, "Level", tonumber(lvl) + 1) setElementData(Playername, "Exp", 0) else setElementData(Playername, "Exp", tonumber(exp) + tonumber(Quantity)) end else outputChatBox("Quantity must be a number.", user, 255, 0, 0) end else outputChatBox("Player not found.", user, 255, 0, 0) end else outputChatBox("/exp [Player, Quantity].", user, 255, 0, 0) end else outputChatBox("You don't have rights.", user, 255, 0, 0) end end addCommandHandler("exp", Exp)
  11. SaNoR

    Problem with setTimer

    https://wiki.multitheftauto.com/wiki/Introduction_to_Scripting_the_GUI#Relative_and_Absolute
  12. SaNoR

    Problem with setTimer

    local sw, sh = guiGetScreenSize() local jumpTimer = 0 local reload = 3000 function jump() if getTickCount() - jumpTimer > reload then local vehicle = getPedOccupiedVehicle(localPlayer) if(vehicle)then local sx, sy, sz = getElementVelocity(vehicle) setElementVelocity(vehicle, sx, sy, sz+0.33) end jumpTimer = getTickCount() end end addEventHandler("onClientRender", root, function() local now = getTickCount() local endTime = jumpTimer + reload local elapsedTime = now - jumpTimer local duration = endTime - jumpTimer local progress = elapsedTime / duration local width = interpolateBetween(0, 0, 0, 200, 0, 0, progress, "Linear") dxDrawRectangle(sw/2 - 100, sh - 100, 200, 20, tocolor(0, 0, 0, 180)) dxDrawRectangle(sw/2 - 100, sh - 100, width, 20, tocolor(0, 255, 0, 180)) end) bindKey("lshift", "down", jump)
  13. SaNoR

    Vehicle engine starter

    function engine() local vehicle = getPedOccupiedVehicle(localPlayer) if isElement(vehicle) and getPedOccupiedVehicleSeat(localPlayer) == 0 then local state = getVehicleEngineState(vehicle) if not state then startTimer = setTimer( function() if isElement(vehicle) and getPedOccupiedVehicleSeat(localPlayer) == 0 then setVehicleEngineState(vehicle, true) end end , 2000, 1) else setVehicleEngineState(vehicle, false) end end end function resetEngine() if isTimer(startTimer) then killTimer(startTimer) end end bindKey("2", "down", engine) bindKey("2", "up", resetEngine)
  14. SaNoR

    GHOSTMODE FOR PEDS

    setElementCollisionsEnabled Note: Disabling a peds collisions will cause some problems, such as it being unable to move. setElementCollidableWith
  15. SaNoR

    [HELP] CallRemote

    https://wiki.multitheftauto.com/wiki/Template:Error_codes_for_callRemote_and_fetchRemote Try without "mtasa://" callRemote ( "XXX.XXX.XX.XXX:XXXXX",getResourceFromName('runcode'),'httpRun',finishedCallback,"outputChatBox('Text',root)" )