SA-MP Forums Archive
OnPlayerDeath - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: OnPlayerDeath (/showthread.php?tid=317818)



OnPlayerDeath - No Fear - 12.02.2012

Hi, where i could add this code
pawn Код:
SetSpawnInfo(playerid,GetPlayerTeam(playerid),GetPlayerSkin(playerid),-2645.6074,697.1324,27.9375,356.4937,0,0,0,0,0,0);
in
pawn Код:
if( killerid != INVALID_PLAYER_ID )
    {
   
        if( InGameCheck[ killerid ] )
        {

            if( InGameCheck[ playerid ] )
            {
                MVar        [ killerid ][ mKills ]  ++;
                MVar        [ playerid ][ mDeaths ] ++;
                MVar        [ killerid ][ mXPPlus ] += 100;
                TDXPCount   [ killerid ]            += 100;

                // :Patikrinam Ar Pakilo Lygis
                CheckIfLevelUp( killerid );

                new
                    string[ 10+1 ]
                ;

                format              ( string, sizeof( string ), "XP: +%i", TDXPCount[ killerid ] );
                GameTextForPlayer   ( killerid, string, 3000, 4 );
                SetTimerEx          ( "XPShow",1000*3,false,"%d",killerid );
    }}}
the first code mean if i died like suicide or benn killed by the guy whos " InGameCheck " is false that it would spawn SetSpawnInfo(playerid,GetPlayerTeam(playerid),GetP layerSkin(playerid),-2645.6074,697.1324,27.9375,356.4937,0,0,0,0,0,0);