Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. You can try this: function startBleeding ( attacker, weapon, bodypart ) local health = getElementHealth ( source ) local bleeding = getElementData ( source, "bleeding" ) if ( health <= 100 ) and ( health > 1 ) and ( bleeding <= 1 ) and ( weapon >= 22 ) and ( bodypart >= 1 ) then exports [ 'anticheat-system' ]:changeProtectedElementDataEx ( source, "bleeding", 1, false ) exports.global:sendLocalMeAction ( source, "starts to bleed." ) setTimer ( bleedPlayer, 5000, 1, source, getPlayerName ( source ) ) end end addEventHandler ( "onPlayerDamage", getRootElement(), startBleeding ) function bleedPlayer ( thePlayer, playerName ) if ( isElement ( thePlayer ) ) then -- still logged in & playing if ( playerName == getPlayerName ( thePlayer ) ) then -- make sure they havent changed character local health = getElementHealth ( thePlayer ) setElementHealth ( thePlayer, health - 2 ) setTimer ( bleedPlayer, 5000, 1, thePlayer, playerName ) exports [ 'anticheat-system' ]:changeProtectedElementDataEx ( thePlayer, "bleeding", 0, false ) end end end
  2. That must be because you're checking if the player lost 9% or higher health, btw what is this? if ( bodypart >= 1 and loss >= 9 ) then The "loss" argument is not defined anywhere.
  3. Yeah, that always happened to me, when I tried to set element data same as old, it returned false. You're welcome.
  4. I'm afraid the wiki is wrong then, take a look:
  5. Castillo

    Ayudaaaaaa

    Yo dije agregar, no remplazar.
  6. Are you sure that the data isn't already "true"?
  7. I don't see anything wrong in the Lua script, do you have any debug script error? is the script set as server side in the meta.xml?
  8. I guess you could create an image which would be the blur, then draw it when press "O".
  9. Castillo

    Interior ID

    You asked for the LS PD interior ID, didn't you? the interior ID is: 6.
  10. Castillo

    Interior ID

    I found this at the Freeroam resource: name="LSPD HQ" posX="246.78" posY="62.2" posZ="1002.64" world="6"
  11. So you think we got time to spend with some random guy? we don't accept requests here. P.S: I laugh at this part: "Please make it exac size, this is the actual size i want it to be like."
  12. Please stay on topic, if the guy "IhateScripting" wants to pay that price, then it's his/her problem.
  13. No, the only thing you can do is play it over the current with: playSound.
  14. https://community.multitheftauto.com/ind ... tails&id=4
  15. Castillo

    Ayudaaaaaa

    Tenes que agregar otro argumento y usar getPlayerFromName.
  16. Castillo

    Ayudaaaaaa

    Pues claro, si ahi estas usando el elemento 'source' que seria el que uso el comando.
  17. Castillo

    Ayudaaaaaa

    Exacto, tendrias que guardar el element data cuando se vayan del servidor.
  18. Castillo

    Ayudaaaaaa

    auto = createVehicle ( 433, -2270, 2300.8999023438, 5.4000000953674, 0, 0, 270 ) function autos ( thePlayer, seat ) if ( seat == 0 and source == auto ) then -- Aca tenias que checkear si el asiento era "0", no si no era "0". local accountName = getAccountName ( getPlayerAccount ( thePlayer ) ) if ( not isObjectInACLGroup ( "user.".. accountName, aclGetGroup ( "Umbrella" ) ) ) then cancelEvent ( ) outputChatBox ( "solamente umbrella puede usar estos vehiculos", thePlayer, 255, 0, 0, true ) end end end addEventHandler ( "onVehicleStartEnter", root, autos )
  19. Castillo

    Ayudaaaaaa

    auto = createVehicle ( 433, -2270, 2300.8999023438, 5.4000000953674, 0, 0, 270 ) function autos ( thePlayer, seat ) if ( seat ~= 0 and source == auto ) then local accountName = getAccountName ( getPlayerAccount ( thePlayer ) ) if ( not isObjectInACLGroup ( "user.".. accountName, aclGetGroup ( "guest" ) ) ) then cancelEvent ( ) outputChatBox ( "solamente umbrella puede usar estos vehiculos", thePlayer, 255, 0, 0, true ) end end end addEventHandler ( "onVehicleStartEnter", root, autos ) Tu ACL de Umbrella se llama "guest"?
  20. Claro que va a funcionar, pero vas a tener un error en el debug script diciendo que la funcion "cancelar" no existe, ademas de que ese evento no deberia estar ahi.
  21. Castillo

    Ayudaaaaaa

    En lugar de "teams" en setPlayerTeam, pones nil, deberia quitarlo del team.
  22. Castillo

    Ayudaaaaaa

    function teams ( source ) local accName = getAccountName ( getPlayerAccount ( source ) ) -- Porque pusiste 'thePlayer' si tu argumento es 'source'? if isObjectInACLGroup ("user.".. accName, aclGetGroup ( "LiderUmbrella" ) ) then local teams = getTeamFromName ( 'Umbrella') if ( teams ) then setPlayerTeam ( source, teams ) outputChatBox ( "Umbrella ", source, 255, 255, 0 ) end end end addCommandHandler ( "Umbrella", teams )
×
×
  • Create New...