2 Problems (+REP Who Fixes Them All)
#2

1st problem
pawn Код:
stock GetHighestKiller()
{
    new m;
    for(new i = 0 ; i <= MAX_PLAYERS ; i++)
    {
        if(KillerScore[i] > KillerScore[m])
        {
            m = i;
        }
    }
    return i;
}
forward KillingScore();
public KillingScore()
{
     new highestmoney = GetHighestKiller(); // Get the highest holder of money.
     new str[64]; // Declare the variable which will hold the message in array.
     if(highestmoney != INVALID_PLAYER_ID) // Check if he is a real player or -1.
     {
        format(str, sizeof(str), "Congratulations!, You Are The {FF0000}Killer {FFEE00}Of The Day!"); // Format the string with message.
        SendClientMessage(highestmoney, 0xFFEE00FF, str); // Show the message.
     }
}
Reply


Messages In This Thread
2 Problems (+REP Who Fixes Them All) - by Youssef214 - 21.06.2014, 17:19
Re: 2 Problems (+REP Who Fixes Them All) - by Opah - 21.06.2014, 17:48
Re: 2 Problems (+REP Who Fixes Them All) - by Opah - 21.06.2014, 17:51
Re: 2 Problems (+REP Who Fixes Them All) - by Youssef214 - 21.06.2014, 18:21
Re: 2 Problems (+REP Who Fixes Them All) - by Opah - 21.06.2014, 19:00

Forum Jump:


Users browsing this thread: 1 Guest(s)