Spawn/Death system - When a zombie kills a human he doesnt spawn as a zombie
#1

The topic says all.. Here is the system i use:
Код:
	if ((gTeam[killerid]) == 5)//If The killer is a zombie
		{
		gTeam[playerid] = 5; //Makes your status to zombie.
		PlayerInfo[playerid][pTeam] = 5;
		SetPlayerColor(playerid,COLOR_RED);
		SetPlayerWeapons(playerid);
		format(string, sizeof(string), "%s spawned as a zombie", name);
		SendClientMessageToAll(COLOR_RED, string);
		
		
	}
}
What i ment is when i get kill'd by a zombie i dont spawn as a zombie then..
Any idea??
Reply
#2

pawn Код:
public OnPlayerSpawn(playerid)
{
if(gTeam[playerid] == 5)
{
gTeam[playerid] = 1      //Edit this line to the normal team.
}
}
Not tested, should work.
Reply
#3

Then if a civilian / faction member kill me i'll spawn as a zombie .. I just only regulary ONLY zombie that can make me spawn as a zombie
Reply
#4

Plz can u go over what u want in clear english. I can't understand u...
Reply
#5

Oh sorry mate i didnt know that you didnt understand 100% perfect english.
What i ment is that code you gave me will work BUT then if a civilian kills me he'll make me spawn into zombie and i dont want that . I only want zombie to make me spawn into a zombie after hes killed me..
Reply
#6

Quote:
Originally Posted by »Julian™«
Oh sorry mate i didnt know that you didnt understand 100% perfect english.
What i ment is that code you gave me will work BUT then if a civilian kills me he'll make me spawn into zombie and i dont want that . I only want zombie to make me spawn into a zombie after hes killed me..
Ok, I think I get it now.

pawn Код:
public OnPlayerDeath(killerid,playerid,reason)
{
if(gTeam[playerid] == 5)//Zombies id
{
gTeam[playerid] = 5; //Makes your status to zombie.
        PlayerInfo[playerid][pTeam] = 5;
        SetPlayerColor(playerid,COLOR_RED);
        SetPlayerWeapons(playerid);
        format(string, sizeof(string), "%s spawned as a zombie", name);
        SendClientMessageToAll(COLOR_RED, string);
}
else if(gTeam[killerid] == 1) //Civillian team
{
gTeam[playerid] = 1;
SpawnPlayer(playerid);
}}
Not sure, but hopefully that should work...
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)