fxAddBlood | Multi Theft Auto: Wiki Skip to content

fxAddBlood

Client-side
Server-side
Shared

This page is incomplete! Help wanted!

Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.


Creates a blood splatter particle effect.

Syntax

fxAddBlood ( )

Code Examples

client

This example creates blood effects when a player gets shot.

function BloodonDamage( attacker, weapon, bodypart, loss )
if loss > 25 then -- if the player loses more than 25 hp, then...
local x, y, z = getElementPosition( source ) -- get player's position for adding blood
local randombloodamount = math.random( 1, 3 ) -- random blood amount 1-3
fxAddBlood ( x, y, z-2, 0.00000, 0.00000, 0.00000, randombloodamount, 1 )
-- this adds blood to player's current position
end
end
addEventHandler( "onClientPlayerDamage", root, BloodonDamage ) -- calls the function when a player loses hp