Change skin - 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: Change skin (
/showthread.php?tid=577085)
Change skin -
KillerDVX - 08.06.2015
Hi guys,
I did this in OnePlayerDeath,
PHP код:
public OnPlayerDeath(playerid, killerid, reason)
{
if(gTeam[playerid] == Survivors) //Change this code and transform it to yours
{
gTeam[playerid] = Zombie; //this sets the player to a zombie if he was a survivor before his death
return 1;
}
return 1;
}
But when a survivor die and change to zombie, he keeps the same skin of survivors..
I want to change his skin to zombie..
? :S
Re: Change skin -
DarkLored - 08.06.2015
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
if(gTeam[playerid] == Survivors) //Change this code and transform it to yours
{
SetPlayerSkin(playerid, skinid);//Put the ID of the zombie skin here
gTeam[playerid] = Zombie; //this sets the player to a zombie if he was a survivor before his death
return 1;
}
return 1;
}
Re : Change skin -
KillerDVX - 08.06.2015
It doesn't work, it freezes player after dead.. he doesn't spawn
Re: Change skin -
Konstantinos - 08.06.2015
• SetSpawnInfo in the code you posted (after setting the team).
OR
• SetPlayerSkin in OnPlayerSpawn (checking the team before and setting accordingly).
Re : Change skin -
KillerDVX - 08.06.2015
• SetSpawnInfo in the code you posted (after setting the team).
Worked perfectly.
Thanks.