SA-MP Forums Archive
[Killing SPree]Error not Working went 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: [Killing SPree]Error not Working went kill (/showthread.php?tid=475263)



[Killing SPree]Error not Working went kill - donhu789 - 12.11.2013

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
//------------------------------------TeamKill----------------------------------
    new Spree[MAX_PLAYERS];
    Spree[killerid]++;
    Spree[playerid] = 0;
    new AdminGas[9000];
    GetPlayerName(killerid, AdminGas, sizeof(AdminGas));
    new string[9000];
    if(Spree[killerid] == 5)//Checking for 10 kills
    {
        format(string, sizeof(string), "* %s is on a Killing Spree! (Kills: %d) (Reward : $5000)", AdminGas[killerid], Spree[killerid]);
        SendClientMessageToAll(green, string);
        GivePlayerMoney(killerid,5000);
        GivePlayerScore(killerid, 1);
    }
    else if(Spree[killerid] == 10)//For 20 kills
    {
        format(string, sizeof(string), "* %s is on a Killing Spree! (Kills: %d) (Reward : $10000)", AdminGas[killerid], Spree[killerid]);
        SendClientMessageToAll(green, string);
        GivePlayerMoney(killerid,10000);
        GivePlayerScore(killerid, 1);
    }
    else if(Spree[killerid] == 15)//30 kills
    {
        format(string, sizeof(string), "* %s is on a Killing Spree! (Kills: %d) (Reward : $15000)", AdminGas[killerid], Spree[killerid]);
        SendClientMessageToAll(green, string);
        GivePlayerMoney(killerid,15000);
        GivePlayerScore(killerid, 1);
    }
    else if(Spree[killerid] == 20)//40 kills
    {
        format(string, sizeof(string), "* %s is on a Killing Spree! (Kills: %d) (Reward : $20000)", AdminGas[killerid], Spree[killerid]);
        SendClientMessageToAll(green, string);
        GivePlayerScore(killerid, 1);
        GivePlayerMoney(killerid,20000);
    }
    else if(Spree[killerid] == 25)//40 kills
    {
        format(string, sizeof(string), "* %s is on a Killing Spree! (Kills: %d) (Reward : $25000)", AdminGas[killerid], Spree[killerid]);
        SendClientMessageToAll(green, string);
        GivePlayerScore(killerid, 1);
        GivePlayerMoney(killerid,25000);
    }
    else if(Spree[killerid] == 30)//50 kills
    {
        format(string, sizeof(string), "* %s is on a Killing Spree! (Kills: %d) (Reward : $30000)", AdminGas[killerid], Spree[killerid]);
        SendClientMessageToAll(green, string);
        GivePlayerScore(killerid, 1);
        GivePlayerMoney(killerid,30000);
    }
    else if(Spree[killerid] == 35)//60 kills
    {
        format(string, sizeof(string), "* %s is on a Killing Spree! (Kills: %d) (Reward : $35000)", AdminGas[killerid], Spree[killerid]);
        SendClientMessageToAll(green, string);
        GivePlayerScore(killerid, 1);
        GivePlayerMoney(killerid,35000);
    }
    else if(Spree[killerid] == 40)//60 kills
    {
        format(string, sizeof(string), "* %s is on a Killing Spree! (Kills: %d) (Reward : $40000)", AdminGas[killerid], Spree[killerid]);
        SendClientMessageToAll(green, string);
        GivePlayerScore(killerid, 1);
        GivePlayerMoney(killerid,40000);
    }
    else if(Spree[killerid] == 45)//60 kills
    {
        format(string, sizeof(string), "* %s is on a Killing Spree! (Kills: %d) (Reward : $45000)", AdminGas[killerid], Spree[killerid]);
        SendClientMessageToAll(green, string);
        GivePlayerScore(killerid, 1);
        GivePlayerMoney(killerid,45000);
    }
    else if(Spree[killerid] == 50)//60 kills
    {
        format(string, sizeof(string), "* %s is on a Killing Spree! (Kills: %d) (Reward : $50000)", AdminGas[killerid], Spree[killerid]);
        SendClientMessageToAll(green, string);
        GivePlayerScore(killerid, 1);
        GivePlayerMoney(killerid,50000);
    }
    else if(Spree[killerid] == 55)//60 kills
    {
        format(string, sizeof(string), "* %s is on a Killing Spree! (Kills: %d) (Reward : $55000)", AdminGas[killerid], Spree[killerid]);
        SendClientMessageToAll(green, string);
        GivePlayerScore(killerid, 2);
        GivePlayerMoney(killerid,55000);
    }
    else if(Spree[killerid] == 60)//60 kills
    {
        format(string, sizeof(string), "* %s is on a Killing Spree! (Kills: %d) (Reward : $60000)", AdminGas[killerid], Spree[killerid]);
        SendClientMessageToAll(green, string);
        GivePlayerScore(killerid, 2);
        GivePlayerMoney(killerid,60000);
    }
    else if(Spree[killerid] == 65)//60 kills
    {
        format(string, sizeof(string), "* %s is on a Killing Spree! (Kills: %d) (Reward : $65000)", AdminGas[killerid], Spree[killerid]);
        SendClientMessageToAll(green, string);
        GivePlayerScore(killerid, 2);
        GivePlayerMoney(killerid,65000);
    }
    else if(Spree[killerid] == 70)//60 kills
    {
        format(string, sizeof(string), "* %s is on a Killing Spree! (Kills: %d) (Reward : $70000)", AdminGas[killerid], Spree[killerid]);
        SendClientMessageToAll(green, string);
        GivePlayerScore(killerid, 2);
        GivePlayerMoney(killerid,70000);
    }
    else if(Spree[killerid] == 75)//60 kills
    {
        format(string, sizeof(string), "* %s is on a Killing Spree! (Kills: %d) (Reward : $75000)", AdminGas[killerid], Spree[killerid]);
        SendClientMessageToAll(green, string);
        GivePlayerScore(killerid, 2);
        GivePlayerMoney(killerid,75000);
    }
    else if(Spree[killerid] == 80)//60 kills
    {
        format(string, sizeof(string), "* %s is on a Killing Spree! (Kills: %d) (Reward : $80000)", AdminGas[killerid], Spree[killerid]);
        SendClientMessageToAll(green, string);
        GivePlayerScore(killerid, 2);
        GivePlayerMoney(killerid,80000);
    }
    else if(Spree[killerid] == 85)//60 kills
    {
        format(string, sizeof(string), "* %s is on a Killing Spree! (Kills: %d) (Reward : $85000)", AdminGas[killerid], Spree[killerid]);
        SendClientMessageToAll(green, string);
        GivePlayerScore(killerid, 2);
        GivePlayerMoney(killerid,85000);
    }
    else if(Spree[killerid] == 90)//60 kills
    {
        format(string, sizeof(string), "* %s is on a Killing Spree! (Kills: %d) (Reward : $90000)", AdminGas[killerid], Spree[killerid]);
        SendClientMessageToAll(green, string);
        GivePlayerScore(killerid, 2);
        GivePlayerMoney(killerid,90000);
    }
    else if(Spree[killerid] == 95)//60 kills
    {
        format(string, sizeof(string), "* %s is on a Killing Spree! (Kills: %d) (Reward : $95000)", AdminGas[killerid], Spree[killerid]);
        SendClientMessageToAll(green, string);
        GivePlayerScore(killerid, 2);
        GivePlayerMoney(killerid,95000);
    }
    else if(Spree[killerid] == 100)//60 kills
    {
        format(string, sizeof(string), "* %s is on a Killing Spree! (Kills: %d) (Reward : $100000)", AdminGas[killerid], Spree[killerid]);
        SendClientMessageToAll(green, string);
        GivePlayerScore(killerid, 2);
        GivePlayerMoney(killerid,100000);
    }
