Jump to content

Jacobob14

Members
  • Posts

    266
  • Joined

  • Last visited

Everything posted by Jacobob14

  1. and I think the price is very high
  2. as I can make make nemesis spawner in the area
  3. as I can make nemesis spawn in the radararea local area = createRadarArea ( -50.9951171875, 1996.4365234375, 400, 400, 141, 7, 220, 175 ) local Nemesis = createTeam("Nemesis",141,7,220) local nemesisBots = {} function BossNemesis ( thePlayer ) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then for i=1, 10 do local x, y, z = getElementPosition ( thePlayer ) nemesisBots[i] = exports [ "slothBot" ]:spawnBot ( x+i,y+i,z+(i/2), 90, math.random ( 300, 303 ), 0, 0, Nemesis, 38, "hunting", true ) exports.extra_health:setElementExtraHealth ( nemesisBots[i], 150 ) setElementModel ( nemesisBots[i], 107 ) end end end
  4. hello I'm trying to do the radar area but I is not going very well could someone please help me http://prntscr.com/318f3v local screenx, screeny = guiGetScreenSize( ); local posX = 30; local posY = 157; -- Make sure it's the right values local width1 = 135; local height1 = 135; -- local scale = 0.67; local texture = dxCreateTexture( 'images/sattelite.png', 'dxt5', true, 'clamp' ); imagewidth1, imageheight1 = dxGetMaterialSize( texture ); showPlayerHudComponent( "radar", false ) addEventHandler("onClientRender",root, function( ) local px ,py, pz = getElementPosition( localPlayer ) local mapX = px / ( 6000 / imagewidth1 ) + ( imagewidth1 / 2 ) - ( width1 / scale / 2 ); local mapY = py / ( -6000 / imageheight1 ) + ( imageheight1 / 2 ) - ( height1 / scale / 2 ); local cx,cy,cz,tx,ty,tz = getCameraMatrix( ); local rotation = getCameraRotation(); dxDrawImageSection( posX, screeny - posY, width1, height1, mapX, mapY, width1 / scale, height1 / scale, texture, rotation, 0, 0, tocolor( 255, 255, 255, 220 ), false ); --dxDrawRectangle( posX + width1 / 2, screeny - posY + height1 / 2, 5, 5, tocolor( 0, 0, 255, 255 ) ); dxDrawImage(posX, screeny - posY, width1, height1, "/images/blips/guia.png" , rotation ); for i, v in ipairs( getElementsByType('radararea') ) do local r,g,b,a = getRadarAreaColor(v) local w,h = getRadarAreaSize(v) x,y = getElementPosition(v) x = x / (6000 / mapX) + mapX/2 y = y / (-6000/ mapY) + mapY/2 dxDrawRectangle(x, (y-h) + 4 + (h/2), (w/2), (h/2), tocolor(r,g,b,a)) end
  5. Es necesario que agreges esta linea local lvl = getElementData(source, "level") y trata de no hacer mas post sobre el mismo tema
  6. postea tu global chat para poder ayudarte
  7. function rangedChat ( message, messageType ) local r, g, b = getPlayerNametagColor ( source ) local playerName = getPlayerName ( source ) local lvl = getElementData(source, "level") if ( messageType == 0 ) then -- If it's normal chat (i.e. not PM or team) outputChatBox ( "[LVL "..lvl.."] ".. playerName ..": #ffffff".. message, root, r, g, b, true ) end cancelEvent ( ) end addEventHandler ( "onPlayerChat", root, rangedChat ) aqui tienes lo que querias cuando ablen por T dira el nivel algo asi [LVL 16] Xoda : bla bla bla .... suerte espero te sirva
  8. dxDrawImage( 678, 103, 790, 110, "imagenes/"..level..".png") prueva con eso agregalo en la parte de los dx de tu scrip y crea una carpeta en tu scrip llamada imagenes y pon tus imagenes con el nombre de cada level la imagen de level 1 que se llame 1 la del level 2 que se llame 2 y así sucesivamente no olvides poner tambien en el meta.xml las imagenes
  9. I have a question because when it came to another server and then return to my server my scoreboard looks like the scoreboard the server to which between
  10. thanks
  11. hi all I have a problem only shows me the speed when I'm not in a vehicle local speedx, speedy, speedz = getElementVelocity ( localPlayer ) actualspeed = (speedx^2 + speedy^2 + speedz^2)^(0.5) local kmh = actualspeed * 180
  12. emm solid y como podria hacer para que los blips sean visibles en el radar
  13. someone help me as I can make them visible blips and radar area on my radar [lua] local function getCameraRotation () px, py, pz, lx, ly, lz = getCameraMatrix() local rotz = 6.2831853071796 - math.atan2 ( ( lx - px ), ( ly - py ) ) % 6.2831853071796 local rotx = math.atan2 ( lz - pz, getDistanceBetweenPoints2D ( lx, ly, px, py ) ) --Convert to degrees rotx = math.deg(rotx) rotz = math.deg(rotz) return rotz end local screenx, screeny = guiGetScreenSize( ); local posX = 30; local posY = 157; -- Make sure it's the right values local width = 135; local height = 135; -- local scale = 0.67; local texture = dxCreateTexture( 'sattelite.png', 'dxt5', true, 'clamp' ); imageWidth, imageHeight = dxGetMaterialSize( texture ); showPlayerHudComponent( "radar", false ) addEventHandler("onClientRender",root, function( ) local px ,py, pz = getElementPosition( localPlayer ) local mapX = px / ( 6000 / imageWidth ) + ( imageWidth / 2 ) - ( width / scale / 2 ); local mapY = py / ( -6000 / imageHeight ) + ( imageHeight / 2 ) - ( height / scale / 2 ); local cx,cy,cz,tx,ty,tz = getCameraMatrix( ); local rotation = getCameraRotation(); local mx, my, mz = getElementPosition(localPlayer); local zone = getZoneName (mx, my, mz, true ) local vl = getElementVelocity ( localPlayer ) local playerTeam = getPlayerTeam ( localPlayer ) local team = getTeamName ( playerTeam ) dxDrawImageSection( posX, screeny - posY, width, height, mapX, mapY, width / scale, height / scale, texture, rotation, 0, 0, tocolor( 255, 255, 255, 230 ), false ); dxDrawText ( "Posición: " .. math.floor(mx) .. " , " .. math.floor(my) .."\nZona: " ..zone.."\nAltura: " .. math.floor(mz) .." metros\nEquipo: "..team, 30, 439, 166, 570,tocolor(255, 255, 255, 255), 0.87, "sans", "left", "top", false, false, true, false, false, rotation );
  14. ya funciona gracias
  15. como puedo hacer que el texto gire junto con mi radar mi imagen si rota pero el texto no local function getCameraRotation () px, py, pz, lx, ly, lz = getCameraMatrix() local rotz = 6.2831853071796 - math.atan2 ( ( lx - px ), ( ly - py ) ) % 6.2831853071796 local rotx = math.atan2 ( lz - pz, getDistanceBetweenPoints2D ( lx, ly, px, py ) ) --Convert to degrees rotx = math.deg(rotx) rotz = math.deg(rotz) return rotz end local screenx, screeny = guiGetScreenSize( ); local posX = 30; local posY = 157; -- Make sure it's the right values local width = 135; local height = 135; -- local scale = 0.5; local texture = dxCreateTexture( 'sattelite.png', 'dxt5', true, 'clamp' ); imageWidth, imageHeight = dxGetMaterialSize( texture ); showPlayerHudComponent( "radar", false ) addEventHandler("onClientRender",root, function( ) local px ,py, pz = getElementPosition( localPlayer ) local mapX = px / ( 6000 / imageWidth ) + ( imageWidth / 2 ) - ( width / scale / 2 ); local mapY = py / ( -6000 / imageHeight ) + ( imageHeight / 2 ) - ( height / scale / 2 ); local cx,cy,cz,tx,ty,tz = getCameraMatrix( ); local rotation = getCameraRotation(); dxDrawImageSection( posX, screeny - posY, width, height, mapX, mapY, width / scale, height / scale, texture, rotation, 0, 0, tocolor( 255, 255, 255, 255 ), false ); dxDrawText("...text...", posX, posY+400, width, height, tocolor(253, 0, 0, 255), 0.65, "bankgothic", "left", "top", false, false, true, false, false);
  16. you did a post yesterday on the same topic
  17. but the name tag is still visible: (
  18. Jacobob14

    help pls .

    as I can get the name tag also unseen local groups = { "Admin" } --Groups are allowed to use the invisibility blip = { } function toggleInvis ( source ) local nameTag = getPlayerNametagText ( source ) if ( source and getElementType ( source ) == "player" and hasPlayerAccessToInvisible (source) == true ) then if ( getElementAlpha ( source ) > 200 ) then setPlayerNametagShowing ( source, false ) setElementAlpha ( source, 0 ) local attachedElements = getAttachedElements ( source ) for ElementKey, ElementValue in ipairs ( attachedElements ) do if ( getElementType ( ElementValue ) == "blip" ) then destroyElement ( ElementValue ) end end outputChatBox ( "#00ffff|Mod| #00FF00Invisible Activado", source, 0, 255, 0, true ) else setPlayerNametagShowing ( source, true ) setElementAlpha ( source, 255 ) local nameTag = getPlayerName ( source ) local r, g, b = getPlayerNametagColor ( source ) blip [ source ] = createBlipAttachedTo ( source, 0, 2, r, g, b, 255 ) outputChatBox ( "#00ffff|Mod| #00FF00Invisible Desactivado", source, 0, 255, 0, true ) end else outputDebugString ( "Player: ".. nameTag .." try to use invisible, but he hasn't access to it!" ) end end addCommandHandler ( "invisible", toggleInvis ) function hasPlayerAccessToInvisible (thePlayer) local allowed = false if ( thePlayer ) then for id, team_cur in ipairs(teams) do if ( getPlayerTeam ( thePlayer ) and getTeamName ( getPlayerTeam ( thePlayer ) ) == team_cur ) then allowed = true break end end if not(allowed == true) then for id, group_cur in ipairs(groups) do if ( isObjectInACLGroup ( "user.".. getAccountName ( getPlayerAccount ( thePlayer ) ), aclGetGroup ( group_cur ) ) ) then allowed = true break end end end return allowed end end addEventHandler ( "onPlayerQuit", root, function ( ) if isElement ( blip [ source ] ) then destroyElement ( blip [ source ] ) end end ) addEventHandler ( "onPlayerLogout", root, function ( ) if isElement ( blip [ source ] ) then destroyElement ( blip [ source ] ) end end )
  19. Primeramente debes editar el scoreboard para que acepte imagenes hay muchos post sobre lo mismo puedes buscarlos
  20. Jacobob14

    help :(

    I mean when the player press right click Night visión is removed as I can avoid removing Night Visión
  21. Jacobob14

    help :(

    as I can make the visión Night is not removed when the player aims with a gun function nightvision() lTeam = getPlayerTeam(localPlayer) if (lTeam and getTeamName(lTeam) == "Team") then if (getCameraGoggleEffect() == "normal") then setCameraGoggleEffect("nightvision") elseif (getCameraGoggleEffect() == "nightvision") then setCameraGoggleEffect("normal") end end end addEventHandler("onClientResourceStart", resourceRoot, nightvision )
  22. but the player must download the script every time enter the server
  23. what compiler compile all code leaving something like this http://prntscr.com/2yoz87
  24. es facil pero nadie te ara todo el scrip publique un avanse y asi te puedo ayudar
  25. thanks solid and thank you all served me well your help: D
×
×
  • Create New...