Little OnPlayerDeath question - 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: Little OnPlayerDeath question (
/showthread.php?tid=234994)
Little OnPlayerDeath question -
Audiophr3ak - 04.03.2011
Skin rolls back to CJ skin after first death, but later after second death it works fine. Whats the problem?
It looks like with animations which works only after second applying... -_-
public OnPlayerDeath(playerid)
{
new skin = GetPlayerSkin(playerid);
SetSpawnInfo(playerid, 0, skin, 1607.3992, 1815.2408, 10.8204, 0, 0, 0, 0, 0, 0, 0);
return 1;
}
Re: Little OnPlayerDeath question -
Mean - 04.03.2011
Why do you use SetSpawnInfo? Use AddPlayerClass in OnGameModeInit, I have no probs with it.
Re: Little OnPlayerDeath question -
Audiophr3ak - 04.03.2011
im using it because i have a login system which is using SetSpawnInfo. it looks like:
SetSpawnInfo(playerid,0,dini_Int(file, "Skin"),dini_Int(file, "X"),dini_Int(file, "Y"),dini_Int(file, "Z"),0,0,0,0,0,0,0);
And when you dead you need to spawn at hospital entrance with the same skin you had before. But skin applies only after second death. Thats sucks.
Re: Little OnPlayerDeath question -
Audiophr3ak - 05.03.2011
Solved.