ThanaReal Posted August 2, 2021 Share Posted August 2, 2021 How can I get target of hydra? I hanged out in MTA Wiki and I didn't find a function for it. I need a function like: if getVehicleTarget(hydra) then bla bla blah else bla bla blah end Link to comment
Hydra Posted August 3, 2021 Share Posted August 3, 2021 8 hours ago, ThanaReal said: How can I get target of hydra? I hanged out in MTA Wiki and I didn't find a function for it. I need a function like: if getVehicleTarget(hydra) then bla bla blah else bla bla blah end You can use this function: https://wiki.multitheftauto.com/wiki/GetPedTarget Link to comment
ThanaReal Posted August 3, 2021 Author Share Posted August 3, 2021 2 hours ago, Hydra said: You can use this function: https://wiki.multitheftauto.com/wiki/GetPedTarget It wasn't working 2 hours ago, Hydra said: You can use this function: https://wiki.multitheftauto.com/wiki/GetPedTarget Aaaaaa I tried something with that function and it worked so thanks to you 2 hours ago, Hydra said: You can use this function: https://wiki.multitheftauto.com/wiki/GetPedTarget But it has problem Link to comment
ThanaReal Posted August 3, 2021 Author Share Posted August 3, 2021 3 hours ago, Hydra said: You can use this function: https://wiki.multitheftauto.com/wiki/GetPedTarget Anyway, I tried but it's only for peds. Not cars. Link to comment
ThanaReal Posted August 3, 2021 Author Share Posted August 3, 2021 Please, I need help Link to comment
RekZ Posted August 3, 2021 Share Posted August 3, 2021 (edited) 6 hours ago, ThanaReal said: Please, I need help Maybe you can test using this functions if you tell me more of what you want to do maybe i can help you xd https://wiki.multitheftauto.com/wiki/OnClientProjectileCreation https://wiki.multitheftauto.com/wiki/GetProjectileTarget Edited August 3, 2021 by RekZ 1 Link to comment
ThanaReal Posted August 4, 2021 Author Share Posted August 4, 2021 2 hours ago, RekZ said: Maybe you can test using this functions if you tell me more of what you want to do maybe i can help you xd https://wiki.multitheftauto.com/wiki/OnClientProjectileCreation https://wiki.multitheftauto.com/wiki/GetProjectileTarget Aaa thanks, it worked. But when hydra doesnt have target, I am giving error text but hydra has 2 projectiles and 2 ERROR MESSAGES Hahahah Link to comment
CastiaL Posted August 4, 2021 Share Posted August 4, 2021 (edited) 35 minutes ago, ThanaReal said: Aaaa teşekkürler işe yaradı. Ama hidra hedefi olmadığında hata metni veriyorum ama hidra'nın 2 mermisi ve 2 HATA MESAJI var Hahahah you can use this command, this command giving only 1 error message local projectilespam = {} addEventHandler( "onClientProjectileCreation", getRootElement( ), function(creator) if projectilespam[creator] then return end projectilespam[creator] = true setTimer(function() projectilespam[creator] = false end, 500, 1) -- Blah blah blah end) Edited August 4, 2021 by CastiaL 1 Link to comment
ThanaReal Posted August 4, 2021 Author Share Posted August 4, 2021 6 hours ago, CastiaL said: you can use this command, this command giving only 1 error message local projectilespam = {} addEventHandler( "onClientProjectileCreation", getRootElement( ), function(creator) if projectilespam[creator] then return end projectilespam[creator] = true setTimer(function() projectilespam[creator] = false end, 500, 1) -- Blah blah blah end) Thanks for helping. Link to comment
RekZ Posted August 6, 2021 Share Posted August 6, 2021 (edited) On 04/08/2021 at 02:13, ThanaReal said: Aaa thanks, it worked. But when hydra doesnt have target, I am giving error text but hydra has 2 projectiles and 2 ERROR MESSAGES Hahahah function onClientProjectileCreation() local projectileType = getProjectileType( source ) if projectileType == 20 then -- 20 = Guiding Rocket -- SCRIPT end end addEventHandler( "onClientProjectileCreation", getRootElement( ),onClientProjectileCreation) You can select what proyectile you want to edit https://wiki.multitheftauto.com/wiki/GetProjectileType Edited August 6, 2021 by RekZ 1 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