Leandro MTA
-
Posts
1 -
Joined
-
Last visited
Leandro MTA's Achievements
I ordered some spaghetti with marinara sauce and I got egg noodles and ketchup. I'm an average nobody. (2/54)
0
Reputation
-
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