Thanks! it worked! But now the message spams every second a player gets hitted by the spray, It's possible to limit the number of messages? Thanks in advantage
addEventHandler ( "onPlayerDamage", getRootElement (),
function ( attacker, weapon )
if ( weapon == 41 ) then
if ( getElementType ( source ) == "player" ) then
fadeCamera(source, false)
setTimer(function(source)
fadeCamera(source, true)
end, 5000, 1, source)
outputChatBox ( "Has cegado a alguien con un gas pimienta " , attacker, 0, 255, 120 )
outputChatBox ( "Has sido cegado con un gas pimienta por ." , source, 0, 255, 120 )
end
end
end
)