OnPlayerDeath
#8

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    //Area 1
    if(MArea[playerid] == 1)
    {
    //Case BLUE & Area 1
    if(GetPlayerColor(playerid) == blue)
    {
    SetPlayerScore(killerid, GetPlayerScore(killerid) + 0);
    return 1;
    }
    //Case RED & Area 1
    else if(GetPlayerColor(playerid) == red)
    {
    SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
    return 1;
    }
   
    }
   
    //Area 2
    if(MArea[playerid] == 2)
    {
    //Case BLUE & Area 2
    if(GetPlayerColor(playerid) == red)
    {
    SetPlayerScore(killerid, GetPlayerScore(killerid) + 0);
    return 1;
    }
    //Case RED & Area 2
    else if(GetPlayerColor(playerid) == blue)
    {
    SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
    return 1;
    }
   
    }
   
   
    if(MArea[playerid] == 0)
    {
    if(killerid != INVALID_PLAYER_ID) SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
    }
    GameTextForPlayer(killerid, "Killer", 4000, 4);
    GameTextForPlayer(playerid, "~b~OMG you ~r~died! ~g~haha!", 500, 1);
    SendDeathMessage(killerid, playerid, reason);
    return 1;
}

I compiled it, and there are no errors. Now it's up to you to test it in your server. Tell me if it works.
Reply


Messages In This Thread
OnPlayerDeath - by Sir_bomber - 06.07.2010, 17:55
Re: OnPlayerDeath - by matdav - 06.07.2010, 18:05
Re: OnPlayerDeath - by Jeffry - 06.07.2010, 18:06
Re: OnPlayerDeath - by Sir_bomber - 06.07.2010, 18:06
Re: OnPlayerDeath - by Sir_bomber - 06.07.2010, 18:08
Re: OnPlayerDeath - by Jeffry - 06.07.2010, 18:08
Re: OnPlayerDeath - by Sir_bomber - 06.07.2010, 18:50
Re: OnPlayerDeath - by Jeffry - 07.07.2010, 14:15

Forum Jump:


Users browsing this thread: 2 Guest(s)