Raised This Month: $ Target: $400
 0% 

amx_who custom plugin unknown error


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
RaYden
Member
Join Date: Sep 2007
Old 10-05-2007 , 07:44   amx_who custom plugin unknown error
Reply With Quote #1

So I've made this plugin but for some reason when it is executed the server crashes ... I have no idea why ... some cainda memory wright error that docent make any sense

Code:
#include <amxmodx>
#include <amxmisc>

public plugin_init()
{
    register_plugin("Admin Online","v1.0","RaYden")
    register_concmd("amx_who","adminON")
}

public adminON(id)
{
      
    new Players[32],playerCount,ownerznr=0,godznr=0,moderatorznr=0,adminznr=0,helperznr=0,slotznr=0
    new ownerz[32][32],moderatorz[32][32],godz[32][32],adminz[32][32],helperz[32][32],slotz[32][32]
    
    get_players(Players,playerCount)
    
    
    for(new i = 0; i<playerCount; i++)
    {
    if(access(Players[i],ADMIN_PASSWORD))
    {
        get_user_name(Players[i], ownerz[ownerznr++], 31)
    }
       
    if(access(Players[i],ADMIN_RCON) && !access(Players[i],ADMIN_PASSWORD))
         {
        get_user_name(Players[i], godz[godznr++], 31)
    }
        
       
    if(access(Players[i],ADMIN_MAP) && !access(Players[i],ADMIN_RCON))
          {
        get_user_name(Players[i], moderatorz[moderatorznr++], 31)
    }
        
    if(access(Players[i],ADMIN_BAN) && !access(Players[i],ADMIN_MAP))
         {
        get_user_name(Players[i], adminz[adminznr++], 31)
    }
        
    if(access(Players[i],ADMIN_VOTE) && !access(Players[i],ADMIN_BAN))
         {
        get_user_name(Players[i], helperz[helperznr++], 31)
    }
       
    if(access(Players[i],ADMIN_RESERVATION) && !access(Players[i],ADMIN_VOTE))
         {
        get_user_name(Players[i], slotz[slotznr++], 31)
    }
    } 
    
    console_print(id,"===========================Admins===========================")
    if(ownerznr == 0 && godznr == 0 && moderatorznr == 0 && adminznr == 0 && helperznr == 0 && slotznr == 0 ) 
    {
        console_print(id,"No admin present")
    }
    else 
    {
        console_print(id,"-=..~>  [%d] Owners Online:  <~..=-",ownerznr)
    if(ownerznr > 0)
           {
           for(new j=0;j<ownerznr;j++)
        {
            console_print(id,"%s",ownerz[j])
        }
       }
    console_print(id,"-----------------------------------------------------")
    console_print(id,"  -=*<  [%d] Godz Online:  >*=-",godznr)
    if(godznr > 0)
         {
         for(new j=0;j<godznr;j++)
        {
            console_print(id,"%s",godz[j])
        }
     }
    console_print(id,"-----------------------------------------------------")
    console_print(id,"   -=<  [%d] Modertarorz Online:  >=-",moderatorznr)
    if(moderatorznr > 0)
         {
         for(new j=0;j<moderatorznr;j++)
        {
            console_print(id,"%s",moderatorz[j])
        }
     }
    console_print(id,"-----------------------------------------------------")
    console_print(id,"    -=  [%d] Adminz Online:  =-",adminznr)
    if(adminznr > 0)
         {
         for(new j=0;j<adminznr;j++)
        {
            console_print(id,"%s",adminz[j])
        }
     }
    console_print(id,"-----------------------------------------------------")
    console_print(id,"     -  [%d] Helperz Online:  -",helperznr)
    if(helperznr > 0)
          {
          for(new j=0;j<helperznr;j++)
        {
            console_print(id,"%s",helperz[j])
        }
      }
    console_print(id,"-----------------------------------------------------")
    console_print(id,"      [%d] Slotz Online:  ",slotznr)
    if(slotznr > 0)
         {
         for(new j=0;j<slotznr;j++)
        {
            console_print(id,"%s",slotz[j])
        }
     }
    console_print(id,"-----------------------------------------------------")
    }
    console_print(id,"============================================================")
         
    return PLUGIN_HANDLED
}
The plugin complies successfully
RaYden is offline
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 16:12.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode