Admin duty problem
#7

This..
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    SetPVarInt(playerid, "Dead", 1);
    if(GetPVarInt(killerid, "Aduty") == 1 && GetPVarInt(playerid, "SetHealthDead") == 0 && GetPVarInt(playerid, "akilled") == 0)
    {
        GameTextForPlayer(playerid, "~g~unfair death~n~~p~continuing current life", 3000, 3);
        SetPlayerColor(playerid, COLOR_GREY);
        return 1;
    }
To look like in you gamemode like this:
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    new kName[128];
    new string[503];
    SetPlayerScore(playerid, GetPlayerScore(playerid) -1);
    SetPlayerScore(killerid, GetPlayerScore(killerid) +1);
    KillingSpree[killerid] ++;
    KillingSpree[playerid] = 0;
    if(IsPlayerConnected(killerid) && killerid != INVALID_PLAYER_ID)
    {
    new WeapName[32],Name[MAX_PLAYER_NAME],KillerName[MAX_PLAYER_NAME];
    GetWeaponName(reason, WeapName, sizeof(WeapName));
    GetPlayerName(playerid, Name, MAX_PLAYER_NAME);
    GetPlayerName(killerid, KillerName, MAX_PLAYER_NAME);
    format(string,sizeof(string),"%s Has Killed %s With A %s. ",KillerName, Name,WeapName);
    SendClientMessageToAll(-1, string);
    }
    if(KillingSpree[killerid] == 3)
    {
       format(string, sizeof(string), "%s (%d) Is On A 3 Killing Spree!", PlayerName(killerid), killerid);
       SendClientMessageToAll (COLOR_YELLOW, string);
       GivePlayerMoney(killerid, 3500);
    }
    if(KillingSpree[killerid] == 5)
    {
       format(string, sizeof(string), "%s (%d) Is On A 5 Killing Spree!", PlayerName(killerid), killerid);
       SendClientMessageToAll (COLOR_YELLOW, string);
       GivePlayerMoney(killerid, 5500);
    }
    if(KillingSpree[killerid] == 10)
    {
       format(string, sizeof(string), "%s (%d) Is Klapping Niggaz, 10 Killing Spree!", PlayerName(killerid), killerid);
       SendClientMessageToAll (COLOR_YELLOW, string);
       GivePlayerMoney(killerid, 10500);
    }
    if(KillingSpree[killerid] == 15)
    {
       format(string, sizeof(string), "%s (%d) Is Unstopable, 15 Killing Spree!", PlayerName(killerid), killerid);
       SendClientMessageToAll (COLOR_YELLOW, string);
       GivePlayerMoney(killerid, 12500);
    }
    if(KillingSpree[killerid] == 20)
    {
       format(string, sizeof(string), "%s (%d) Is Dominating, 20 Killing Spree!", PlayerName(killerid), killerid);
       SendClientMessageToAll (COLOR_YELLOW, string);
       GivePlayerMoney(killerid, 15500);
    }
    if(KillingSpree[killerid] == 25)
    {
       format(string, sizeof(string), "%s (%d) Is Legendary 25 Killing Spree!", PlayerName(killerid), killerid);
       SendClientMessageToAll (COLOR_YELLOW, string);
       GivePlayerMoney(killerid, 20500);
    }
    GivePlayerMoney(killerid, 1000);
    isDead[playerid] = 1;
    if(GetPVarInt(playerid, "akilled") == 0)
    SetPVarInt(playerid, "akilled", 0);
    SetPVarInt(playerid,"PillsTaken",0);
  //  GameTextForPlayer(playerid, "~r~klapped", 3000, 6);
    GetPlayerName(killerid, kName, sizeof(kName));
    PlayerKills[killerid] = PlayerKills[killerid] +1;
    PlayerKills[playerid] = 0;
    SetPVarInt(playerid, "Dead", 1);
    if(GetPVarInt(killerid, "Aduty") == 1 && GetPVarInt(playerid, "SetHealthDead") == 0 && GetPVarInt(playerid, "akilled") == 0)
    {
        GameTextForPlayer(playerid, "~g~unfair death~n~~p~continuing current life", 3000, 3);
        SetPlayerColor(playerid, COLOR_GREY);
        return 1;
    }
    return 1;
}
Reply


Messages In This Thread
Admin duty problem - by Ananisiki - 13.03.2013, 23:56
Re: Admin duty problem - by Scrillex - 14.03.2013, 00:57
Re : Re: Admin duty problem - by thegreathom - 14.03.2013, 01:16
Re: Admin duty problem - by Ananisiki - 14.03.2013, 01:27
Re: Admin duty problem - by Scrillex - 14.03.2013, 01:36
Re: Admin duty problem - by Ananisiki - 14.03.2013, 01:53
Re: Admin duty problem - by Scrillex - 14.03.2013, 02:03
Re: Admin duty problem - by Ananisiki - 14.03.2013, 02:28

Forum Jump:


Users browsing this thread: 1 Guest(s)