28.06.2013, 07:42
I got a bug in my script. i have a function in which it finds the highest killer but it is not working perfectly.
please hlep.......
pawn Код:
for(new i = 0; i <= MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(pcount>=2){
if(Kills[i] > mostkills) mostkills = Kills[i];
PlayerInfo[i][pWins]++;
new name[MAX_PLAYER_NAME], string2[ 64 ];
GetPlayerName(i, name, sizeof(name));
format( string2, sizeof(string2), "~r~%s ~w~has won the match with ~r~%d~w~ kills.", name,Kills[i]);
GameTextForAll(string2, 5000, 3);}
}
}
for(new i = 0; i <= MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(pcount>=2){
if(Kills[i] == Kills[i])
{
new string2[ 64 ];
format( string2, sizeof(string2), "~g~Draw! ~r~No one ~w~is winner in this match.");
GameTextForAll(string2, 5000, 3);}
}
}
}
if(pcount==1){
new string[ 64 ];
format( string, sizeof(string), "~w~You ~r~need ~w~one more player to win this match.");
GameTextForAll( string, 5000, 3 );
}