Jump to content

Darker

Members
  • Posts

    5
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Darker's Achievements

Vic

Vic (3/54)

0

Reputation

  1. Darker

    exp_system

    Bueno quiero pedirles ayuda para este script, que consiste en dibujar una img en el scoreboard segun el level de la persona, aqui el script, el sistema de niveles es el exp_system de castillo. function darnivel ( thePlayer ) local myLevel = exports.exp_system:getPlayerLevel ( thePlayer ) setElementData ( thePlayer, "Rank", ":rangos/".. myLevel ..".png" ) end addEventHandler ( "onPlayerLogin", getRootElement ( ), darnivel) PD: Ya tengo editado el scoreboard para que acepte imagenes.
  2. Darker

    MapNames

    Tengo este resource que saque de la comunidad, que dibuja los nombres de las personas en F11. Mi pregunta es que, si se podía hacer igual pero con el radar, y de ser así cómo? local textFont = "default-bold" -- The font of the tag text local textScale = 1 -- The scale of the tag text local heightPadding = 1 -- The amount of pixels the tag should be extended on either side of the vertical axis local widthPadding = 1 -- The amount of pixels the tag should be extended on either side of the horizontal axis local xOffset = 8 -- Distance between the player blip and the tag local minAlpha = 10 -- If blip alpha falls below this, the tag won't the shown local textAlpha = 255 local rectangleColor = tocolor(0,0,0,230) -- Other variables local floor = math.floor local w,h = guiGetScreenSize() local function drawMapStuff() if isPlayerMapVisible() then local sx,sy,ex,ey = getPlayerMapBoundingBox() -- Map positions local mw,mh = ex-sx,sy-ey -- Map width/height local cx,cy = (sx+ex)/2,(sy+ey)/2 -- Center position of the map local ppuX,ppuY = mw/6000,mh/6000 -- Pixels per unit local fontHeight = dxGetFontHeight(textScale,textFont) -- Height of the specified font local yOffset = fontHeight/2 -- How much pixels the tag should be offsetted at local blips = getElementsByType("blip") for k,v in ipairs(blips) do local attached=getElementAttachedTo(v) if isElement(attached) and getElementType(attached)=="player" then local px,py = getElementPosition(attached) -- Player's position local x = floor(cx+px*ppuX+xOffset) -- X for the nametag local y = floor(cy+py*ppuY-yOffset) -- Y for the nametag local pname = findPlayerByName(attached) -- Player name local nameLength = dxGetTextWidth(pname,textScale,textFont) -- Width of the playername local r,g,b = getPlayerNametagColor(attached) -- Player's nametag color local _,_,_,a = getBlipColor(v) -- Blip alpha if a>minAlpha then dxDrawRectangle(x-widthPadding,y+heightPadding,nameLength+widthPadding*2,fontHeight-heightPadding*2,rectangleColor,false) dxDrawText(pname,x,y,x+nameLength,y+fontHeight,tocolor(r,g,b,textAlpha),textScale,textFont,"left","top",true,true,true,true) end end end end end addEventHandler("onClientRender",getRootElement(),drawMapStuff)
  3. Con qué funciones puedo hacer un comando, que al escribirlo lo saque de un grupo de acl? Por ejemplo pongo /leave y me saque del grupo de acl "Clan" Me podrían ayudar?
  4. En el exp_system hay un Event que es event onPlayerLevelUP Queria poner que al subir de level pusiera un dxDrawText en la pantalla, en ese caso se podria usar ese event? y cómo?
  5. Bueno tenia una duda sobre el scoreboard, quiero editar el espacio que queda abajo y arriba del nombre Quiero hacerlos mas grandes para que quepan unas imágenes ya que para que quepan y no se amontonen con las otras tengo reducir su tamaño y se ven muy pequeñas Quería saber si me pueden decir donde se encuentra el guion para editar eso y en que archivo .lua del scoreboard
×
×
  • Create New...