OnPlayerDeath - 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)
+--- Thread: OnPlayerDeath (
/showthread.php?tid=377679)
OnPlayerDeath -
Blackazur - 15.09.2012
How can i make that when Human make Suicide, that he spawn as Zombie and not again as Human? He is the OnPlayerDeath:
Quote:
public OnPlayerDeath(playerid, killerid, reason)
{
if(killerid != INVALID_PLAYER_ID)
SetPVarInt(killerid,"HaltStop",0);
|
Re: OnPlayerDeath -
mobiliz - 15.09.2012
Try
pawn Код:
if(gTeam[playerid] == TEAM_HUMAN)
{
gTeam[playerid] = TEAM_ZOMBIE;
}
I think that should work if he kills him-self.
AW: OnPlayerDeath -
BiosMarcel - 15.09.2012
then use if(killerid != playerid || INVALID_PLAYER_ID)
AW: Re: OnPlayerDeath -
Blackazur - 15.09.2012
Quote:
Originally Posted by mobiliz
Try
pawn Код:
if(gTeam[playerid] == TEAM_HUMAN) { gTeam[playerid] = TEAM_ZOMBIE; }
I think that should work if he kills him-self.
|
Work, indeed he is Zombie, but he Spawn with Army/Human Skin. ^^
AW: OnPlayerDeath -
BiosMarcel - 15.09.2012
SetPlayerSkin(playerid,YourZombieSkinNumber);
Re: OnPlayerDeath -
clarencecuzz - 15.09.2012
pawn Код:
public OnPlayerSpawn(playerid)
{
if(gTeam[playerid] == TEAM_ZOMBIE)
{
SetPlayerSkin(playerid, zombieskin);
}
else if(gTeam[playerid] == TEAM_HUMAN)
{
SetPlayerSkin(playerid, humanskin);
}
return 1;
}
Re: OnPlayerDeath -
mobiliz - 15.09.2012
Try to put this OnPlayerSpawn:
pawn Код:
if(gTeam[playerid] == TEAM_ZOMBIE)
{
ResetPlayerWeapons(playerid); //if you want
SetPlayerTeam(playerid,1); //change that if yours is different
SetPlayerColor(playerid,COLOR_YELLOW); //change the color if yours is different
SetPlayerSkin(playerid,162); //change skin if yours is different
GivePlayerWeapon(playerid,9, 1); //Change weapon if you have one or don't have one
}