Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. Castillo

    Ayuda

    Si estoy en lo correcto, el script que utiliza el DayZ es mi sistema de gangs, asi que con "gang" deberia funcionar.
  2. Castillo

    Ayuda

    if ( getElementData ( source, "group_system" ) == "DCChile" ) then Ese es el problema, porque pusiste "group_system"?
  3. The rest is good, just change the event and the arguments used, since "onPlayerJoin" has no player argument, use 'source' instead.
  4. You must use "onPlayerJoin", and not "onPlayerConnect".
  5. Castillo

    Ayuda

    Postea todo el script.
  6. I'm not sure, but you can't know when MySQL is updated, you could make a timer to refresh it every X time.
  7. Just connect both servers to the same MySQL database.
  8. Castillo

    Attach

    Do you have "Saddler" defined?
  9. Pero podes cambiar el estilo de caminar con: setPedWalkingStyle
  10. Y acordate de ponerlo como client side.
  11. Castillo

    Ayuda bindKey

    local inColShape = { } local weapons = { } 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 ) local colshape = createColTube ( x, y, z, 1, 1 ) weapons [ colshape ] = createObject ( 358, x, y, z - 1, 70, 0, 0 ) 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 ( weapons [ source ] ) destroyElement ( source ) inColShape [ player ] = nil end end end
  12. Esa funcion no es tuya, es del MTA paradise.
  13. Castillo

    Dudas

    No, eso no tiene sentido.
  14. Castillo

    Ayuda

    playerTeam = getPlayerTeam ( source ) Clann = getTeamFromName ( "Player" ) if ( playerTeam ) == Clann then Eso lo cambias por algo asi: if ( getElementData ( source, "gang" ) == "EL NOMBRE DE LA GANG" ) then
  15. Castillo

    Dudas

    Solo necesitas esas dos funciones, y tambien necesitarias: table.concat
  16. Castillo

    Stringing

    Use this simply function I just made for you: function isStringFirstLetterUppercase ( str ) local letter = str:sub ( 1, 1 ) return ( letter:upper ( ) == letter ) end Test code: outputChatBox ( tostring ( isStringFirstLetterUppercase ( "Hello World" ) ) ) -> true outputChatBox ( tostring ( isStringFirstLetterUppercase ( "hello World" ) ) ) -> false
  17. Castillo

    Ayuda

    Usa getElementData, el "dataName" es "gang".
  18. He must have confused the ID with the object ID, since 371 is the parachute object ID.
  19. I suggest you to do the script client side.
  20. You can create a GUI label to show the text written.
  21. Just change the positions, define variables with them, then change them, you can use interpolateBetween to make a cooler effect.
  22. You forgot about: getTimerDetails to get the timer time left.
  23. Since when owning a server makes you an scripter? when I opened my first server, I had no Lua knowledge, I didn't know anything about it.
×
×
  • Create New...