Spawn/Death system - When a zombie kills a human he doesnt spawn as a zombie - 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: Spawn/Death system - When a zombie kills a human he doesnt spawn as a zombie (
/showthread.php?tid=113594)
Spawn/Death system - When a zombie kills a human he doesnt spawn as a zombie -
Julian2574 - 14.12.2009
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??
Re: Spawn/Death system - When a zombie kills a human he doesnt spawn as a zombie -
Tigerbeast11 - 14.12.2009
pawn Код:
public OnPlayerSpawn(playerid)
{
if(gTeam[playerid] == 5)
{
gTeam[playerid] = 1 //Edit this line to the normal team.
}
}
Not tested, should work.
Re: Spawn/Death system - When a zombie kills a human he doesnt spawn as a zombie -
Julian2574 - 14.12.2009
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
Re: Spawn/Death system - When a zombie kills a human he doesnt spawn as a zombie -
Tigerbeast11 - 14.12.2009
Plz can u go over what u want in clear english. I can't understand u...
Re: Spawn/Death system - When a zombie kills a human he doesnt spawn as a zombie -
Julian2574 - 14.12.2009
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..
Re: Spawn/Death system - When a zombie kills a human he doesnt spawn as a zombie -
Tigerbeast11 - 14.12.2009
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...