Hydra damage
#1

Hello guys, well I am building some sort of TDM and there are hydras in it, is it somehow possible to reduce their damage? Or for example disable CTRL key for few seconds?
Reply
#2

https://sampwiki.blast.hk/wiki/OnPlayerKeyStateChange - detect if fire was pressed, add timer with cooldown, done
Reply
#3

I tried with that but there arent actually ways to disable the button itself.
For example I tried with.
Quote:

if(PRESSED(KEY_FIRE)) return 0;

But the issue is that I cannot find any way to disable the button. If you add if he/she presses the button and add key fire it wont stop him from shooting the hydra flare.
Reply
#4

Ok, sorry, I didn't think that through. https://sampwiki.blast.hk/wiki/OnPlayerTakeDamage is what you are looking for. Just make sure damager is in hydra, and the reason is explosion/rocket
Reply
#5

So how should it be for example?
Quote:

if(IsPlayerInVehicle(playerid, 1))
{
if(issuerid != INVALID_PLAYER_ID && weaponid == 51))
{
what here?
}
}

Reply
#6

You can't detect if a player kills a player by blowing up their vehicle which sucks. You could detect it with angles and projections (like a line of sight sort of thing) and a timer/distance but it would be difficult and unreliable. I've been waiting for this to be added for years.
Reply
#7

Pfff, so no chance in reducing any type of vehicle weapon? Or disabling a key or such?

If not I guess I'll have to freeze player each time he shoots :/


Edit: I mean like there is not 100 percent sure way to do it like detect.w
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)