Jump to content

[QUESTION] Getting target of Hydra


ThanaReal

Recommended Posts

2 hours ago, Hydra said:

It wasn't working :(

2 hours ago, Hydra said:

Aaaaaa I tried something with that function and it worked so thanks to you ❤️

2 hours ago, Hydra said:

 

But it has problem :/

Link to comment
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 by CastiaL
  • Thanks 1
Link to comment
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
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 by RekZ
  • Like 1
Link to comment

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...