SA-MP Forums Archive
Admin kill - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Admin kill (/showthread.php?tid=497333)



Admin kill - Ananisiki - 26.02.2014

~~~~~~


Re: Admin kill - Nurgle4 - 26.02.2014

pawn Код:
SendDeathMessage(killerid, playerid, reason);
this is the code for making deathmessage,can you show me all of the onplayerdeath?
The mistake is there
Show me the OnPlayerDeath thing


Re: Admin kill - Ananisiki - 26.02.2014

~~~~~~


Re: Admin kill - Nurgle4 - 26.02.2014

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    new kName[128];
    new string[503];
    new pID;
    isDead[playerid] = 1;
    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 (%d) Has Killed %s (%d) With A %s. ", KillerName, killerid, Name, playerid, WeapName);
        SendClientMessageToAll(COLOR_DARKRED, string);
    }
    if(KillingSpree[killerid] == 10)
    {
       format(string, sizeof(string), "%s (%d) Is Klapping Niggaz, 10 Killing Spree.", PlayerName(killerid), killerid);
       TextDrawSetString(RandomText2, string);
       TextDrawShowForAll(RandomText2);
       SendClientMessageToAll(COLOR_LIGHTBLUE, string);
       GivePlayerMoney(killerid, 10500);
    }
    if(KillingSpree[killerid] == 15)
    {
       format(string, sizeof(string), "%s (%d) Is Unstopable, 15 Killing Spree!", PlayerName(killerid), killerid);
       TextDrawSetString(RandomText2, string);
       TextDrawShowForAll(RandomText2);
       SendClientMessageToAll(COLOR_LIGHTBLUE, string);
       GivePlayerMoney(killerid, 12500);
    }
    if(KillingSpree[killerid] == 20)
    {
       format(string, sizeof(string), "%s (%d) Is Dominating, 20 Killing Spree!", PlayerName(killerid), killerid);
       TextDrawSetString(RandomText2, string);
       TextDrawShowForAll(RandomText2);
       SendClientMessageToAll(COLOR_LIGHTBLUE, string);
       GivePlayerMoney(killerid, 15500);
    }
    if(KillingSpree[killerid] == 25)
    {
       format(string, sizeof(string), "%s (%d) Is Legendary 25 Killing Spree!", PlayerName(killerid), killerid);
       TextDrawSetString(RandomText2, string);
       TextDrawShowForAll(RandomText2);
       SendClientMessageToAll(COLOR_LIGHTBLUE, string);
       GivePlayerMoney(killerid, 20500);
    }
    if(IsInChallenge[playerid] == 1)
    {
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            if(GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(i) && GetPlayerVirtualWorld(playerid) > 0 && i != playerid && IsSpecing[i] == 0)
            {
    format(string, sizeof string, "%s (%d) Won Against %s (%d) In A Fighting Challenge!", PlayerName(i), playerid,  PlayerName(playerid), pID);

//  GameTextForPlayer(playerid, "~r~flopped", 3000, 5);
//  GameTextForPlayer(killerid, "~w~klapped", 3000, 6);
    IsInChallenge[playerid] = 0;
    IsInChallenge[i] = 0;
    OfferingChallenger[playerid] = -1;
    GivePlayerMoney(killerid, 1000);
    if(GetPVarInt(playerid, "akilled") == 0)
    SetPVarInt(playerid, "akilled", 0);
    SetPVarInt(playerid,"PillsTaken",0);
    GetPlayerName(killerid, kName, sizeof(kName));
    PlayerKills[killerid] = PlayerKills[killerid] +1;
    PlayerKills[playerid] = 0;
    SetPVarInt(playerid, "Dead", 1);
    SetPlayerWantedLevel(killerid, GetPlayerWantedLevel(killerid) + 1);
    SetPlayerWantedLevel(playerid, 0);
    TextDrawHideForPlayer(playerid, RandomText0);
    TextDrawHideForPlayer(playerid, RandomText1);
    TextDrawHideForPlayer(playerid, RandomText2);
}
  }
    }
    if(InDMS[playerid] == 1)
    {
        new Random = random(sizeof(RandomDMSpawns));
        SendDeathMessage(killerid, playerid, reason);
        SetPlayerPos(playerid, RandomDMSpawns[Random][0], RandomDMSpawns[Random][1], RandomDMSpawns[Random][2]);
        SetPlayerFacingAngle(playerid, RandomDMSpawns[Random][3]);
        SetTimer("DMSTimer", 3000, false);
    }
    return 1;
}
you have to show us the aduty command .i am sure the problem is in the command


Re: Admin kill - Blademaster680 - 26.02.2014

Send the code that puts them on admin please then I can help you


Re: Admin kill - Ananisiki - 26.02.2014

~~~~~~


Re: Admin kill - Konstantinos - 26.02.2014

pawn Код:
if (killerid != INVALID_PLAYER_ID && !IsPlayerAdmin(killerid)) SendDeathMessage(killerid, playerid, reason);
Change Rcon to yours but keep in mind that you should check if the killer is not admin.


Re: Admin kill - Ananisiki - 26.02.2014

~~~~~~


Re: Admin kill - Ananisiki - 26.02.2014

~~~~~~