Jump to content

Spyke25

Members
  • Posts

    68
  • Joined

  • Last visited

Everything posted by Spyke25

  1. Ill try, thank you!
  2. Map Editor ACL ? Where is? resources - [editor] ?
  3. Hello dear community. I'm making my v. 4 called "Icy Island" and I would to use the tool CSM to make some invisible shades CSM Tool video : But, well.. I got a problem with creating CSM.lua inside my map's folder.. and that's what happened in my local server's console : ( I can't do the step on 0:33 of the video )
  4. Standard version of what?
  5. This doesn't help me, sorry.
  6. Hello community. I got a dedicated computer ( Windows Server 2008 ). I would to make some servers on it, then i tried to make an MTA Server, but then i get a problem : Join the server -> Playing on it some time -> Connection Timed Out. Now, i think i know what's the problem, but i need your help. The files server for a dedicated are different, right? Cause i installed the server in the classic mode (with the setup -> Server Only) So, how to install an MTA Server in a Window Server 2008? Thank you.
  7. Spyke25

    Objects bug?

    So the community is working to fix it?
  8. Spyke25

    Objects bug?

    I got a bug; Is a bug that show the objects under water . . Screen : http://oi40.tinypic.com/29z7p60.jpg Someone else has this bug?
  9. I asked here cause i dont know lua, but if nobody can make / explain me this script, no problem, i will ask away.
  10. Oh ye, you all right, the default is ok. BTW, what i need to edit then?
  11. With strange characters i mean : http://oi41.tinypic.com/4zsvaw.jpg
  12. Oh, you all right, that's just rankingboard.lua. But man, rankingboard_client.lua contains strange characters o,o
  13. Ok, it contains : RankingBoard = {} RankingBoard.__index = RankingBoard RankingBoard.clientInstances = {} function RankingBoard:create() local result = { id = #RankingBoard.clientInstances + 1, items = {} } RankingBoard.clientInstances[result.id] = true clientCall(g_Root, 'RankingBoard.create', result.id) result.joinHandler = function() result:playerJoined(source) end addEventHandler('onPlayerJoin', getRootElement(), result.joinHandler) return setmetatable(result, self) end function RankingBoard:clientCall(player, fn, ...) clientCall(player, 'RankingBoard.call', self.id, fn, ...) end local savedplrcount = 1 function RankingBoard:setDirection(direction, plrcount) savedplrcount = plrcount if direction == 'up' or direction == 'down' then self.direction = direction self:clientCall(g_Root, 'setDirection', direction, plrcount ) end end function RankingBoard:add(player, time) local playerName = getPlayerName(player) if table.find(self.items, 'name', playerName) then return end table.insert(self.items, { name = playerName, time = time }) self:clientCall(g_Root, 'add', playerName, time) end function RankingBoard:playerJoined(player) clientCall(player, 'RankingBoard.create', self.id) if self.direction then self:clientCall(player, 'setDirection', self.direction, savedplrcount ) end self:clientCall(player, 'addMultiple', self.items) end function RankingBoard:clear() self:clientCall(g_Root, 'clear') self.items = {} end function RankingBoard:destroy() self:clientCall(g_Root, 'destroy') removeEventHandler('onPlayerJoin', getRootElement(), self.joinHandler) RankingBoard.clientInstances[self.id] = nil end Can you edit it for me, please?
  14. Ok, but which file i need to edit?
  15. Hey all, i would to enable the color code at the Death-messages like that : ( Cause mine is white ) So, what file i need to edit? And then i will post my code and i hope you can help me enable it
  16. Look this : is from ffs this server have a bold nametag, how to set it? And, no i havent the name up my car i only see the name up the other cars
  17. How i can make it bold? How i can make it appear on my car too?
  18. Man, i mean on the server, not a personal thing, so i need to edit nametag.lua Edit : ok i have understand
  19. Hi all, I have this type of nametag : But i would to have this : Cause is more simple, and i like it My code is this : nametag = {} local nametags = {} local g_screenX,g_screenY = guiGetScreenSize() local bHideNametags = false local NAMETAG_SCALE = 0.3 --Overall adjustment of the nametag, use this to resize but constrain proportions local NAMETAG_ALPHA_DISTANCE = 50 --Distance to start fading out local NAMETAG_DISTANCE = 120 --Distance until we're gone local NAMETAG_ALPHA = 120 --The overall alpha level of the nametag --The following arent actual pixel measurements, they're just proportional constraints local NAMETAG_TEXT_BAR_SPACE = 2 local NAMETAG_WIDTH = 50 local NAMETAG_HEIGHT = 5 local NAMETAG_TEXTSIZE = 0.3 local NAMETAG_OUTLINE_THICKNESS = 1.2 -- local NAMETAG_ALPHA_DIFF = NAMETAG_DISTANCE - NAMETAG_ALPHA_DISTANCE NAMETAG_SCALE = 1/NAMETAG_SCALE * 800 / g_screenY -- Ensure the name tag doesn't get too big local maxScaleCurve = { {0, 0}, {3, 3}, {13, 5} } -- Ensure the text doesn't get too small/unreadable local textScaleCurve = { {0, 0.8}, {0.8, 1.2}, {99, 99} } -- Make the text a bit brighter and fade more gradually local textAlphaCurve = { {0, 0}, {25, 100}, {120, 190}, {255, 190} } function nametag.create ( player ) nametags[player] = true end function nametag.destroy ( player ) nametags[player] = nil end ---------------THE FOLLOWING IS THE MANAGEMENT OF NAMETAGS----------------- addEventHandler('onClientResourceStart', g_ResRoot, function() for i,player in ipairs(getElementsByType"player") do if player ~= g_Me then nametag.create ( player ) end end end ) addEventHandler ( "onClientPlayerJoin", g_Root, function() if source == g_Me then return end setPlayerNametagShowing ( source, false ) nametag.create ( source ) end ) addEventHandler ( "onClientPlayerQuit", g_Root, function() nametag.destroy ( source ) end ) addEvent ( "onClientScreenFadedOut", true ) addEventHandler ( "onClientScreenFadedOut", g_Root, function() bHideNametags = true end ) addEvent ( "onClientScreenFadedIn", true ) addEventHandler ( "onClientScreenFadedIn", g_Root, function() bHideNametags = false end ) addEventHandler ( "onClientRender", g_Root, function() -- Hideous quick fix -- for i,player in ipairs(g_Players) do if player ~= g_Me then setPlayerNametagShowing ( player, false ) if not nametags[player] then nametag.create ( player ) end end end if bHideNametags then return end local x,y,z = getCameraMatrix() for player in pairs(nametags) do while true do if not isPedInVehicle(player) or isPlayerDead(player) then break end local vehicle = getPedOccupiedVehicle(player) local px,py,pz = getElementPosition ( vehicle ) local pdistance = getDistanceBetweenPoints3D ( x,y,z,px,py,pz ) if pdistance <= NAMETAG_DISTANCE then --Get screenposition local sx,sy = getScreenFromWorldPosition ( px, py, pz+0.95, 0.06 ) if not sx or not sy then break end --Calculate our components local scale = 1/(NAMETAG_SCALE * (pdistance / NAMETAG_DISTANCE)) local alpha = ((pdistance - NAMETAG_ALPHA_DISTANCE) / NAMETAG_ALPHA_DIFF) alpha = (alpha < 0) and NAMETAG_ALPHA or NAMETAG_ALPHA-(alpha*NAMETAG_ALPHA) scale = math.evalCurve(maxScaleCurve,scale) local textscale = math.evalCurve(textScaleCurve,scale) local textalpha = math.evalCurve(textAlphaCurve,alpha) local outlineThickness = NAMETAG_OUTLINE_THICKNESS*(scale) --Draw our text local r,g,b = 255,255,255 local team = getPlayerTeam(player) if team then r,g,b = getTeamColor(team) end local offset = (scale) * NAMETAG_TEXT_BAR_SPACE/2 --dxDrawText ( getPlayerName(player), sx, sy - offset, sx, sy - offset, tocolor(r,g,b,textalpha), textscale*NAMETAG_TEXTSIZE, "default", "center", "bottom", false, false, false ) dxDrawText ( getPlayerName(player), sx + 1, sy - offset + 1, sx + 1, sy - offset + 1, tocolor(0,0,0,255), textscale*NAMETAG_TEXTSIZE, "bankgothic", "center", "bottom", false, false, false ) dxDrawColorText( getPlayerNametagText(player), sx, sy - offset, sx, sy - offset, tocolor(r,g,b,textalpha), textscale*NAMETAG_TEXTSIZE, 'bankgothic', 'center', 'bottom' ) --We draw three parts to make the healthbar. First the outline/background local drawX = sx - NAMETAG_WIDTH*scale/2 drawY = sy + offset local width,height = NAMETAG_WIDTH*scale, NAMETAG_HEIGHT*scale dxDrawRectangle ( drawX, drawY, width, height, tocolor(0,0,0,alpha) ) --Next the inner background local health = getElementHealth(vehicle) health = math.max(health - 250, 0)/750 local p = -510*(health^2) --local r,g = math.max(math.min(p + 255*health + 255, 255), 0), math.max(math.min(p + 765*health, 255), 0) dxDrawRectangle ( drawX + outlineThickness, drawY + outlineThickness, width - outlineThickness*2, height - outlineThickness*2, tocolor(178,178,178,0.4*alpha) ) --Finally, the actual health dxDrawRectangle ( drawX + outlineThickness, drawY + outlineThickness, health*(width - outlineThickness*2), height - outlineThickness*2, tocolor(r,g,b,alpha) ) end break end end end ) function dxDrawColorText(str, ax, ay, bx, by, color, scale, font, alignX, alignY) if alignX then if alignX == "center" then local w = dxGetTextWidth(str:gsub("#%x%x%x%x%x%x",""), scale, font) ax = ax + (bx-ax)/2 - w/2 elseif alignX == "right" then local w = dxGetTextWidth(str:gsub("#%x%x%x%x%x%x",""), scale, font) ax = bx - w end end if alignY then if alignY == "center" then local h = dxGetFontHeight(scale, font) ay = ay + (by-ay)/2 - h/2 elseif alignY == "bottom" then local h = dxGetFontHeight(scale, font) ay = by - h end end 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(tonumber("0x"..col:sub(1, 2)), tonumber("0x"..col:sub(3, 4)), tonumber("0x"..col:sub(5, 6)), 255) 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(tonumber("0x"..col:sub(1, 2)), tonumber("0x"..col:sub(3, 4)), tonumber("0x"..col:sub(5, 6)), 255) end last = e + 1 s, e, cap, col = str:find(pat, last) end if last <= #str then cap = str:sub(last) local w = dxGetTextWidth(cap, scale, font) dxDrawText(cap, ax, ay, ax + w, by, color, scale, font) end end Someone can replace my current type font with this? Thank you all
  20. Thank you Towncivilian, my MTA looks works fine now
  21. I think I fixed my problem : viewtopic.php?f=101&t=37137 If the error persist, i will post again, thanks.
  22. With this version i have : Someone else have that problem, i heard..
×
×
  • Create New...