//--------------------------------Gang Zone-------------------------------------
    new Gang:killergang = Player_GetGang( killerid ),
    Gang:playergang = Player_GetGang( playerid ),
    Zone:killerzone = Player_GetZone( killerid ),
    Zone:playerzone = Player_GetZone( playerid );
    if( playergang != killergang ){
        if( killerzone == playerzone ){
            if( Zone_GetOwner( playerzone ) == playergang ){
                GangScores[ killergang ][ killerzone ]++;
                if( GangScores[ killergang ][ killerzone ] >= GANGWAR_WIN_SCORE ){
                    if( Zone_GetAttacker( killerzone ) == killergang )
                        CallLocalFunction( "OnGangCaptureZone", "iii", _:killergang, _:killerzone, _:playergang );
                    else
                        CallLocalFunction( "OnGangAttackZone", "iii", _:killergang, _:killerzone, _:playergang );
                }
            }
            else if( Zone_GetOwner( killerzone ) == killergang ){
                if( Zone_GetAttacker( playerzone ) == playergang && GangScores[ killergang ][ killerzone ]+1 >= GANGWAR_WIN_SCORE ){
                    GangScores[ killergang ][ killerzone ]++;
                    CallLocalFunction( "OnGangDefendZone", "iii", _:killergang, _:killerzone, _:playergang );
                }
                else if( Zone_GetAttacker( playerzone ) != playergang && GangScores[ killergang ][ killerzone ]-1 >= 0 )
                    GangScores[ playergang ][ killerzone ]--;
            }
        }
    }
