19.09.2010, 13:35
Hi all,i need to do a thing..
If player dead will be teleported on the hospital of SF
How?
If player dead will be teleported on the hospital of SF
How?
public OnPlayerDeath(playerid, killerid, reason)
{
SendDeathMessage(killerid, playerid, reason);
SendClientMessage(playerid, coloridhere, "You Have Died, And Have Been Taken To The Hospital!");
SetPlayerPos(playerid, X,Y,Z);
SetPlayerVirtualWorld(playerid, IDHERE);
return 1;
}
SetPlayerPos(playerid, X,Y,Z);
SetPlayerVirtualWorld(playerid, IDHERE);
SetPlayerVirtualWorld(playerid, IDHERE);
SendClientMessage(playerid, coloridhere, "You Have Died, And Have Been Taken To The Hospital!");
|
Hi all,i need to do a thing..
If player dead will be teleported on the hospital of SF How? |
OnPlayerDeath
new JustDied[MAX_PLAYERS];
public OnPlayerSpawn(playerid)
{
if(JustDied[playerid] == 1) { SetPlayerPos(playerid, X,Y,Z);/*hospital pos*/ JustDied[playerid] = 0; }
return 1;
}
public OnPlayerDeath(playerid,killerid,reason)
{
JustDied[playerid] = 1;
return 1;
}