29.09.2012, 00:18
I have a death revival system for my roleplay server, which works perfectly. Until the person dies inside of an interior. It resets their interior to 0 rather than the actual interior ID.
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
new
Float: myPos [ 4 ],
int,
vw;
GetPlayerPos( playerid, myPos [ 0 ], myPos [ 1 ], myPos [ 2 ] );
GetPlayerFacingAngle( playerid, myPos [ 3 ] );
int = GetPlayerInterior( playerid );
vw = GetPlayerVirtualWorld( playerid );
plJustDied [ playerid ] = true;
plDeathPosition [ playerid ] [ 0 ] = myPos [ 0 ], plDeathPosition [ playerid ] [ 1 ] = myPos [ 1 ],
plDeathPosition [ playerid ] [ 2 ] = myPos [ 2 ], plDeathPosition [ playerid ] [ 3 ] = myPos [ 3 ];
plDeathInterior [ playerid ] = int;
plDeathVirtualWorld [ playerid ] = vw;
return true;
}