Price. Posted July 11, 2015 Share Posted July 11, 2015 (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 July 13, 2015 by Guest Link to comment
lolman Posted July 11, 2015 Share Posted July 11, 2015 Maybe cancelevent onClientPlayerDamage but only if it's a ped. So you can maybe loop all peds to use the function... Link to comment
Price. Posted July 11, 2015 Author Share Posted July 11, 2015 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 Link to comment
lolman Posted July 11, 2015 Share Posted July 11, 2015 Hmm wasnt that going automaticly? Because I once made a command which adds a ped and when I shot it, it lost hp and died... Link to comment
LaCosTa Posted July 11, 2015 Share Posted July 11, 2015 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 . Link to comment
Calculador Posted July 11, 2015 Share Posted July 11, 2015 I suggest you that specify if the peds are in ammunation then able killed. if ( getElementInterior(thePed) == 0 ) then -- the interior of ammunation's Link to comment
Price. Posted July 11, 2015 Author Share Posted July 11, 2015 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 ) Link to comment
Calculador Posted July 12, 2015 Share Posted July 12, 2015 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. 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