29.08.2011, 00:02
(
Последний раз редактировалось JaTochNietDan; 29.08.2011 в 00:59.
)
Quote:
Can it be this:
pawn Код:
|
Simply edit the function to return a value as expected, for example:
pawn Код:
stock AdminConnected()
{
for(new a, g = GetMaxPlayers(); a < g; a++)
if(IsPlayerConnected(a) && IsPlayerAdmin(a)) return 1;
return 0;
}
Additionally, why do you create two variables in the loop? You only really need one:
pawn Код:
stock AdminConnected()
{
for(new a = 0; a < GetMaxPlayers(); a++)
if(IsPlayerConnected(a) && IsPlayerAdmin(a)) return 1;
return 0;
}