Jump to content

ZuKoMTA

Members
  • Posts

    5
  • Joined

  • Last visited

Details

  • Gang
    The Force Of Gravity

ZuKoMTA's Achievements

Vic

Vic (3/54)

0

Reputation

  1. Hello , for community MTASA , I found gta5 shader , I noticed on some server that can be done to you could see shaders only acl to which they are added. Could you explain to me how to do it? Thank you.
  2. It does not show the name of the team and player names instead of codes . Screen: https://imagizer.imageshack.us/v2/629x354q90/537/2ds7XS.jpg
  3. Hello. I have a problem because I would like to name the team in which the player is showed on the nickname , but the code that I have does not work. nametag = {} local nametags = {} local g_screenX,g_screenY = guiGetScreenSize() local bHideNametags = false local NAMETAG_SCALE = 0.3 local NAMETAG_ALPHA_DISTANCE = 50 local NAMETAG_DISTANCE = 120 local NAMETAG_ALPHA = 120 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 local maxScaleCurve = { {0, 0}, {3, 3}, {13, 5} } local textScaleCurve = { {0, 0.8}, {0.8, 1.2}, {99, 99} } 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 function renderNametagsForPlayers() 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() if getElementData(localPlayer,"loginState") then return end 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 local sx,sy = getScreenFromWorldPosition ( px, py, pz+0.95, 0.06 ) if not sx or not sy then break end 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) local r,g,b = 255,255,255 local team = getPlayerTeam(player) local tm = getTeamName(team) if team then r,g,b = getTeamColor(team) dxDrawText ( "..tm.."\ngetPlayerNametagText(player), sx, sy - offset, sx, sy - offset, tocolor(r,g,b,textalpha), textscale*NAMETAG_TEXTSIZE, raceInterface.font, "center", "bottom", false, false, false, true ) else dxDrawText ( getPlayerNametagText(player), sx, sy - offset, sx, sy - offset, tocolor(r,g,b,textalpha), textscale*NAMETAG_TEXTSIZE, raceInterface.font, "center", "bottom", false, false, false, true ) end local offset = (scale) * NAMETAG_TEXT_BAR_SPACE/2 local drawX = sx - NAMETAG_WIDTH*scale/2 drawY = sy + offset local width,height = NAMETAG_WIDTH*scale, NAMETAG_HEIGHT*scale 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) end break end end end 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 )
  4. ZuKoMTA

    Rainbow tags

    I would like the player who enters the TFG ~ to nick . Getting to him 255,87,0 color , and every 4 seconds changed color 0,255,0 1 second , and then again 255,87,0 . Codes gives sloppy . I just want it to look like on the server TFF
  5. ZuKoMTA

    Rainbow tags

    Hello . I would like you to help me with skryptek , which should add a tag . This is not my script . I do not know how it works. Could you explain it for me ? I would like to make it work for TFF DM . clanPlayers[] = { "TFG~", "Name2", "Name3" } local colorCodeRed[] = {255,0,0} local colorCodeGreen[] = {0,255,0} local colorCodeBlue[] = {0,0,255} setTimer(function() if isInClan(source) == true then setPlayerName(source,"TFG~/"..getPlayerName(source)) end end,1000,0) function isInClan(player) local name = getPlayerName(player) for i,v in ipairs (clanPlayers) do if name == clanPlayers[1] then return true end end return false end
×
×
  • Create New...