18.08.2010, 04:13
public OnPlayerDeath(playerid, killerid, reason)
{
if(playerisinevent[playerid]) // or whatever variable that defines the player is in an event
{
new Float:X, Float:Y, Float:Z, Float:A;
GetPlayerPos(playerid, X, Y, Z);
GetPlayerFacingAngle(playerid,A);
SetSpawnInfo(playerid, playerid, PlayerInfo[playerid][pModel],X, Y, Z, A, 0, 0, 0, 0, 0, 0);
SpawnPlayer(playerid);
}
else
{
// else they arent in an event, and you want to send em to hell or something!
}
return 1;
}
{
if(playerisinevent[playerid]) // or whatever variable that defines the player is in an event
{
new Float:X, Float:Y, Float:Z, Float:A;
GetPlayerPos(playerid, X, Y, Z);
GetPlayerFacingAngle(playerid,A);
SetSpawnInfo(playerid, playerid, PlayerInfo[playerid][pModel],X, Y, Z, A, 0, 0, 0, 0, 0, 0);
SpawnPlayer(playerid);
}
else
{
// else they arent in an event, and you want to send em to hell or something!
}
return 1;
}