GetPlayerInterior returns 0 OnPlayerDeath?
#1

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;
}
Reply


Messages In This Thread
GetPlayerInterior returns 0 OnPlayerDeath? - by 2KY - 29.09.2012, 00:18
Re: GetPlayerInterior returns 0 OnPlayerDeath? - by newbienoob - 29.09.2012, 09:40

Forum Jump:


Users browsing this thread: 1 Guest(s)