Fixed base plugins using GetMaxClients() instead of MaxClients (bug 3985, r=dvander).

This commit is contained in:
Nicholas Hastings
2010-02-08 20:14:52 -08:00
parent d484979fe8
commit 0af39de346
18 changed files with 35 additions and 70 deletions
+3 -6
View File
@@ -273,10 +273,9 @@ native PrintToChat(client, const String:format[], any:...);
*/
stock PrintToChatAll(const String:format[], any:...)
{
new maxClients = GetMaxClients();
decl String:buffer[192];
for (new i = 1; i <= maxClients; i++)
for (new i = 1; i <= MaxClients; i++)
{
if (IsClientInGame(i))
{
@@ -307,10 +306,9 @@ native PrintCenterText(client, const String:format[], any:...);
*/
stock PrintCenterTextAll(const String:format[], any:...)
{
new maxClients = GetMaxClients();
decl String:buffer[192];
for (new i = 1; i <= maxClients; i++)
for (new i = 1; i <= MaxClients; i++)
{
if (IsClientInGame(i))
{
@@ -341,10 +339,9 @@ native PrintHintText(client, const String:format[], any:...);
*/
stock PrintHintTextToAll(const String:format[], any:...)
{
new maxClients = GetMaxClients();
decl String:buffer[192];
for (new i = 1; i <= maxClients; i++)
for (new i = 1; i <= MaxClients; i++)
{
if (IsClientInGame(i))
{
+2 -3
View File
@@ -99,7 +99,6 @@ stock Handle:FindPluginByFile(const String:filename[])
#pragma deprecated Use FindTarget() or ProcessTargetString()
stock SearchForClients(const String:pattern[], clients[], maxClients)
{
new maxclients = GetMaxClients();
new total = 0;
if (maxClients == 0)
@@ -113,7 +112,7 @@ stock SearchForClients(const String:pattern[], clients[], maxClients)
if (!input)
{
decl String:name[65]
for (new i=1; i<=maxclients; i++)
for (new i=1; i<=MaxClients; i++)
{
if (!IsClientInGame(i))
{
@@ -137,7 +136,7 @@ stock SearchForClients(const String:pattern[], clients[], maxClients)
}
decl String:name[65]
for (new i=1; i<=maxclients; i++)
for (new i=1; i<=MaxClients; i++)
{
if (!IsClientInGame(i))
{
+2 -3
View File
@@ -490,11 +490,10 @@ native bool:VoteMenu(Handle:menu, clients[], numClients, time, flags=0);
*/
stock VoteMenuToAll(Handle:menu, time, flags=0)
{
new num = GetMaxClients();
new total;
decl players[num];
decl players[MaxClients];
for (new i=1; i<=num; i++)
for (new i=1; i<=MaxClients; i++)
{
if (!IsClientInGame(i))
{
+1 -2
View File
@@ -403,11 +403,10 @@ stock EmitSoundToAll(const String:sample[],
bool:updatePos = true,
Float:soundtime = 0.0)
{
new maxClients = GetMaxClients();
new clients[maxClients];
new total = 0;
for (new i=1; i<=maxClients; i++)
for (new i=1; i<=MaxClients; i++)
{
if (IsClientInGame(i))
{
+2 -3
View File
@@ -197,10 +197,9 @@ stock TE_WriteEncodedEnt(const String:prop[], value)
*/
stock TE_SendToAll(Float:delay=0.0)
{
new maxClients = GetMaxClients();
new total = 0;
new clients[maxClients];
for (new i=1; i<=maxClients; i++)
new clients[MaxClients];
for (new i=1; i<=MaxClients; i++)
{
if (IsClientInGame(i))
{
+2 -3
View File
@@ -170,10 +170,9 @@ native UnhookUserMessage(UserMsg:msg_id, MsgHook:hook, bool:intercept=false);
*/
stock Handle:StartMessageAll(String:msgname[], flags=0)
{
new maxClients = GetMaxClients();
new total = 0;
new clients[maxClients];
for (new i=1; i<=maxClients; i++)
new clients[MaxClients];
for (new i=1; i<=MaxClients; i++)
{
if (IsClientConnected(i))
{