//---------------------------------HDADMIN---------------------------------------
    #if defined USE_STATS
    PlayerInfo[playerid][Deaths]++;
    #endif
    InDuel[playerid] = 0;

    if(IsPlayerConnected(killerid) && killerid != INVALID_PLAYER_ID)
    {
        #if defined USE_STATS
        PlayerInfo[killerid][Kills]++;
        #endif

        if(InDuel[playerid] == 1 && InDuel[killerid] == 1)
        {
            GameTextForPlayer(playerid,"Loser !",3000,3);
            GameTextForPlayer(killerid,"Winner !",3000,3);
            InDuel[killerid] = 0;
            SetPlayerPos(killerid, 0.0, 0.0, 0.0);
            SpawnPlayer(killerid);
        }
        else if(InDuel[playerid] == 1 && InDuel[killerid] == 0)
        {
            GameTextForPlayer(playerid,"Loser !",3000,3);
        }
    }
    #if defined ENABLE_SPEC
    for(new x=0; x<MAX_PLAYERS; x++)
        if(GetPlayerState(x) == PLAYER_STATE_SPECTATING && PlayerInfo[x][SpecID] == playerid)
           AdvanceSpectate(x);
    #endif
//-------------------------------------Normal-----------------------------------
    DropWeapons(playerid);
    IsSpawned[playerid] = 0;
    cuffed[playerid] = 0;
    Tazed[playerid] = 0;
    hastazer[playerid] = 0;
    LawEnforcementRadio[playerid] = 0;
    HasLawEnforcementRadio[playerid] = 0;
    ReqBk[playerid] = 0;
    ReqBkRecent[playerid] = 0;
    ReportedRecent[playerid] = 0;
    VisitReq[playerid] = 0;
    EscapedConvict[playerid] = 0;
    VisitReqExpires[playerid] = 0;
    StoleCopCarRecent[playerid] = 0;
    triedtoescaperecent[playerid] = 0;
    JailTime[playerid] = 0;
    JailTimeServed[playerid] = 0;
    copshavevc[playerid] = 0;
    commitedcrimerecently[playerid] = 0;
    wantsheal[playerid] = 0;
    wantscure[playerid] = 0;
    InfectedPlyRecent[playerid] = 0;
    wantsweed[playerid] = 0;
    playeronweed[playerid] = 0;
    playertookweed[playerid] = 0;
    HasWeedBag[playerid] = 0;
    CuffedTime[playerid] = 0;
    cannotescapejail[playerid] = 0;
    RobbedPlyRecent[playerid] = 0;
    beenrobbedrecently[playerid] = 0;
    HasWallet[playerid] = 0;
    OldCash[playerid] = 0;
    Chlamydia[playerid] = 0;
    instunt[playerid] = 0;
    return 1;
}

Guys please help Went i compile The Gamemode Is Compile COmptele No Error | Now WEnt i login server and kill player 5,10,15,20 is doesnt show anything can you please help

