Fixed base plugins using GetMaxClients() instead of MaxClients (bug 3985, r=dvander).
This commit is contained in:
@@ -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))
|
||||
{
|
||||
|
||||
@@ -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))
|
||||
{
|
||||
|
||||
@@ -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))
|
||||
{
|
||||
|
||||
@@ -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))
|
||||
{
|
||||
|
||||
@@ -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))
|
||||
{
|
||||
|
||||
@@ -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))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user