Jump to content

Angelo Pereira

Members
  • Posts

    251
  • Joined

  • Last visited

  • Days Won

    7

Angelo Pereira last won the day on April 28 2020

Angelo Pereira had the most liked content!

About Angelo Pereira

  • Birthday 19/10/1998

Details

  • Location
    Brasil - RS

Recent Profile Visitors

1,637 profile views

Angelo Pereira's Achievements

Red-Headed Stepchild

Red-Headed Stepchild (19/54)

116

Reputation

Single Status Update

See all updates by Angelo Pereira

  1. function curar_jogador ( thePlayer, comando, nick )
        if nick then
            if getPlayerFromPartialName ( nick ) then
                local accName = getAccountName ( getPlayerAccount ( thePlayer ) )
                if isObjectInACLGroup ("user."..accName, aclGetGroup ( "SAMU") ) then
                    local player_a_ser_curado    =   getPlayerFromPartialName ( nick )
                    local samux, samuy, samuz = getElementPosition ( thePlayer )
                    local curadox, curadoy, curadoz = getElementPosition ( player_a_ser_curado )
                    local dist = getDistanceBetweenPoints3D ( samux, samuy, samuz, curadox, curadoy, curadoz )
                    if player_a_ser_curado == thePlayer then
                        outputChatBox("#bebebeVocê não pode se curar!",thePlayer,255,255,255,true)
                        return
                    end
                    if ( dist > 3 )  then
                    outputChatBox("#bebebeChegue mais perto do jogador!", thePlayer, 255, 255, 255, true)
                    elseif ( dist < 3 )then
                    setPedAnimation( thePlayer, "MEDIC", "CPR", 4500, true, false, false, false)
                    setTimer ( function()
                        setElementHealth ( player_a_ser_curado, 100 )
                        setPedAnimation(player_a_ser_curado, false)
                        setElementFrozen( player_a_ser_curado, false )
                        setElementData(player_a_ser_curado,"PlayerCaido",false)
                    end, 4500, 1 )    
                    end        
                end
            end
        end
    end
    addCommandHandler ( "curar", curar_jogador )

    meu sistema de samu veio assim pode me ajudar como coloco por id inves de nick

×
×
  • Create New...