OnPlayerDeath isn't getting called correctly
#1

Right, i'm in the process of making a minigame for my server, which is using OnPlayerDeath.

I've debugged it and found that only "1" & "5" are getting called on the server console.

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    new string[128];
    SendDeathMessage(killerid, playerid, reason);
    print("1");
    if(isInLaserShoot{playerid} == true && IsPlayerInAnyVehicle(playerid)) {
        print("2");
        if(killerid != INVALID_PLAYER_ID) {
            print("3");
            format(string, sizeof string, "[LASER] You was exploded by, %s!", GetName(killerid));
            SendClientMessage(playerid, COLOR_WHITE, string);
            pLaserPoints{killerid} += 1;
            format(string, sizeof string, "~g~Winning: ~w~%s ( ~b~%dpts ~w~)", GetName(killerid), pLaserPoints{killerid});
            TextDrawSetString(Winning, string);
            PlayerInfo[killerid][pKills]++;
        }
        print("4");
        format(string, sizeof string, "[LASER] You died unexpectedly!");
        SendClientMessage(playerid, COLOR_WHITE, string);
        lastVehID{playerid} = GetPlayerVehicleID(playerid);
        pLaserPoints{playerid} -= 1;
        format(string, sizeof string, "~r~Losing: ~w~%s ( ~b~%dpts ~w~)", GetName(playerid), pLaserPoints{playerid});
        TextDrawSetString(Losing, string);
    }
    print("5");
    PlayerInfo[playerid][pDeaths]++;
    return 1;
}
I've tried everything to fix it, but nothing is working, so I've resorted here.
Reply


Messages In This Thread
OnPlayerDeath isn't getting called correctly - by Luis- - 26.11.2014, 13:59
Re: OnPlayerDeath isn't getting called correctly - by Simeon87 - 26.11.2014, 14:05
Re: OnPlayerDeath isn't getting called correctly - by Luis- - 26.11.2014, 14:09
Re: OnPlayerDeath isn't getting called correctly - by Kyance - 26.11.2014, 14:15

Forum Jump:


Users browsing this thread: 1 Guest(s)