Neffax Posted January 7, 2022 Share Posted January 7, 2022 function pedblood (attacker, weapon, bodypart ,loss ) attacker = getLocalPlayer () weapon = getPlayerWeapon (localPlayer) bodypart = 3 if loss >= 5 then local xa, ya, za = -2399.04736, -601.59784, 132.64844 local skin = createPed (107, xa, ya, za) local ra, rb, rd = getElementRotation (skin) local x, y, z = getElementPosition (skin) local effect = createEffect ( "blood_heli", x, y, z, ra, rb, rd, 15, true) end end addEventHandler ("onClientPedDamage", getRootElement(), pedblood) Link to comment
NeXuS™ Posted January 7, 2022 Share Posted January 7, 2022 Moved to correct section. Right now this script is using a fixed xyz, and not the player's current position. And I also don't understand why there is a new ped created whenever damage is taken. 1 Link to comment
Neffax Posted January 7, 2022 Author Share Posted January 7, 2022 cuz I want to make blood come out of the ped when i shoot him Link to comment
NeXuS™ Posted January 7, 2022 Share Posted January 7, 2022 Can you include any errors if there is any? 1 Link to comment
Neffax Posted January 7, 2022 Author Share Posted January 7, 2022 Bad argument @ 'createPed' [Expected vector3 at argument 2, got nil ] Bad argument @ 'createEffect' [Expected vector3 at argument 2, got nil ] Link to comment
NeXuS™ Posted January 7, 2022 Share Posted January 7, 2022 That doesn't really add up. Can you try to print the xa, ya and za variables? Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now