SA-MP Forums Archive
OPGD when same team - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: OPGD when same team (/showthread.php?tid=630318)



OPGD when same team - SiNuS - 12.03.2017

Trying to make a Server Sided Health/Armour System.
I'm using SetPlayerTeam for all players.

The problem;
When player X is using CROUCH and he is shooting player Y OnPlayerGiveDamage it's not called.. (Players are in the same team)
It's a SAMP bug or what?


Re: OPGD when same team - Vince - 12.03.2017

SetPlayerTeam does not allow one to damage players on the same team. So it's probably not a bug.


Re: OPGD when same team - SiNuS - 13.03.2017

Quote:
Originally Posted by Vince
Посмотреть сообщение
SetPlayerTeam does not allow one to damage players on the same team. So it's probably not a bug.
I know, but my problem is that OnPlayerGiveDamage it's not called when a player (crouched) shoots another player.


Re: OPGD when same team - Toroi - 13.03.2017

Maybe a mistake of yours under OnPlayerWeaponShot ? Do you have any check there to see if the player is crouched?


Re: OPGD when same team - SiNuS - 13.03.2017

Quote:
Originally Posted by Troydere
Посмотреть сообщение
Maybe a mistake of yours under OnPlayerWeaponShot ? Do you have any check there to see if the player is crouched?
No, there is clear.
It only happen to some players, not to all players.


Re: OPGD when same team - Toroi - 13.03.2017

Do you have lagcomp on or off?


Re: OPGD when same team - SiNuS - 13.03.2017

I don't use lagcomp in my server.cfg , so I think it's disabled.


Re: OPGD when same team - Toroi - 13.03.2017

It's enabled by default.

How are you checking the OnPlayerTakeDamage callback? Is there a possibility of that player using health hack or whatever so he doesn't get damage?

I can't think of anything else atm.