pawn Код:
new Spree[MAX_PLAYERS];
    Spree[killerid]++;
    Spree[playerid] = 0;
    new AdminGas[9000];
    GetPlayerName(killerid, AdminGas, sizeof(AdminGas));
    new string[9000];
    if(Spree[killerid] == 5)//Checking for 10 kills
    {
        format(string, sizeof(string), "* %s is on a Killing Spree! (Kills: %d) (Reward : $5000)", AdminGas[killerid], Spree[killerid]);
        SendClientMessageToAll(green, string);
        GivePlayerMoney(killerid,5000);
        GivePlayerScore(killerid, 1);
    }
    else if(Spree[killerid] == 10)//For 20 kills
    {
        format(string, sizeof(string), "* %s is on a Killing Spree! (Kills: %d) (Reward : $10000)", AdminGas[killerid], Spree[killerid]);
        SendClientMessageToAll(green, string);
        GivePlayerMoney(killerid,10000);
        GivePlayerScore(killerid, 1);
    }
    else if(Spree[killerid] == 15)//30 kills
    {
        format(string, sizeof(string), "* %s is on a Killing Spree! (Kills: %d) (Reward : $15000)", AdminGas[killerid], Spree[killerid]);
        SendClientMessageToAll(green, string);
        GivePlayerMoney(killerid,15000);
        GivePlayerScore(killerid, 1);
    }
    else if(Spree[killerid] == 20)//40 kills
    {
        format(string, sizeof(string), "* %s is on a Killing Spree! (Kills: %d) (Reward : $20000)", AdminGas[killerid], Spree[killerid]);
        SendClientMessageToAll(green, string);
        GivePlayerScore(killerid, 1);
        GivePlayerMoney(killerid,20000);
    }
    else if(Spree[killerid] == 25)//40 kills
    {
        format(string, sizeof(string), "* %s is on a Killing Spree! (Kills: %d) (Reward : $25000)", AdminGas[killerid], Spree[killerid]);
        SendClientMessageToAll(green, string);
        GivePlayerScore(killerid, 1);
        GivePlayerMoney(killerid,25000);
    }
    else if(Spree[killerid] == 30)//50 kills
    {
        format(string, sizeof(string), "* %s is on a Killing Spree! (Kills: %d) (Reward : $30000)", AdminGas[killerid], Spree[killerid]);
        SendClientMessageToAll(green, string);
        GivePlayerScore(killerid, 1);
        GivePlayerMoney(killerid,30000);
    }
    else if(Spree[killerid] == 35)//60 kills
    {
        format(string, sizeof(string), "* %s is on a Killing Spree! (Kills: %d) (Reward : $35000)", AdminGas[killerid], Spree[killerid]);
        SendClientMessageToAll(green, string);
        GivePlayerScore(killerid, 1);
        GivePlayerMoney(killerid,35000);
    }
    else if(Spree[killerid] == 40)//60 kills
    {
        format(string, sizeof(string), "* %s is on a Killing Spree! (Kills: %d) (Reward : $40000)", AdminGas[killerid], Spree[killerid]);
        SendClientMessageToAll(green, string);
        GivePlayerScore(killerid, 1);
        GivePlayerMoney(killerid,40000);
    }
    else if(Spree[killerid] == 45)//60 kills
    {
        format(string, sizeof(string), "* %s is on a Killing Spree! (Kills: %d) (Reward : $45000)", AdminGas[killerid], Spree[killerid]);
        SendClientMessageToAll(green, string);
        GivePlayerScore(killerid, 1);
        GivePlayerMoney(killerid,45000);
    }
    else if(Spree[killerid] == 50)//60 kills
    {
        format(string, sizeof(string), "* %s is on a Killing Spree! (Kills: %d) (Reward : $50000)", AdminGas[killerid], Spree[killerid]);
        SendClientMessageToAll(green, string);
        GivePlayerScore(killerid, 1);
        GivePlayerMoney(killerid,50000);
    }
    else if(Spree[killerid] == 55)//60 kills
    {
        format(string, sizeof(string), "* %s is on a Killing Spree! (Kills: %d) (Reward : $55000)", AdminGas[killerid], Spree[killerid]);
        SendClientMessageToAll(green, string);
        GivePlayerScore(killerid, 2);
        GivePlayerMoney(killerid,55000);
    }
    else if(Spree[killerid] == 60)//60 kills
    {
        format(string, sizeof(string), "* %s is on a Killing Spree! (Kills: %d) (Reward : $60000)", AdminGas[killerid], Spree[killerid]);
        SendClientMessageToAll(green, string);
        GivePlayerScore(killerid, 2);
        GivePlayerMoney(killerid,60000);
    }
    else if(Spree[killerid] == 65)//60 kills
    {
        format(string, sizeof(string), "* %s is on a Killing Spree! (Kills: %d) (Reward : $65000)", AdminGas[killerid], Spree[killerid]);
        SendClientMessageToAll(green, string);
        GivePlayerScore(killerid, 2);
        GivePlayerMoney(killerid,65000);
    }
    else if(Spree[killerid] == 70)//60 kills
    {
        format(string, sizeof(string), "* %s is on a Killing Spree! (Kills: %d) (Reward : $70000)", AdminGas[killerid], Spree[killerid]);
        SendClientMessageToAll(green, string);
        GivePlayerScore(killerid, 2);
        GivePlayerMoney(killerid,70000);
    }
    else if(Spree[killerid] == 75)//60 kills
    {
        format(string, sizeof(string), "* %s is on a Killing Spree! (Kills: %d) (Reward : $75000)", AdminGas[killerid], Spree[killerid]);
        SendClientMessageToAll(green, string);
        GivePlayerScore(killerid, 2);
        GivePlayerMoney(killerid,75000);
    }
    else if(Spree[killerid] == 80)//60 kills
    {
        format(string, sizeof(string), "* %s is on a Killing Spree! (Kills: %d) (Reward : $80000)", AdminGas[killerid], Spree[killerid]);
        SendClientMessageToAll(green, string);
        GivePlayerScore(killerid, 2);
        GivePlayerMoney(killerid,80000);
    }
    else if(Spree[killerid] == 85)//60 kills
    {
        format(string, sizeof(string), "* %s is on a Killing Spree! (Kills: %d) (Reward : $85000)", AdminGas[killerid], Spree[killerid]);
        SendClientMessageToAll(green, string);
        GivePlayerScore(killerid, 2);
        GivePlayerMoney(killerid,85000);
    }
    else if(Spree[killerid] == 90)//60 kills
    {
        format(string, sizeof(string), "* %s is on a Killing Spree! (Kills: %d) (Reward : $90000)", AdminGas[killerid], Spree[killerid]);
        SendClientMessageToAll(green, string);
        GivePlayerScore(killerid, 2);
        GivePlayerMoney(killerid,90000);
    }
    else if(Spree[killerid] == 95)//60 kills
    {
        format(string, sizeof(string), "* %s is on a Killing Spree! (Kills: %d) (Reward : $95000)", AdminGas[killerid], Spree[killerid]);
        SendClientMessageToAll(green, string);
        GivePlayerScore(killerid, 2);
        GivePlayerMoney(killerid,95000);
    }
    else if(Spree[killerid] == 100)//60 kills
    {
        format(string, sizeof(string), "* %s is on a Killing Spree! (Kills: %d) (Reward : $100000)", AdminGas[killerid], Spree[killerid]);
        SendClientMessageToAll(green, string);
        GivePlayerScore(killerid, 2);
        GivePlayerMoney(killerid,100000);
    }

Here is Spree | Can You heelp my please


Re: [Killing SPree]Error not Working went kill - donhu789 - 12.11.2013

Could Anyone help rep REP REP REP I realy needed


Re: [Killing SPree]Error not Working went kill - Pottus - 12.11.2013

pawn Код:
new AdminGas[9000];
    GetPlayerName(killerid, AdminGas, sizeof(AdminGas));
    new string[9000];
lol


Re: [Killing SPree]Error not Working went kill - donhu789 - 12.11.2013

lol what ?


Re: [Killing SPree]Error not Working went kill - donhu789 - 12.11.2013

[uL]Pottus Can you just help my ?


Re: [Killing SPree]Error not Working went kill - SuperViper - 12.11.2013

pawn Код:
new Spree[MAX_PLAYERS];
needs to be outside OnPlayerDeath.


__________________________________________________ ____



off-topic:

Quote:
Originally Posted by [uL]Pottus
Посмотреть сообщение
pawn Код:
new AdminGas[9000];
    GetPlayerName(killerid, AdminGas, sizeof(AdminGas));
    new string[9000];
lol