10.10.2011, 21:02
Hey all i need death system to my server like when you die you respawn at hospital any idea link?
OnPlayerDeath(playerid, other stuff)
{
SetPlayerPos(playerid,x , y , z);
return 1;
}
// top of script
new SpawnInHospital[MAX_PLAYERS];
// under onplayerdeath
SpawnInHospital[playerid] = 1;
// under onplayerspawn
if(SpawnInHospital [playerid] == 1)
{
// set their pos to the hospital
// set virtual world and interior
// etc
return 1;
}
|
Not hard at all.
You need to create a global variable like: pawn Code:
|

public OnPlayerDeath(playerid, killerid, reason)
{
SetPlayerPos(playerid, 811.8060,-1098.2509,25.9063);
SendClientMessage(playerid, 0xEBF224FF, "You have died.You will be spawn in the cemetery");
return 1;
}