Question + Help
#1

Hey guys can someone help me and say why or solve it for me ? is not a big problem .. but i really don't know why is not working :-s

under public onplayergivedamage

HTML Code:
new sameteam = HumanPlayer[playerid] == 1;
new sameteamd = HumanPlayer[damagedid] == 1;

Type 1: if(HumanPlayer[playerid] == 1 && HumanPlayer[damagedid] == 1) amount = 0;
Type 2: if(HumanPlayer[playerid] == 1 && HumanPlayer[damagedid] == 1 && sameteam == sameteamd) amount = 0;
nothing from type 1 and 2 is working... when i shot a team mate he still get's damage , can someone help me ?
Reply
#2

Why don't you just use SetPlayerTeam?
Reply
#3

Quote:
Originally Posted by Vince
View Post
Why don't you just use SetPlayerTeam?
can you give me a model ... or a solve i still didn't find something
Reply
#4

Try setting both players' team to human, have you tried that? lol

If you have verified that they are called however, then the issue is obviously somewhere else. Also, you cannot stop damage by returning 0 in OPGD, so if you don't have a custom damage system this is pointless. If you're restoring health in OPGD then you should be doing that under OPTD instead.
Reply
#5

Quote:
Originally Posted by CheezIt
View Post
Try setting both players' team to human, have you tried that? lol
HumanPlayer is it if you watch closer

HumanPlayer[playerid] == 1 // is the attacker
HumanPlayer[damagedid] == 1 // is the person who took damage from his team mate

and that will call

sameteam == sameteamd
Reply
#6

Quote:
Originally Posted by StR_MaRy
View Post
HumanPlayer is it if you watch closer

HumanPlayer[playerid] == 1 // is the attacker
HumanPlayer[damagedid] == 1 // is the person who took damage from his team mate

and that will call

sameteam == sameteamd
You think I'm that stupid? This is practically the exact same thing: if(HumanPlayer[playerid] == 1 && HumanPlayer[damagedid] == 1)

You're saying it's not working, so it's safe to assume that your conditions are not being called at all, thus causing your system to not work. And like I said above, if it is called then you obviously got something wrong beyond those two if-then's (the second if-then is basically the same thing as the first one but doing the same validation twice...).
Reply
#7

EDIT: SOLVED
Reply
#8

Those two if-then's aren't even in your callback lol

I'm done wasting my time with you, good luck.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)