21.06.2014, 17:48
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.
}
}