OnPlayerDeath
#6

put this in your GM, it's got some debug msgs to determine where the problem occurs.

pawn Код:
print( "starting" );
if(IsPlayerConnected(killerid) && killerid != INVALID_PLAYER_ID)
    {
        print( "1" );
        new WeapName[32], Name[MAX_PLAYER_NAME], KillerName[MAX_PLAYER_NAME];
        print( "2" );
        GetWeaponName(reason, WeapName, sizeof(WeapName));
        printf( "wepName: %s", WeapName );
        GetPlayerName(playerid, Name, MAX_PLAYER_NAME);
        printf( "pName: %s", Name );
        GetPlayerName(killerid, KillerName, MAX_PLAYER_NAME);
        printf( "kname: %s", KillerName );
        format(string, sizeof(string),"%s (%d) Died. Killed By: %s (%d) - %s. ", Name, playerid, KillerName, killerid, WeapName);
        printf( "%s", string );
        SendClientMessageToAll(COLOR_DARKRED, string);
        print( "7" );
        SendDeathMessage(killerid, playerid, reason);
        print( "8" );
    }
    else
    {
        print( "9" );
        new Name[MAX_PLAYER_NAME];
        print( "10" );
        GetPlayerName(playerid, Name, MAX_PLAYER_NAME);
        printf( "%s", Name );
        format(string, sizeof(string),"%s (%d) Died.", Name, playerid);
        printf( "%s", string );
        SendClientMessageToAll(COLOR_DARKRED, string);
        print( "13" );
        SendDeathMessage(killerid, playerid, reason);
        print( "14" );
    }
print( "end!" );
go ingame, suicide or get killed, and paste the server-log here.
Reply


Messages In This Thread
OnPlayerDeath - by Ananisiki - 28.02.2014, 15:44
Re: OnPlayerDeath - by Ananisiki - 28.02.2014, 21:21
Re: OnPlayerDeath - by Ananisiki - 01.03.2014, 10:40
Re: OnPlayerDeath - by Smileys - 01.03.2014, 10:45
Re: OnPlayerDeath - by Ananisiki - 01.03.2014, 10:46
Re: OnPlayerDeath - by Smileys - 01.03.2014, 11:10
Re: OnPlayerDeath - by Ananisiki - 01.03.2014, 11:36
Re: OnPlayerDeath - by Konstantinos - 01.03.2014, 11:45
Re: OnPlayerDeath - by Zex Tan - 01.03.2014, 11:52
Re: OnPlayerDeath - by Ananisiki - 01.03.2014, 11:53

Forum Jump:


Users browsing this thread: 2 Guest(s)