Jump to content

0xCiBeR

MTA Team
  • Posts

    1,673
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by 0xCiBeR

  1. 0xCiBeR

    dx_hud

    Si, server-side si no me equivoco...
  2. A lo que se refiere es que tu posicion X no esta o es incorrecta.....Lo que dice Solid---Fijate eso
  3. 0xCiBeR

    Ayudita

    Pues no da error ._.
  4. 0xCiBeR

    Ayudita

    tampoco funciona Solid
  5. Si, intenta con estos: https://community.multitheftauto.com/index.php?p=resources&s=details&id=6625
  6. 0xCiBeR

    Ayudita

    Sensacion es el mismo script que el mio..... doble :facepalm: ._.
  7. Mmm creo que no..Igual o podrias scriptearlo...Usando un for-loop para obtener todos los autos y un timer...Luego guardarlos a un xml...O simplemente usar algun recurso de la comunidad para crear autos in-game...Y que se guarden...
  8. 0xCiBeR

    Ayudita

    Mmm no funcaa...
  9. 0xCiBeR

    Ayudita

    no tampoco funciona... :7
  10. 0xCiBeR

    Ayudita

    esta bien..ahi lei la wiki de los zombies...el source del evento es el zombie que muere...asi que no se
  11. 0xCiBeR

    Ayudita

    xq el source del evento es un zombie verdad?.... ademas da igual se crearia la explosion en el player..Pero no se crea ni en el zombie ni en el player
  12. 0xCiBeR

    Ayudita

    Puse asi y sigue sin crearse la explosion?.. addEvent("onZombieWasted",true) addEventHandler("onZombieWasted",root, function () local posX,posY,posY = getElementPosition( source ) if ( getElementModel ( source ) == 22 ) then createExplosion ( posX, posY, posZ, 10 ) end end)
  13. 0xCiBeR

    Ayudita

    Hola como podria hacer para que cuando 1 zombie gordo(que tenga skin de gordo), ya se bombero o alguno otro, al morir, que explote..??? Esto es lo que hize...Aunque no crea la explosion??... addEventHandler("onZombieWasted",root, function (source) local posX,posY,posY = getElementPosition( source ) if ( getElementModel ( source ) == 22 ) then createExplosion ( posX, posY, posZ, 10 ) end end)
  14. Me sirvio gracias, igual el problema esta en el config, el limite de zombies es lo que dificulta que salgan ._.
  15. ese resource esta desactualizado y no funciona mas
  16. Ya lo intente..Tampoco funciona alguna idea?
  17. No, no da error.. si esta como server-side..
  18. Hola quisiera me ayudaran como se haria un script para que con el export de zombies (createZombie) pueda spawnear un zombie en mi posicion, pero con poquito de distancia, haci no se superponen?..Gracias function crearz(player) posX,posY,posZ = getElementPosition( player ) zombs = exports [ "zombies" ]:createZombie( posX+2,posY+2,posZ ) end addCommandHandler("crearz",crearz)
  19. 0xCiBeR

    Medallas

    Bien y como haces eso? en que parte tocas??
  20. 0xCiBeR

    Ayudita

    Listo eso solucionado, ahora el tema es que sale dos veces el killmesage..Una vez como si se suicidara y otra como tiene que ser, indicando que el zombie lo mato..Como hago para que no salga como que me suicide..Aca el script de killmessages Server: local config = { ["lines"] = 5, ["startY"] = 0.35, ["textHeight"] = 16, ["iconHeight"] = 20, ["iconSpacing"] = 4, ["defaultWeapon"] = 255, ["fadeTime"] = 5000, ["startFade"] = 15000, ["align"] = "right", ["startX"] = -10 } local default = { ["lines"] = 5, ["startY"] = 0.25, ["textHeight"] = 16, ["iconHeight"] = 20, ["iconSpacing"] = 4, ["defaultWeapon"] = 255, ["fadeTime"] = 5000, ["startFade"] = 15000, ["align"] = "right", ["startX"] = -10 } local vehicleIDs = { [50]=true,[49]=true,[31]=true,[38]=true,[52]=true } function KillMessages_onPlayerWasted ( totalammo, killer, killerweapon, bodypart ) ---These are special checks for certain kill types local usedVehicle if killerweapon == 19 and isElement(killer) then --rockets killerweapon = killer and getElementType ( killer ) == "player" and getPedWeapon(killer) if not killerweapon then killerweapon = 51 end elseif vehicleIDs[killerweapon] then --heliblades/rammed if ( isElement(killer) and getElementType ( killer ) == "vehicle" ) then usedVehicle = getElementModel ( killer ) killer = getVehicleOccupant ( killer, 0 ) end elseif ( killerweapon == 59 and isElement(killer) ) then if ( getElementType ( killer ) == "player" ) then local vehicle = getPedOccupiedVehicle(killer) if ( vehicle ) then usedVehicle = getElementModel ( vehicle ) end end end --finish this -- Got a killer? Print the normal "* X died" if not if ( killer and isElement(killer) and getElementType ( killer ) == "player" ) then local kr,kg,kb = getPlayerNametagColor ( killer ) if getPlayerTeam ( killer ) then kr,kg,kb = getTeamColor ( getPlayerTeam ( killer ) ) end -- Suicide? if (source == killer) then if not killerweapon then killerweapon = 255 end local triggered = triggerEvent ( "onPlayerKillMessage", source,false,killerweapon,bodypart ) --outputDebugString ( "Cancelled: "..tostring(triggered) ) if ( triggered ) then eventTriggered ( source,false,killerweapon,bodypart,true,usedVehicle) return end end local triggered = triggerEvent ( "onPlayerKillMessage", source,killer,killerweapon,bodypart ) --outputDebugString ( "Cancelled: "..tostring(triggered) ) if ( triggered ) then eventTriggered ( source,killer,killerweapon,bodypart,false,usedVehicle) end else local triggered = triggerEvent ( "onPlayerKillMessage", getRandomPlayer(),false,killerweapon,bodypart ) --outputDebugString ( "Cancelled: "..tostring(triggered) ) if ( triggered ) then eventTriggered ( source,false,killerweapon,bodypart,false,usedVehicle) end end end addEventHandler ( "onPlayerWasted", getRootElement(), KillMessages_onPlayerWasted ) addEvent ( "onPlayerKillMessage" ) function eventTriggered ( source,killer,weapon,bodypart,suicide,usedVehicle ) local wr,wg,wb = getPlayerNametagColor ( source ) if getPlayerTeam ( source ) then wr,wg,wb = getTeamColor ( getPlayerTeam ( source ) ) end local kr,kg,kb = false,false,false if ( killer ) then kr,kg,kb = getPlayerNametagColor ( killer ) if getPlayerTeam ( killer ) then kr,kg,kb = getTeamColor ( getPlayerTeam ( killer ) ) end end if ( usedVehicle ) then weapon = usedVehicle end outputKillMessage ( source, wr,wg,wb,killer,kr,kg,kb,weapon ) -- local extra = "" if ( usedVehicle ) then extra = " (Vehicle)" end if ( killer ) then if suicide then local weaponName = getWeaponNameFromID ( weapon ) if weaponName then outputConsoleKillMessage ( "* "..getPlayerName(source).." killed himself. ("..weaponName..")" ) else outputConsoleKillMessage ( "* "..getPlayerName(source).." killed himself."..extra ) end else local weaponName = getWeaponNameFromID ( weapon ) if weaponName then outputConsoleKillMessage ( "* "..getPlayerName(killer).." killed "..getPlayerName(source)..". ("..weaponName..")" ) else outputConsoleKillMessage ( "* "..getPlayerName(killer).." killed "..getPlayerName(source).."."..extra ) end end else outputConsoleKillMessage ( "* "..getPlayerName(source).." died."..extra ) end -- end function outputConsoleKillMessage ( text ) outputConsole ( text ) end function outputKillMessage ( killed, wr,wg,wb,killer,kr,kg,kb,weapon,width,resource ) if ( resource ) then resource = getResourceName(resource) end if not isElement(killed) then outputDebugString ( "outputKillMessage - Invalid 'wasted' player specified",0,0,0,100) return false end if not getElementType(killed) == "player" then outputDebugString ( "outputKillMessage - Invalid 'wasted' player specified",0,0,0,100) return false end return triggerClientEvent(getRootElement(),"onClientPlayerKillMessage",killed,killer,weapon,wr,wg,wb,kr,kg,kb,width,resource ) end function outputMessage ( message, visibleTo, r, g, b, font ) if type(message) ~= "string" and type(message) ~= "table" then outputDebugString ( "outputMessage - Bad 'message' argument", 0, 112, 112, 112 ) return false end if not isElement(visibleTo) then outputDebugString ( "outputMessage - Bad argument", 0, 112, 112, 112 ) return false end --Turn any resources into resource names if type(message) == "table" then for i,part in ipairs(message) do if type(part) == "table" and part[1] == "image" then if part.resource then message[i].resourceName = getResourceName(part.resource) else part.resourceName = getResourceName(sourceResource) end end end end return triggerClientEvent ( visibleTo, "doOutputMessage", visibleTo, message, r, g, b, font ) end function setKillMessageStyle ( startX,startY,align,lines,fadeStart,fadeAnimTime ) if ( not startX ) then startX = default.startX end if ( not startY ) then startY = default.startY end if ( not align ) then startY = align.startY end if ( not lines ) then lines = default.lines end if ( not fadeStart ) then fadeStart = default.startFade end if ( not fadeAnimTime ) then fadeAnimTime = default.fadeTime end config.startX = startX config.startY = startY config.align = align config.lines = lines config.startFade = fadeStart config.fadeTime = fadeAnimTime for k,v in ipairs(getElementsByType"player") do triggerClientEvent(v,"doSetKillMessageStyle",v,config.startX,config.startY,config.alignX,config.lines,config.startFade,config.fadeTime) end return true end addEvent ("onClientKillmessagesLoaded",true) addEventHandler ( "onClientKillmessagesLoaded", getRootElement(), function() triggerClientEvent(source,"doSetKillMessageStyle",source,config.startX,config.startY,config.alignX,config.lines,config.startFade,config.fadeTime) end )
  21. 0xCiBeR

    Ayudita

    No anda dice expected element at argument 1 got "0"
  22. 0xCiBeR

    Ayudita

    Hola que tal...Hise este pedazito de script para que cuando un jugador muera, si el que lo mata es zombie, diga Zombie (el arma) y el jugador.. Ya hay unos resource dando vuelta que hacen algo parecido pero cuando un player mata a un zombie...Yo quiero que aparezca que el zombie mato al player... Esto no anda... Plis help? :3 addEventHandler( "onPlayerWasted", getRootElement(), function (killer) local zombie = "Zombie" if (getElementType ( killer ) == "zombie") then weapon = getPedWeapon(killer) exports.killmessages:outputMessage ( {zombie,{"padding",width=3},{"icon",id=weapon or 0},{"padding",width=3},{"color",r=162,g=2,b=2},"Zombie"},getRootElement(),wr,wg,wb ) end end)
  23. 0xCiBeR

    Medallas

    El script para poner las medallas no es el problema._. igual pongo el export al scoreboard... exports.scoreboard:addScoreboardColumn('Rango',getRootElement(),1,40,'Rango')
×
×
  • Create New...