Posts: 577
Threads: 183
Joined: Jun 2013
Reputation:
0
Hey, first question is about the include OPSP (OnPlayerShootPlayer)
Is it called AFTER the player lost the armor&HP ?
Second question, can I detect HP/AP/Both lost under OnPlayerWeaponShot somehow ?
Third question, can I prevent a player losing HP using something under OnPlayerTake/GiveDamage ?
Posts: 944
Threads: 128
Joined: Sep 2014
Reputation:
0
About OnPlayerShootPlayer, it gets called after player loses health, but you shouldn't use it because it's old and it was created when OnPlayerTakeDamage/OnPlayerGiveDamage didn't exist.
About disabling damages: you can return 0 under OnPlayerWeaponShot to prevent gun damage, but it will totally remove the bullets, but the other way what people do (including me) is set everyone's team to 0 so all damages given from someone will be disabled so you can create your own damages.
Posts: 944
Threads: 128
Joined: Sep 2014
Reputation:
0
No, you can do the same team thing in TDM as well. I did that in my gamemode. That's the only way I guess. As I told you, if you return 0 under OnPlayerWeaponShot players won't be even able to see that you shot them, they won't see any bullets, blood nor muzzle flash, only you will see these effects. For the same team thing all you need to do is create a variable where you store player's team, and simply don't take the custom damage from the player if the shooter's team is same as the player's, you don't need to do anything with SetPlayerTeam after setting them to the same team.
Posts: 577
Threads: 183
Joined: Jun 2013
Reputation:
0
You guys did not understand me, nevermind anymore I guess ..
I will explain it the best way I can
I DON'T want the Health/Armour to be reduced from their Health/Armour BAR (GetPlayerHP/AP)
I want to REDUCE it myself using a function that will reduce it from the HEALTH / ARMOUR array instantly, because the delay makes some ban glitches.
A clue ?