Function Not Working +REP
#1

I Made The Killer Of The Day System,And After It's Timer Ends,It Suppose To Send Some Messages And Give Money And Score To The Killer Of The Day,But There is nothing working. At These Codes:
pawn Код:
stock GetHighestKiller()
{
    new m;
    for(new i = 0 ; i <= MAX_PLAYERS ; i++)
    {
        if(KillerScore[i] > KillerScore[m])
        {
            m = i;
        }
    }
    return 1;
}
forward KillingScore();
public KillingScore()
{
     new highestkiller = GetHighestKiller();
     new str[64];
     if(highestkiller != INVALID_PLAYER_ID)
     {
        format(str, sizeof(str), "Congratulations!, You Are The {FF0000}Killer {FFEE00}Of The Day, Reward: $10000 Cash And 10 Scores!");
        SendClientMessage(highestkiller, 0xFFEE00FF, str);
        GivePlayerMoney(highestkiller, 10000);
        SetPlayerScore(highestkiller, GetPlayerScore(highestkiller)+10);
        GameTextForPlayer(highestkiller, "~g~Killer Of The Day! Reward: $10000 And 10 Scores!", 5000, 4);
        foreach(Player, i)
        {
          format(str, sizeof(str), "%s Is The {FF0000}Killer {FFEE00}Of The Day, Congratulations! With: %d Kills Today!", highestkiller, KillerScore[highestkiller]);
          SendClientMessage(highestkiller, 0x00FFF2FF, str);
          KillerScore[i] = 0;
        }
     }
}
The Codes Of The Timer Under OnGameModeInit:
pawn Код:
SetTimer("KillingScore", 1380000, true);
The Codes Of The Variable KillerScore[MAX_PLAYERS] Under OnPlayerDeath:
pawn Код:
KillerScore[killerid] ++;
Please Help For REP.
Reply


Messages In This Thread
Function Not Working +REP - by Youssef214 - 23.06.2014, 08:08
Re: Function Not Working +REP - by RenovanZ - 23.06.2014, 08:13
Re: Function Not Working +REP - by Koala818 - 23.06.2014, 08:22
Re: Function Not Working +REP - by Youssef214 - 24.06.2014, 11:41
Re: Function Not Working +REP - by Youssef214 - 25.06.2014, 09:14
Re: Function Not Working +REP - by Threshold - 25.06.2014, 09:53
Re: Function Not Working +REP - by Youssef214 - 25.06.2014, 10:09

Forum Jump:


Users browsing this thread: 1 Guest(s)