-
Posts
2,869 -
Joined
-
Last visited
Everything posted by Alexs
-
Pues, no deberia, a pesar de tu burdo ejemplo. function blablabla( button, state, absoluteX, absoluteY, worldX, worldY, worldZ, clickedWorld ) if getElementType(clickedWorld) == "vehicle" then guiSetVisible(esosargumentos) end end addEventHandler("onClientClick", getLocalPlayer(), blablabla)
-
El Parametro "clickedWorld" te podria servir Para saber si es un carro algo asi: if getElementType(clickedWorld) == "vehicle" then
-
el '#' devuelve un string?
-
A simple vista, si pero no sabemos los eventos que triggeas
-
No recuerdo la funcion, pero lo q yo hacia era darle un ligero golpe con esta y se levantaba por delante... deja, la busco y edito el post Intenta con: https://wiki.multitheftauto.com/wiki/SetElementVelocity qiza si le das un ligero toke en el Z se levante, pero muy ligero o saltara
-
Si lo siento, pense que el tuyo los tenia completo y no me di el animo de contarlos
-
Para lo q el busca bastaba con poner esto: dxDrawText(pname,x,y,x+nameLength,y+fontHeight,tocolor(r,g,b,textAlpha),textScale,textFont,"left","top",false,false,false) Asi: dxDrawText(pname,x,y,x+nameLength,y+fontHeight,tocolor(r,g,b,textAlpha),textScale,textFont,"left","top",false,true,false)
-
function dxDrawColorText(str, ax, ay, bx, by, color, scale, font, alignX, alignY) bx, by, color, scale, font = bx or ax, by or ay, color or tocolor(255,255,255,255), scale or 1, font or "default" if alignX then if alignX == "center" then ax = ax + (bx - ax - dxGetTextWidth(str:gsub("#%x%x%x%x%x%x",""), scale, font))/2 elseif alignX == "right" then ax = bx - dxGetTextWidth(str:gsub("#%x%x%x%x%x%x",""), scale, font) end end if alignY then if alignY == "center" then ay = ay + (by - ay - dxGetFontHeight(scale, font))/2 elseif alignY == "bottom" then ay = by - dxGetFontHeight(scale, font) end end -- Settings variables 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 = getPlayerName(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) dxDrawColorText(pname, x,y,x+nameLength,y+fontHeight, tocolor(r,g,b,textAlpha), textScale,textFont,"left","top") --Asi te digo, pero para lo q buscas usa el de abajo end end end end end addEventHandler("onClientRender",getRootElement(),drawMapStuff) Usa este: -- Settings variables 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 = getPlayerName(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",false,true,false) end end end end end addEventHandler("onClientRender",getRootElement(),drawMapStuff)
-
No se como el color Text te serviria aca pero para usarlo reemplazar el dxDrawText por este y ademas agregas su codigo: function dxDrawColorText(str, ax, ay, bx, by, color, scale, font, alignX, alignY) bx, by, color, scale, font = bx or ax, by or ay, color or tocolor(255,255,255,255), scale or 1, font or "default" if alignX then if alignX == "center" then ax = ax + (bx - ax - dxGetTextWidth(str:gsub("#%x%x%x%x%x%x",""), scale, font))/2 elseif alignX == "right" then ax = bx - dxGetTextWidth(str:gsub("#%x%x%x%x%x%x",""), scale, font) end end if alignY then if alignY == "center" then ay = ay + (by - ay - dxGetFontHeight(scale, font))/2 elseif alignY == "bottom" then ay = by - dxGetFontHeight(scale, font) end end local alpha = string.format("%08X", color):sub(1,2) local pat = "(.-)#(%x%x%x%x%x%x)" local s, e, cap, col = str:find(pat, 1) local last = 1 while s do if cap == "" and col then color = tocolor(getColorFromString("#"..col..alpha)) end if s ~= 1 or cap ~= "" then local w = dxGetTextWidth(cap, scale, font) dxDrawText(cap, ax, ay, ax + w, by, color, scale, font) ax = ax + w color = tocolor(getColorFromString("#"..col..alpha)) end last = e + 1 s, e, cap, col = str:find(pat, last) end if last <= #str then cap = str:sub(last) dxDrawText(cap, ax, ay, ax + dxGetTextWidth(cap, scale, font), by, color, scale, font) end end
-
Podes postear la parte del recurso "mapnames" ??
-
[APORTE]SX-Restarter - mantener servidor online
Alexs replied to samt2497's topic in Recursos y aportes
Buen Aporte, Toma una Galleta! -
Se puede usar para FastDL, pero no para mantenerlo en el, mejor busca un VPS gratuito
-
Clickea createProjectile y ve su informacion, Rojo es Client
-
Es imposible, podes editarlo con un programa de modelaje 3D, pero con script es imposible
-
GameServers4You, for all your gameserver needs.
Alexs replied to GameServers4You's topic in Hosting solutions
add me on Skype if you want to Skype, but between OG.Servers and GameServers4You there is a lot of speed in difference -
GameServers4You, for all your gameserver needs.
Alexs replied to GameServers4You's topic in Hosting solutions
This Host is very bad, is lagger and slow. -
Tienes un Hosting web?
-
Te equivocas, debido a un bug los Peds no pueden disparar bazookas tan facilmente. lose de ay el "podrias" ya lo intente ya podrian mejorar mas el mta y menos su apariencia ,total tambien lo puede usar para otras armas... y tampoco pierde nada por intentarlo cometiendo errores se aprende. Yo ya logre hacer un ped disparar una bazooka, pero lo que hice fue crear un misil y hacer que el ped haga la animacion antes de crearlo.
-
onPlayerSpawn isObjectInACLGroup killPed