Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. Castillo

    Traductor

    function playerChat(message, messageType) if (messageType == 0 and string.lower(message) == "hello") then -- Si el tipo de chat es el principal y el mensaje es "Hello".. cancelEvent() -- Cancelamos el mensaje. local r, g, b = getPlayerNametagColor(source) -- Obtenemos el color del nametag del jugador. outputChatBox(getPlayerName(source)..": #FFFFFFhola", root, r, g, b, true) -- Enviamos un mensaje a todo el servidor con el nuevo texto. end end addEventHandler("onPlayerChat", root, playerChat)
  2. *Solidsnake14 ha iniciado sesión Hola que tal, todo bien por ahi? No imperio, solo borro tus posts cuando no tienen sentido o son off-topic. *Solidsnake14 se ha desconectado
  3. Castillo

    mta-paradise

    Did you add the modules to the "mtaserver.conf"?
  4. Castillo

    mta-paradise

    The modules folder must be at:
  5. Castillo

    Partial nick

    You can report the resource, yes.
  6. Castillo

    Partial nick

    Why delete the topic? if you post here you should know that it's going to be public. It could help someone else with a similar problem. Not going to be deleted.
  7. If your element data name is "EXP" and you want it to update the scoreboard when the EXP changes, then do: exports.scoreboard:scoreboardAddColumn("EXP")
  8. Castillo

    Partial nick

    function getPlayerFromPartOfName(nickpart) local players=getElementsByType("player") local matches={} for _,v in pairs(players) do if string.find(string.lower(getPlayerName(v)),string.lower(nickpart)) then table.insert(matches,v) end end if (#matches > 1) then return false else return matches[1] end end addCommandHandler("part", function (thePlayer, cmd, who) local player = getPlayerFromPartOfName(who) if (player) then outputChatBox(getPlayerName(player)) end end) Works perfectly. I do /part cast and it outputs (SAUR)Castillo.
  9. Castillo

    Partial nick

    Maybe because you used getPlayerFromName instead of getPlayerName in line: 5. Also you put "mathces" instead of "matches". function getPlayerFromPartOfName(nickpart) local players=getElementsByType("player") local matches={} for _,v in pairs(players) do if string.find(string.lower(getPlayerName(v)),string.lower(nickpart)) then table.insert(matches,v) end end if #matches>1 then return false else return matches[1] end end
  10. Castillo

    Partial nick

    And what doesn't work from it?
  11. Yes, or you can put it into another resource, do what you want, but keep it server side, else it'll not work.
  12. addEventHandler("onVehicleExplode",root,function () destroyElement(source) end)
  13. Si no encuentras lo que buscas, lo que te queda es aprender como crearlo o pagar a alguien para hacerlo por vos.
  14. Busca aca por "login": https://community.multitheftauto.com/index.php?p=resources
  15. I actually have no idea of what are you trying to do.
  16. That's because you didn't change "localPlayer". wz = {"1600.0","2200.0","0.1","0.0","0.0","-0.05","70","0.50","0.8","0.70","5","300.0","33.0","16.0","F","P","5.4","0.90","1","45.0","0.95","0.14","0.0","0.80","-0.10","0.5","-0.7","0.00","0.00","19000","0","0","0","3","0"} function setH(thePlayer) local myVeh = getPedOccupiedVehicle(thePlayer) exports["hedit"]:setHandlingFromTable(myVeh,wz) end addCommandHandler("set",setH)
  17. Castillo

    Cancel spawn

    function privatet () local steam = getTeamFromName("Admin") if (steam and not isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Admin")) then killPed(source) outputChatBox("You are not part of the sarg team." source, 255, 0, 0) end end addEventHandler("onPlayerSpawn", getRootElement(), privatet) It's isObjectInACLGroup with upper case "ACL", you used "Acl".
  18. Castillo

    Ayuda

    Si, necesitas las funciones de Camera y setTimer .
  19. local team = getPlayerTeam(player) if (team) then r, g, b = getTeamColor( team ) else r, g, b = getPlayerNametagColor(player) end health = getElementHealth ( player ) health = math.max(health, 0)/100 dxDrawImageSection(drawX, drawY, width, height, math.floor(256 - 256 * (health)), 0, 256, 16, "images/h1.png", 0, 0, 0, tocolor(r, g, b, 200))
  20. Do you mean checking if the vehicle is on ground? if so: https://wiki.multitheftauto.com/wiki/IsVehicleOnGround
  21. The object health won't change even if you punch, fire at it. You can wait and see if this get's accepted: http://bugs.mtasa.com/view.php?id=4893
  22. No offense Evil-Cod3r, but that's a REAL mess.
×
×
  • Create New...