#1

How do i do that if i shoot a player he wont loose health it will stay on what his health his im using the OnPlayerShootPlayer function and here is what i've done so far

pawn Код:
GetPlayerHealth(Target, HP);
                    GetPlayerArmour(Target, Armor);
                    SetPlayerHealth(Target, HealthLost+HP);
                    SetPlayerArmour(Target, ArmourLost+Armor);
but he keeps loosing health.
Reply
#2

Do you wish that if a player shoots other one, the health does not go down?

https://sampwiki.blast.hk/wiki/SetPlayerTeam
Reply
#3

Why in the world would i want to put him in a team, my code is okay but he is still loosing health and i wanna know why and how to fix it
Reply
#4

Because SetPlayerTeam disables friendly fire. Teammates can not harm each other in any way.
Reply
#5

I know what it does, as i stated above i want someone to tell me why my code isent working.
Reply
#6

OnPlayerShootPlayer isnt 100% reliable. Better use OnPlayerTakeDamage for this with the same code: https://sampwiki.blast.hk/wiki/OnPlayerTakeDamage
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)