Onplayerdeath ??????
#5

Quote:
Originally Posted by CBCandyBoy
Посмотреть сообщение
man i provided the code above but that dont worked read the code in my previous statement
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    gPlayerInfo[playerid][Deaths]++;

    if(IsPlayerConnected(killerid))
    {
        gPlayerInfo[killerid][Kills]++;
    }
    if(gPlayerInfo[killerid][Level] >= 1)
    {
       new score;
       score = GetPlayerScore(killerid);
       SetPlayerScore(killerid, score+5);
    }
    return 1;
}
So, this line checks is player have some admin level?
pawn Код:
if(gPlayerInfo[killerid][Level] >= 1)
If you would describe it in the first post, then it would be a lot easier.

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    if(killerid != INVALID_PLAYER_ID)
    {
        gPlayerInfo[playerid][Deaths]++;
        gPlayerInfo[killerid][Kills]++;
       
        if(gPlayerInfo[killerid][Level] >= 1)
        {
           SetPlayerScore(killerid, GetPlayerScore(killerid)+5); // For admin score value.
        }
    }
    return 1;
}
Reply


Messages In This Thread
Onplayerdeath ?????? - by CBCandyBoy - 30.03.2013, 12:06
Re: Onplayerdeath ?????? - by Riddick94 - 30.03.2013, 12:11
Re: Onplayerdeath ?????? - by CBCandyBoy - 30.03.2013, 12:13
Re: Onplayerdeath ?????? - by fiki574 - 30.03.2013, 12:17
Re: Onplayerdeath ?????? - by Riddick94 - 30.03.2013, 12:21
Re: Onplayerdeath ?????? - by CBCandyBoy - 30.03.2013, 12:22
Re: Onplayerdeath ?????? - by Riddick94 - 30.03.2013, 12:26
Re: Onplayerdeath ?????? - by CBCandyBoy - 30.03.2013, 12:29
Re: Onplayerdeath ?????? - by Riddick94 - 30.03.2013, 12:37
Re: Onplayerdeath ?????? - by CBCandyBoy - 30.03.2013, 12:43

Forum Jump:


Users browsing this thread: 1 Guest(s)