Zombie infection
#1

Hi, I'm next in till finish with one of my new gamemode but I've got some problem too.. I don't know how I should do when a Zombie do damages to a human that the human transferee to an Zombie..


Also, Zombie attack human - human will then be a Zombie. Would look forward to see a script exemple if someone have... Thanks!

This just make so when a human(SWAT) loose HP than he will be a zombie... suck..
pawn Код:
public OnPlayerUpdate(playerid)
{
  new Float: NewHealth;
  new Float: OldHealth;
  OldHealth = 100;
  GetPlayerHealth(playerid,NewHealth);

  if(gTeam[playerid] == 0){
  if(NewHealth < OldHealth){

  SetPlayerSkin(playerid,162);
  gTeam[playerid] = 1;
  GameTextForPlayer(playerid, "~r~infected!", 5000,5);
  TogglePlayerControllable(playerid,1);
 
  SendClientMessage(playerid,RED,"DEBUG: TEST!!!");
  }
    }
    return 1;
}
Reply
#2

Код:
	if(Team[playerid] == 1 && Team[killerid] == 0){
	
	  Team[playerid] == 0;
	
	}
put that in onplayerdeath...
Reply
#3

Quote:
Originally Posted by timmehhh
Код:
	if(Team[playerid] == 1 && Team[killerid] == 0){
	
	  Team[playerid] == 0;
	
	}
put that in onplayerdeath...
But that will bring the swat them into Zombie after they have been killed. I'm searching for that if a zombie hit a swat member, the swat member will also be a zombie
Reply
#4

as far as I know that aint possible
Reply
#5

Quote:
Originally Posted by timmehhh
as far as I know that aint possible
I've seen it on a other server. It's possible on some way :/
Reply
#6

Quote:
Originally Posted by timmehhh
as far as I know that aint possible
As far as I know, you need to learn to talk.
I also know that it IS possible. Anything is, you just need to know to script it.
Reply
#7

It's were my problem is... anyone who could give me a exemple on how I should do?
Reply
#8

Quote:
Originally Posted by Goobii
It's were my problem is... anyone who could give me a exemple on how I should do?
Yes. OnPlayerTouch.

See if the person who got touched is a human, and who touched them is a zombie.
Reply
#9

Quote:
Originally Posted by jameskmonger
Quote:
Originally Posted by Goobii
It's were my problem is... anyone who could give me a exemple on how I should do?
Yes. OnPlayerTouch.

See if the person who got touched is a human, and who touched them is a zombie.

OnPlayerTouch is not a function but it would be great if it was. It's just what I should need...
Reply
#10

Quote:
Originally Posted by Goobii
Quote:
Originally Posted by jameskmonger
Quote:
Originally Posted by Goobii
It's were my problem is... anyone who could give me a exemple on how I should do?
Yes. OnPlayerTouch.

See if the person who got touched is a human, and who touched them is a zombie.

OnPlayerTouch is not a function but it would be great if it was. It's just what I should need...
No, OnPlayerTouch is a callback.


Yeah, I dunno why I thought that xD
Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)