Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. Castillo

    2 Bind Key

    Simplemente usa un bind como el que tenes y luego usas: getKeyState
  2. Castillo

    Dudas

    addCommandHandler outputChatBox
  3. Castillo

    Ayuda bindKey

    local inColShape = { } function bindStart ( ) for _, v in ipairs ( getElementsByType ( "player" ) ) do bindKey ( v, "n", "down", pickupWeapon ) end end addEventHandler ( "onResourceStart", resourceRoot, bindStart ) function login ( ) bindKey ( source, "n", "down", pickupWeapon ) end addEventHandler ( "onPlayerLogin", getRootElement(), login ) function pullItem ( item, ammo ) local x, y, z = getElementPosition ( source ) theWeapon = createObject ( 358, x, y, z - 1, 70, 0, 0 ) colshape = createColTube ( x, y, z, 1, 1 ) setElementData ( colshape, "Arma", 34 ) setElementData ( colshape, "Municion", ammo ) takeWeapon ( source, 34 ) addEventHandler ( "onColShapeHit", root, onColShape ) addEventHandler ( "onColShapeLeave", root, onColShape ) end addEvent ( "onPlayerPullSniper", true ) addEventHandler ( "onPlayerPullSniper", getRootElement(), pullItem ) function onColShapeHit ( hitElement, matchDim ) if ( getElementType ( hitElement ) == "player" and matchDim ) then if ( eventName == "onColShapeHit" ) then inColShape [ hitElement ] = source else inColShape [ hitElement ] = nil end end end function pickupWeapon ( player ) local colshape = inColShape [ player ] if isElement ( colshape ) then if isElementWithinColShape ( player, colshape ) then outputChatBox ( "/recoger", player, 0, 255, 255 ) giveWeapon ( player, getElementData ( colshape, "Arma" ), getElementData ( colshape, "Municion" ) ) destroyElement ( source ) destroyElement ( theWeapon ) inColShape [ player ] = nil end end end
  4. Y cual es el problema? ya intentaste algo y no funciono? si es asi, entonces podrias postearlo?
  5. Castillo

    2 Bind Key

    Me parece que quiere algo asi como: tocas CTRL + V y se abre el panel, no se si estoy en lo cierto.
  6. createObject -- Para crearlo destroyElement -- Para destruirlo Y vas a tener que pegarselo al jugador, busca en la comunidad por el recurso "bone_attach" que sirve para pegar elementos a los huesos de un jugador.
  7. Don't take this the wrong way, but if you are scripting since 2011, that makes it 2 years, which means that you should at least have a medium knowledge of Lua scripting, and by looking at your recent posts, I would say that you don't have the knowledge of two years.
  8. Add this at the end of your script: addEventHandler ( "onClientResourceStart", resourceRoot, terragustavo_MainWindow )
  9. Existe un objeto de telefono ( es viejo el modelo, pero podes remplazarlo con uno tuyo ), el modelo es: 330.
  10. You aren't executing the "terragustavo_MainWindow" function, that's why is not doing anything.
  11. No es que me interese, ya que yo cree ese script cuando estaba aburrido, pero ese link no sirve.
  12. There isn't an event, but you could trigger one each time you change health ( e.g: on slap ).
  13. The link must be wrong, change it.
  14. And what stops you from doing it?
  15. Well, I'm not sure, but maybe the only way is re-enabling friendly fire and making your own friendly fire system.
  16. Simply do: local infection = getElementData ( source, "infeccion" ) if ( infection <= 99 and infection > 0 ) then
  17. Remove the event that is drawing it ( removeEventHandler ).
  18. Post the acl from "Admin" group.
  19. Just go to the editor and click the icon to remove objects, then click on a world object.
  20. You don't have two resources?
  21. Yes, show me the acl.xml, group "Admin" content.
×
×
  • Create New...