Jump to content

Jacobob14

Members
  • Posts

    266
  • Joined

  • Last visited

Everything posted by Jacobob14

  1. emm no longer added to the group acl and throws error in console
  2. mmm had already tried that but I get error to use
  3. someone help me so that the code can not see hexadesimal http://prntscr.com/2pvpnh GppWindow = guiCreateWindow(0.31, 0.21, 0.32, 0.65, "Panel de Reclutación", true) guiSetFont( GppWindow, "default-bold-small") guiSetVisible( GppWindow,false) guiSetAlpha( GppWindow, 1.00) guiSetProperty( GppWindow, "CaptionColour", "FAA5E717") guiWindowSetSizable( GppWindow,false) Gpedit = guiCreateEdit(104, 93, 139, 38, "", false, GppWindow) GiveModeratorButton = guiCreateButton(9, 60, 89, 33, "Reclutar", false, GppWindow) guiSetFont( GiveModeratorButton, "default-bold-small") guiSetProperty( GiveModeratorButton, "NormalTextColour", "FAFFFEFE") GiveSuperModeratorButton = guiCreateButton(9, 205, 89, 35, "Dar Permisos", false, GppWindow) guiSetFont( GiveSuperModeratorButton, "default-bold-small") guiSetProperty( GiveSuperModeratorButton, "NormalTextColour", "FAFFFDFD") GiveAdminsButton = guiCreateButton(9, 130, 89, 35, "Expulsar", false, GppWindow) guiSetFont( GiveAdminsButton, "default-bold-small") guiSetProperty( GiveAdminsButton, "NormalTextColour", "FAFFFDFD") label = guiCreateLabel(190, 70, 154, 17, "Jugador :", false, GppWindow) guiLabelSetColor(label, 66, 228, 44) CloseButton = guiCreateButton(196, 30, 47, 23, "Close", false, GppWindow) guiSetFont( CloseButton, "default-bold-small") guiSetProperty( CloseButton, "NormalTextColour", "FA16ACBE") removebutton = guiCreateButton(9, 273, 89, 37, "Sacar Permisos", false, GppWindow) guiSetFont( removebutton, "default-bold-small") guiSetProperty( removebutton, "NormalTextColour", "FAFFFDFD") label2 = guiCreateLabel(10, 337, 97, 25, "LATIN SERVER", false, GppWindow) guiLabelSetColor(label2, 66, 228, 44) addEventHandler("onClientResourceStart",resourceRoot, function() grid = guiCreateGridList(104, 140, 139, 232,false,GppWindow) guiGridListSetSelectionMode(grid,2) local name = guiGridListGetItemText(grid, row, col) local column = guiGridListAddColumn( grid, "Nombre del Jugador", 0.9 ) if ( column ) then for id, player in ipairs(getElementsByType("player")) do local row = guiGridListAddRow ( grid ) guiGridListSetItemText ( grid, row, column, getPlayerName ( player ), false, false ) guiGridListSetItemColor ( grid, row, column, 0, 250, 154, 255 ) end addEventHandler ( "onClientGUIClick", grid, click ) end end) function click () local playerName = guiGridListGetItemText ( grid, guiGridListGetSelectedItem ( grid ), 1 ) guiSetText ( Gpedit, playerName ) end function showPanel () guiSetVisible (GppWindow, true) showCursor (true) playSound("open.mp3",false) end addEvent( "showPanel", true ) addEventHandler ( "showPanel", getRootElement(), showPanel) ------------------------ --Event para Bind Key ------------------------ function show() if guiGetVisible(GppWindow) == true then guiSetVisible(GppWindow,false) showCursor(false) else guiSetVisible(GppWindow,true) showCursor(true) end end addEvent("show",true) addEventHandler("show",root,show) function onGuiClick (button, state, absoluteX, absoluteY) if (source == CloseButton) then guiSetVisible (GppWindow, false) showCursor (false) elseif (source == removebutton) then local name = guiGetText ( Gpedit ) local target = getPlayerFromName(name) triggerServerEvent ("remove", getLocalPlayer(), target) elseif (source == GiveModeratorButton) then local name = guiGetText ( Gpedit ) local target = getPlayerFromName(name) triggerServerEvent("Moderator", getLocalPlayer(), target) playSound("sec.wav",false) elseif (source == GiveSuperModeratorButton) then local name = guiGetText ( Gpedit ) local target = getPlayerFromName(name) triggerServerEvent("SuperModerator", getLocalPlayer(), target) playSound("sec.wav",false) elseif (source == GiveAdminsButton) then local name = guiGetText ( Gpedit ) local target = getPlayerFromName(name) triggerServerEvent("Admin", getLocalPlayer(), target) playSound("sec.wav",false) end end addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) function GetPermission() triggerServerEvent ("OpenPanel", getLocalPlayer(), OpenPanel) end function nopsound () playSound("np.mp3",false) end addEvent( "nopsound", true ) addEventHandler ( "nopsound", getRootElement(), nopsound) function removedsound () playSound("removed.wav",false) end addEvent( "removedsound", true ) addEventHandler ( "removedsound", getRootElement(), removedsound) function list ( ) guiGridListClear ( grid ) for id, players in ipairs ( getElementsByType ( "player" ) ) do local row = guiGridListAddRow ( grid ) guiGridListSetItemText ( grid, row, 1, getPlayerName ( players ), false, false ) guiGridListSetItemColor ( grid, row, 1, 0, 250, 154, 255 ) end end addEventHandler ( "onClientPlayerJoin", getRootElement(), list ) addEventHandler ( "onClientPlayerQuit", getRootElement(), list ) addEventHandler ( "onClientPlayerChangeNick", getRootElement(), list )
  4. You can use this script https://community.multitheftauto.com/in ... ls&id=6143
  5. Jacobob14

    nemesis

    Gracias me funciono muy bien
  6. Jacobob14

    nemesis

    Alguien me ayuda a que nemesis spawne automaticamente y no tenga necesidad de ejecutar un comando function Nemesisbymanawydan ( thePlayer) local AclNome = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..AclNome, aclGetGroup ( "Admin" ) ) then baz = createObject ( 360, -1935.5480957031, 665.44055175781, 48, 0, 0, 0 ) nemesi = exports [ "slothBot" ]:spawnBot ( 1079.5283203125, 1064.6181640625, 10.8359375, 90, math.random ( 300, 303 ), 0, 0, Nemesis, 38, "hunting", true ) setElementModel ( nemesi, 107 ) outputChatBox ("#0000Ff|ALERT|#c0c0c0 Se Detecto Un Nemesis en las Vegas !!",getRootElement(), 255, 255, 255, true ) BlipNemesis = createBlipAttachedTo ( nemesi, 0 ) attachElements ( baz, nemesi, 0.2, 0.1, 0.5, 0, 90, 0 ) triggerClientEvent ( "nsound", root ) setElementData(nemesi, "nemesis",true) if nemesi then exports.extra_health:setElementExtraHealth ( nemesi, 500 ) end end end addCommandHandler("nemesis", Nemesisbymanawydan) addEvent("onBotWasted",true) addEventHandler("onBotWasted",getRootElement(), function (killer) if (source == nemesi) then givePlayerMoney(killer,math.random(4000,5000)) outputChatBox ( getPlayerName ( killer ) .. " #888888Acabo con un Nemesis gana #ACFA58 $ 5.000 and exp : 600 !!",getRootElement(), 255, 255, 255, true ) exports.exp_system:addPlayerEXP ( killer, 600 ) destroyElement(BlipNemesis) end end)
  7. Thanks now if I work well
  8. hexadecimal color disappeared but the nick is a single color on the map http://prntscr.com/2pj1n1
  9. Uso este ocal bloodsounds = {"blood01.wav","blood02.wav","blood03.wav",} local humanidad = 100 local infectados = getTeamFromName( "Infectados" ) local zombie = false local sWidth, sHeight = guiGetScreenSize() local px, py, pz = getElementPosition ( getLocalPlayer ( ) ) addEventHandler( "onClientRender", root, function ( ) lineLength = 114 * ( humanidad / 100 ) lineLength5 = 114 * ( 100 / 100 ) dxDrawRectangle(sWidth-180,sHeight-68,lineLength,17.0,tocolor(0, 0, 255, 255),false) dxDrawRectangle(sWidth-180,sHeight-68,lineLength5,17.0,tocolor(0, 0, 0, 170),false) dxDrawText("Humanidad: "..math.ceil(humanidad ).."%",sWidth-180,sHeight-66,0,0,tocolor(255,255,255,255),0.4,"bankgothic") end ) addEventHandler( "onClientPlayerDamage", localPlayer, function ( a ) if a then if humanidad >= 20 then local g_Type = getElementType( a ) if g_Type == "ped" then humanidad = humanidad - math.random( 1, 10 ) elseif g_Type == "player" then if getPlayerTeam( a ) == infectados then humanidad = humanidad - math.random( 1, 10 ) end end elseif humanidad <= 20 then humanidad = 0 end end end ) setTimer( function () if not zombie then if humanidad < 100 then if humanidad <= 0 then triggerServerEvent( "infanim", localPlayer ) setTimer( function() triggerServerEvent( "beaZombie", localPlayer ) end, 6000, 1) zombie = true playSound(bloodsounds[math.random(1, #bloodsounds)]) bloodinf() elseif humanidad < 20 then playSound(bloodsounds[math.random(1, #bloodsounds)]) humanidad = 0 bloodinf() elseif humanidad > 20 then humanidad = humanidad - math.random( 1, 10 ) playSound(bloodsounds[math.random(1, #bloodsounds)]) zombie = false bloodinf() end end end end , math.random(20000, 30000) , 0 ) addEventHandler( "onClientPlayerSpawn", localPlayer, function ( ) humanidad = 100 zombie = false end ) addEventHandler( "onClientPlayerDamage", localPlayer, function (_, weapon ) if not zombie then if weapon == 41 then if humanidad <= 99 then humanidad = humanidad + 5 end elseif weapon == 42 then if humanidad >= 99 then humanidad = humanidad - 5 end end end end ) function givetvirus( number ) if humanidad >= 100 then humanidad = humanidad - number end end function giveantivirus() missed = 100 - humanidad if humanidad <= 99 then humanidad = humanidad + missed end end function bloodinf() local randombloodamount = math.random( 10, 30 ) local px, py, pz = getElementPosition ( getLocalPlayer ( ) ) fxAddBlood ( px, py, pz+0.6, 1, 1, 0, randombloodamount, 1 ) end
  10. I do not work I removed the hex code color but this is not all of one color
  11. someone help me remove the hex code nick on the map forgive my bad English -- 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 = 500 local rectangleColor = tocolor(92,92,92,0) -- 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,false,true,true) end end end end end addEventHandler("onClientRender",getRootElement(),drawMapStuff)
  12. emm alguien me da alguna idea para que en ves de darme salud me suba la humanidad GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Window[1] = guiCreateWindow(0.3,0.2,0.4,0.5,"Medic shop",true) guiSetAlpha(GUIEditor_Window[1],225) guiCreateStaticImage ( 0, 0, 1, 0.8,"fondo.png",true,GUIEditor_Window[1]) guiSetVisible(GUIEditor_Window[1],false) GUIEditor_Button[1] = guiCreateButton(0.52,0.85,0.45,0.1," $500",true,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(0,0.85,0.45,0.1,"Salir",true,GUIEditor_Window[1]) function showGUI2() guiSetVisible (GUIEditor_Window[1],true) showCursor(true) end addEvent("showGUI2",true) addEventHandler("showGUI2",getRootElement(),showGUI2) addEvent("hideGUI2",true) addEventHandler("hideGUI2",getRootElement(), function () guiSetVisible(GUIEditor_Window[1],false) showCursor (false) end) addEventHandler("onClientGUIClick",getRootElement(), function (player) if (source == GUIEditor_Button[2]) then guiSetVisible (GUIEditor_Window[1],false) showCursor (false) elseif (source == GUIEditor_Button[1]) then money = getPlayerMoney (source) if (money < 500) then outputChatBox ("No dispones de dinero suficiente .. ",225,0,0) else player = getLocalPlayer() outputChatBox ("#00ff00has subido tu salud al 100 ",255,225,255,true) takePlayerMoney(500) setElementHealth ( player, getElementHealth(player) + 100 ) end end end)
  13. emm gracias Solid me funciono no se si me podria ayudar en otra cosa tengo un problema en el dxDrawRectangle(x-widthPadding,y+heightPadding,nameLength+widthPadding*2,fontHeight-heightPadding*2,tocolor( 0, 0, 0 ),true) quiero que el cuadro este a la misma altura del nick pero me sale asi http://prntscr.com/2paohr que puedo hacer para solucionarlo y quede al mismo nivel que el nick
  14. hola alguien me ayudaría en como hacer que los nombres de los jugadores solo sean visibles si están en el mismo team estoi utilisando este scrip :
×
×
  • Create New...