OnPlayerDeath
#1

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    new gunname[32];
    GetWeaponName(reason, gunname, 32);
           
    if(killerid == INVALID_PLAYER_ID)
    {
        new string[128];
        SendDeathMessage(INVALID_PLAYER_ID, playerid, reason);
        PlayerData[playerid][Deaths] ++;
       
        format(string, sizeof(string), "%s(%d) Has died: %s", PlayerName(playerid), playerid, gunname);
        ServerLog(string);
    }
    else
    {
        new string[128];
        SendDeathMessage(killerid, playerid, reason);
        PlayerData[playerid][Deaths] ++;
        PlayerData[killerid][Kills] ++;
       
        format(string, sizeof(string), "%s(%d) Has killed %s(%d) with a %s", PlayerName(killerid), killerid, PlayerName(playerid), playerid, gunname);
        ServerLog(string);
       
        if(gTeam[killerid] > 6 && gTeam[playerid] > 0)
        {
            new wantedlevel = GetPlayerWantedLevel(killerid);
            SetPlayerWantedLevel(killerid, wantedlevel +10);

            SendClientMessage(killerid, COLOR_RED, "Crime Committed");
            format(string, sizeof(string), "(MURDER) Wanted Level %d", wantedlevel);
            SendClientMessage(killerid, GetPlayerColor(killerid), string);
            return 1;
        }
        else
        {
            if(IsPlayerCop(killerid) || IsPlayerArmy(killerid) || IsPlayerSwat(killerid) && IsPlayerCop(playerid) || IsPlayerArmy(playerid) || IsPlayerSwat(playerid))
            {
                SendClientMessage(killerid, COLOR_ERROR, "(TEAM KILLER) Do NOT team kill, futher teamkilling will end to a kick/ban");

                PlayerData[killerid][TeamKills] ++;
            }
            else
            {
                if(PlayerData[killerid][TeamKills] > 2)
                {
                    format(string, sizeof(string), "%s(%d) Has been Auto-Kicked for teamkilling", PlayerName(killerid), killerid);
                    SendClientMessageToAll(COLOR_ADMIN, string);
                    PlayerData[killerid][TeamKills] = 0;
                    Kick(killerid);
                    return 1;
                }
            }
        }
    }
   
    //Other things 'v'
    return 1;
}
Bug:
When i kill someone it says: "(MURDER) Wanted level 0"
but i get Stars and ill get wanted =/

And i want it to say when i kill someone "(MURDER) Wanted level 10"

If you want to join the server and see the bug with your own eyes then look in my sing for server IP
Reply
#2

pawn Код:
if(gTeam[killerid] > 6 && gTeam[playerid] > 0)
        {
            new wantedlevel = GetPlayerWantedLevel(killerid)+10;
            SetPlayerWantedLevel(killerid, wantedlevel);

            SendClientMessage(killerid, COLOR_RED, "Crime Committed");
            format(string, sizeof(string), "(MURDER) Wanted Level %d", wantedlevel);
            SendClientMessage(killerid, GetPlayerColor(killerid), string);
            return 1;
        }
I guess that's the part.

Greetz,
Jeffry
Reply
#3

Could you come with me ingame and test it? xD i have noone who can help me
Reply
#4

Quote:
Originally Posted by Unknown123
Посмотреть сообщение
Could you come with me ingame and test it? xD i have noone who can help me
No time anymore now. I am off now. Sorry.
Reply
#5

PM me with the server IP and I'll test it for you.
I can't do anything now since >> my f*cking bug << xD
Reply
#6

Quote:
Originally Posted by Kwarde
Посмотреть сообщение
PM me with the server IP and I'll test it for you.
I can't do anything now since >> my f*cking bug << xD
I have also probles with saving too.. but the FS crashes -.- (See my signature)

Aloso look in my signature for IP :P i couldent send u the IP over PM you have blocked it
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)