SA-MP Forums Archive
Zombie infection - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Zombie infection (/showthread.php?tid=121162)



Zombie infection - Goobiiify - 15.01.2010

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;
}



Re: Zombie infection - timmehhh - 15.01.2010

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


Re: Zombie infection - Goobiiify - 15.01.2010

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


Re: Zombie infection - timmehhh - 15.01.2010

as far as I know that aint possible


Re: Zombie infection - Goobiiify - 15.01.2010

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 :/


Re: Zombie infection - jameskmonger - 15.01.2010

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.


Re: Zombie infection - Goobiiify - 15.01.2010

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


Re: Zombie infection - jameskmonger - 15.01.2010

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.


Re: Zombie infection - Goobiiify - 15.01.2010

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...


Re: Zombie infection - jameskmonger - 15.01.2010

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