Spawn on death - 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: Spawn on death (
/showthread.php?tid=542325)
Spawn on death -
Fjclip99 - 18.10.2014
I am having some problems with player deaths... Now when player dies he gets the class selection but i don't want that... i want when player dies, he spawns at hospital...
Re: Spawn on death -
RockyGamer - 18.10.2014
Can you show us your public OnPlayerDeath and public OnPlayerSpawn?
Re: Spawn on death -
austin070 - 18.10.2014
You can use this to spawn players somewhere after death. However, you need to make sure ForceClassSelection() isn't being called in either callback.
pawn Код:
new Dead[MAX_PLAYERS];
public OnPlayerDeath(playerid)
{
Dead[playerid] = 1;
return 1;
}
public OnPlayerSpawn(playerid)
{
if(Dead[playerid] == 1)
{
SetPlayerPos(playerid, x, y, z);
Dead[playerid] = 0;
}
return 1;
}
Re: Spawn on death -
0x41726d79 - 18.10.2014
Or you can search ForceClassSelection.
If you don't find, you can give us OnPlayerSpawn and OnPlayerDeath.