Jump to content

PedDamage[SOLVED]


Price.

Recommended Posts

Posted (edited)

I have a script that makes the Ped jobs all god modded , thing is i'm using Peds in ammunation training and ofc its god modded too, so the training won't be complete, I want to make the peds inside ammunation able to get killed, any ideas?

I tried some random things but this is the most random

function createAntiDmAmmu (hitElement, attacker, attackerweapon, bodypart, loss) 
toggleControl (hitElement, "fire", true) 
toggleControl (hitElement, "aim_weapon", true) 
end 
addEventHandler ("onColShapeHit", rectangle, createAntiDmAmmu) 
addEventHandler ( "onPlayerDamage", getRootElement(), createAntiDmAmmu ) 
  

Edited by Guest
Posted

I already canceled event onClientPlayerDamage , and that's the problem.. can't get ammunation shop peds getting damaged, I want them to be damaged to be able to shoot and kill them

Posted

Yah I agree with Lolman My idea is do that randomly like check the hitElement if he's player and he's standing on the colshape and create the peds there without using cancelEvent or even the event "onPlayerDamage" , I think it might work that way .

Posted

Not quite sure about this one but I uhh really don't know what should be added after getElementInterior like I can't say killped so it doesn't interrupt the training script

function createAntiDmAmmu (hitElement, attacker, attackerweapon, bodypart, loss) 
  
if ( getElementInterior(thePed) == 1 ) then 
  
end 
addEventHandler ("onColShapeHit", rectangle, createAntiDmAmmu) 
addEventHandler ( "onPlayerDamage", getRootElement(), createAntiDmAmmu ) 
  

Posted
Not quite sure about this one but I uhh really don't know what should be added after getElementInterior like I can't say killped so it doesn't interrupt the training script
function createAntiDmAmmu (hitElement, attacker, attackerweapon, bodypart, loss) 
  
if ( getElementInterior(thePed) == 1 ) then 
  
end 
addEventHandler ("onColShapeHit", rectangle, createAntiDmAmmu) 
addEventHandler ( "onPlayerDamage", getRootElement(), createAntiDmAmmu ) 
  

You could tell me exactly what do you want and i will help you.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...