
   /* AMX Mod script.
   *
   * (c) 2002-2003, OLO
   * This file is provided as is (no warranties).
   *
   * Command:
   * amx_ownscore <value>
   * "a" - make that there is no frags but team score
   * "b" - don't desplay deaths
   *
   * To disable plugin use amx_ownscore "" or disable it by Pause Plugins
   Plugin
   */
   #include <amxmod>
   #include <amxmisc>
   new g_teamScore[3]
   new g_mode
   new gmsgScoreInfo
   public scoreEvent() {
     new teamID = read_data( 5 )
     message_begin( MSG_ALL , gmsgScoreInfo )
     write_byte( read_data(1) )
     write_short( (g_mode & 1) ? g_teamScore[ teamID ] : read_data(2) )
     write_short( (g_mode & 2) ? 0 : read_data(3) )
     write_short( read_data(4) )
     write_short( teamID )
     message_end()
   }
   public teamEvent() {
     new sTeam[2]
     read_data(1,sTeam,1)
     g_teamScore[ (sTeam[0]=='T') ? 1 : 2 ] = read_data(2)
   }
   public cmdScore( id, level, cid ){
     if (!cmd_access(id,level,cid,2))
       return PLUGIN_HANDLED
     new value[8]
     read_argv(1, value, 7 )
     if ( (g_mode = read_flags( value )) )
       unpause( "b" , "scoreEvent"  )
     else
       pause( "b" , "scoreEvent"  )
     return PLUGIN_HANDLED
   }
   public plugin_init() {
     register_plugin("Own Score Rules","0.9","default")
     pause( "b" , "scoreEvent"  )
     register_event("ScoreInfo","scoreEvent","a")
     register_event("TeamScore","teamEvent","a")
     gmsgScoreInfo = get_user_msgid("ScoreInfo")
     register_concmd("amx_ownscore","cmdScore",ADMIN_CVAR,"<value>   -  a
   (no frags), b (no deaths)")
     return PLUGIN_CONTINUE
   }
