SA-MP Forums Archive
How to make player spawn at hospital after 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: How to make player spawn at hospital after death (/showthread.php?tid=370443)



How to make player spawn at hospital after death - Ben_Hatfield - 20.08.2012

I host a roleplay server, but i haven't set it for the player to spawn at the hospital after death, they just spawn at the airport (where you spawn when you first register) and i dont know how to do this, can someone help me out? thanks


Re: How to make player spawn at hospital after death - [ABK]Antonio - 20.08.2012

http://forum.sa-mp.com/search.php?searchid=5062995

Look through those, if you don't find what you're looking for I'll help you out :P


Re: How to make player spawn at hospital after death - trapstar2020 - 20.08.2012

Код:
public OnPlayerDeath(playerid, killerid, reason)
{
   SetPlayerPos(playerid,x,y,z);///sets the player who dies to this position
   return1;
}



Re: How to make player spawn at hospital after death - ThePhenix - 20.08.2012

Use:

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{

SetPlayerPos(playerid, 1552.5980,-1676.2185,16.1953,76.0868); //He will spawn at LSPD but you can change the cords to the Hospital
    return 1;
}



Re: How to make player spawn at hospital after death - Ben_Hatfield - 20.08.2012

i also need to set a timer for at least 30 seconds


Re: How to make player spawn at hospital after death - ThePhenix - 20.08.2012

But this timer, how it will work?

For example, if player dies? He has to wait 30 seconds to be spawned again on hospital?

Explain clearly to understand you!


Re: How to make player spawn at hospital after death - Ben_Hatfield - 20.08.2012

yes, after the player dies he has to wait for at least 30 seconds, frozen in crack anim inside hospital interior, and then spawn outside of hospital when timer is over


Re: How to make player spawn at hospital after death - ThePhenix - 20.08.2012

Can you give me the Hospital Interior coordinates?


Re: How to make player spawn at hospital after death - Ben_Hatfield - 20.08.2012

just use a empty room from this int 384.808624,173.804992,1008.382812 but make it so the player cant move


Re: How to make player spawn at hospital after death - ThePhenix - 20.08.2012

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
ApplyAnimation(playerid,"MEDIC","CPR",1.1,1,0,0,1,30000,1);//Modifie it as you want, this is an animation,
 return 1;
}
Hope it helps, if it's rep me!