Jump to content

Admigo

Members
  • Posts

    175
  • Joined

  • Last visited

Everything posted by Admigo

  1. Heey guys, I make derby maps and i want to let one random player get the plane and the other players the other cars but how? Thnks admigo
  2. I deleted in meta so now my colour show up if i die. Only i need to delete the hex colour in deathmessage. Fix pls.
  3. Dont work. Its something in meta i think. <setting name="*color" value="#ffaa00" /> <setting name="*show_bodypart" value="[true]" /> <setting name="*show_weapon" value="[true]" /> <setting name="*show_vehiclename" value="[true]" />
  4. Heey All, If you die you see deadmessage in white and with hexcolour if u use it in name. I want to delete the hex color code and change the color of the name if you use hex color. So if i am #FFFF00Admigo And i die you see Admigo in yellow in deathmessage. Here is the code: local root = getRootElement() addEventHandler("onPlayerWasted", root, function (ammo, killer, weapon, bodypart) local r, g, b = getColorFromString(string.upper(get("color"))) local message if killer then if killer ~= source then local killerType = getElementType(killer) if killerType == "player" then message = getPlayerName(killer).." killed "..getPlayerName(source).."." elseif killerType == "vehicle" then message = getPlayerName(getVehicleController(killer)).." killed "..getPlayerName(source).."." if get("show_vehiclename") then message = message .. " ("..getVehicleName(killer)..")" end end else message = getPlayerName(source).." committed suicide." end else message = getPlayerName(source).." died." end if weapon and get("show_weapon") then local weaponName = getWeaponNameFromID(weapon) if weaponName then message = message.." ("..weaponName..")" end end if bodypart and get("show_bodypart") then local bodypartName = getBodyPartName(bodypart) if bodypartName then message = message.." ("..getBodyPartName(bodypart)..")" end end outputChatBox(message, root, r, g, b) end ) Thnks Admigo
  5. Omg Thank you so much,Its working now;)
  6. I get 2 errors: Bad Argument @ getPlayerAccount and Bad Argument @ setPlayerTeam.
  7. Dont work. I am just not in players and not in admins. JUst outside the groups.
  8. Thanks guys,Now i have 2 colums with players and admins. But if i login or join the game i am not in both of them. Code: function createTeamsOnStart () teamAdmin = createTeam ( "Admins", 0, 255, 0 ) --change the 3 numbers(0,255,0), the first number is ColourR, the second is ColourG, and the last one is ColourB teamPlayers = createTeam ( "Players", 200, 0, 100 ) end addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), createTeamsOnStart ) --we attach the function to this resource's root element addEventHandler("onPlayerLogin", root, function() local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ( "user." .. playerName, aclGetGroup ( "Admin" ) ) then setPlayerTeam ( theplayer, Admins ) end end ) Pls help.
  9. Same letter size and health bar not green:s
  10. Sorry i dont understand this. Pls full code.
  11. Heey guys, How can i make a group from players and a group of admins in the dxscoreboard? And how can i detect it? Pls give me full code. I really need it:P Thanks Admigo
  12. P1:How can i change the size of the letters. Its so big:P P2;And how can i change the health bar to green and if you are hit the part from hitted to red. The bar is white with grey or black:S 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( getPlayerName(player,true), 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 )
  13. Admigo

    If admin join

    Lol i dunno where to add it:P I just use dxscoreboard.
  14. Admigo

    If admin join

    Heey guys, How can i detect if a player is admin and put him in admin team.(setplayerteam). I need this for dxscoreboard. Thanks admigo
  15. I only ask what file i need to change in race. I am a noob mta scripter so thats why i ask it.
  16. What file in race i need to change?
  17. Found it,but how can i change the colours and where i need to change it?
  18. Can someone give me the link of dxDrawColorText pls? I cant find it on the forums. I searched on google to.
  19. Watch this: http://vimeo.com/10107116 U see at your left the times and the player name of the players who not servived the derby. I want the name and the time the same colour as they have in name.
  20. Hello all, I have one problem. I make a derby server and when you die you see: 1:Admigo time at the left in white. I want if player has hexcolour in name you see that colour. So if i have yellow name: #FFFF00Admigo. And i die you will see: 1:Admigo time at the left in yellow. I hope you understand my fail explain:P And problem 2: How can i delete the time at the left if you die. Thanks admigo.
  21. Okay what i need to add there?
  22. Here is a better explain: http://www.google.nl/imgres?q=mta+spect ... 29,r:7,s:0 You see white names. I want if a player has a hexcolour in name you see that color name. Pls help me.
  23. No when u spectate,u see playername above car. I want when a player use a colour in his name you see that colour above his car. So if i have a yellow name:#FFFF00Admigo and when i die and players spectate me you see Admigo in yellow. But now the spectate is only white.
×
×
  • Create New...