[Modo] erro Hitskin_logo Hitskin.com

Isto é uma pré-visualização de um tema em Hitskin.com
Instalar o temaVoltar para a ficha do tema

Zplague

Gostaria de reagir a esta mensagem? Crie uma conta em poucos cliques ou inicie sessão para continuar.

Seu portal de Zombie Plague no Brasil

Zumbis Online

Últimos assuntos

» [ANÚNCIO] Alguem vivo ai?
por Eclipse 17/9/2024, 6:39 pm

» The Fen1xS CLan | Zombie Plague | [XP/LEVELS] #2024
por hevy 5/7/2024, 8:28 pm

»
por Eclipse 29/2/2024, 12:30 am

» [Plugin] /vm Com Status
por Isr7 4/6/2023, 3:24 pm

» Alguém pra manter um servidor comigo?
por Isr7 3/6/2023, 4:52 pm

» Alguém querendo criar um servidor de zp? eu pago a host quem quiser deixar o discord ai Isr7#6920
por Isr7 3/6/2023, 3:18 pm

» PEDIDO: Multijump pros VIP
por Madness 15/3/2023, 3:44 pm

» [ZP] Modo padre para 5.0
por XperitosEspetinho123 15/7/2022, 3:31 pm

» [KZ] Servidores de cs 1.6
por [Dk]Serial-Killer 7/5/2022, 4:12 am

» [PLUGIN BY SKVD & WILLIAN] SHOP DE FANTASIAS
por dushowW 23/7/2020, 5:44 pm

Os membros mais ativos da semana

Nenhum usuário

Frases filosóficas Zplague:

....

Google Adsense

Estatísticas

Os nossos membros postaram um total de 38140 mensagens em 6680 assuntos

Temos 2796 usuários registrados

O último membro registrado é zmplugins - Henrique


3 participantes

    [Modo] erro

    [D]etonado[R]
    [D]etonado[R]
    Humano


    Nick : [D]etonado[R]
    Masculino Número de Mensagens : 625
    Ammo Packs : 4244
    Honra : 20
    Data de inscrição : 17/10/2013

    [Modo] erro Empty [Modo] erro

    Mensagem por [D]etonado[R] 23/10/2013, 7:22 pm

    alguem pode ajudar ta dando 4 erros de compilaçao aki nessa sma de todos os mods

    Código:
    #include <amxmodx>
    #include <  fun >
    #include <zombie_plague_advance>

    /************************************************************\
    |                  Customizations Section                    |
    |        You can edit here according to your liking        |
    \************************************************************/

    // This is the chance value according to which this game mode will be called
    // The higher the value the lesser the chance of calling this game mode
    new const g_chance = 20

    // This is the access flag required to start the game mode
    // through the admin menu. Look in users.ini for more details
    new const g_access_flag[] = "l"

    // This is the sound which is played when the game mode is triggered
    // Add as many as you want [Randomly chosen if more than one]
    new const g_play_sounds[][] =
    {
      "zombie_plague/nemesis1.wav" ,
      "zombie_plague/survivor1.wav"
    }

    // Comment the following line to disable ambience sounds
    // Just add two slashes ( // )
    #define AMBIENCE_SOUNDS

    #if defined AMBIENCE_SOUNDS
    // Ambience Sounds (only .wav and .mp3 formats supported)
    // Add as many as you want [Randomly chosen if more than one]
    new const g_sound_ambience[][] =
    {
      "zombie_plague/ambience.wav"
    }

    // Duration in seconds of each sound
    new const Float:g_sound_ambience_duration[] = { 58.0 , 56.0 }
    #endif

    /************************************************************\
    |                  Customizations Ends Here..!!              |
    |        You can edit the cvars in the plugin init          |
    \************************************************************/

    // Variables
    new g_gameid, g_maxplayers, cvar_minplayers, cvar_ratio, cvar_sniperhp, cvar_assahp, g_msg_sync, cvar_nemhp, cvar_survhp, cvar_jasonhp, cvar_firebughp, cvar_arqueirohp

    // Ambience sounds
    #define TASK_AMB 3256

    public plugin_init( )
    {
      // Plugin registeration.
      register_plugin( "[ZP] Modo Nightmare + novos mod","1.0", "@bdul!/Scrash" )
     
      // Register some cvars
      // Edit these according to your liking
      cvar_minplayers = register_cvar("zp_prmx_minplayers", "2")
      cvar_sniperhp =    register_cvar("zp_prmx_sniper_hp", "1.0")
      cvar_assahp =    register_cvar("zp_prmx_assassin_hp", "0.3")
      cvar_survhp =    register_cvar("zp_prmx_survivor_hp", "1.0")
      cvar_nemhp =    register_cvar("zp_prmx_assassin_hp", "0.3")
      cvar_jasonhp =    register_cvar("zp_prmx_jason_hp", "0.3")
      cvar_firebughp =    register_cvar("zp_prmx_firebug_hp", "0.3")
      cvar_arqueirohp =    register_cvar("zp_prmx_arqueiro_hp", "0.3")
      cvar_ratio =      register_cvar("zp_prmx_inf_ratio", "0.5")
     
      // Get maxplayers
      g_maxplayers = get_maxplayers( )
     
      // Hud stuff
      g_msg_sync = CreateHudSyncObj()
    }

    // Game modes MUST be registered in plugin precache ONLY
    public plugin_precache( )
    {
      // Read the access flag
      new access_flag = read_flags( g_access_flag )
      new i
     
      // Precache the play sounds
      for (i = 0; i < sizeof g_play_sounds; i++)
          precache_sound( g_play_sounds[i] )
     
      // Precache the ambience sounds
      #if defined AMBIENCE_SOUNDS
      new sound[100]
      for (i = 0; i < sizeof g_sound_ambience; i++)
      {
          if (equal(g_sound_ambience[i][strlen(g_sound_ambience[i])-4], ".mp3"))
          {
            formatex(sound, sizeof sound - 1, "sound/%s", g_sound_ambience[i])
            precache_generic( sound )
          }
          else
          {
            precache_sound( g_sound_ambience[i] )
          }
      }
      #endif
     
      // Register our game mode
      g_gameid = zp_register_game_mode( "Nightamare + novos mod", access_flag, g_chance, 0, ZP_DM_BALANCE )
    }

    // Player spawn post
    public zp_player_spawn_post( id )
    {
      // Check for current mode
      if( zp_get_current_mode() == g_gameid )
      {
          // Check if the player is a zombie
          if( zp_get_user_zombie( id ))
         
          switch(random_num(1,4))
          {
          case 1:
          {
            // Make him an assassin instead
            zp_make_user_assassin( id )
           
            // Set his health
            set_user_health( id, floatround(get_user_health(id) * get_pcvar_float(cvar_assahp)) )
          }
          case 2:
          {
            // Make him a sniper
            zp_make_user_sniper( id )
           
            // Set his health
            set_user_health( id, floatround(get_user_health(id) * get_pcvar_float(cvar_sniperhp)) )
          }
          case 3:
          {
            // Make him a sniper
            zp_make_user_nemesis( id )
           
            // Set his health
            set_user_health( id, floatround(get_user_health(id) * get_pcvar_float(cvar_nemhp)) )
          }
          case 4:
          {
            // Make him a sniper
            zp_make_user_survivor( id )
           
            // Set his health
            set_user_health( id, floatround(get_user_health(id) * get_pcvar_float(cvar_survhp)) )
         
          case 5:
          {
            // Make him a jason
            zp_make_user_jason( id )
           
            // Set his health
            set_user_health( id, floatround(get_user_health(id) * get_pcvar_float(cvar_jasonhp)) )
         
          case 6:
          {
            // Make him a firebug
            zp_make_user_firebug( id )
           
            // Set his health
            set_user_health( id, floatround(get_user_health(id) * get_pcvar_float(cvar_firebughp)) )
         
          case 7:
          {
            // Make him a arqueiro
            zp_make_user_arqueiro( id )
           
            // Set his health
            set_user_health( id, floatround(get_user_health(id) * get_pcvar_float(cvar_arqueirohp)) )
          }
      }
    }
    }

    public zp_round_started_pre( game )
    {
      // Check if it is our game mode
      if( game == g_gameid )
      {
          // Check for min players
          if( fn_get_alive_players() < get_pcvar_num(cvar_minplayers) )
          {
            /**
              * Note:
              * This very necessary, you should return ZP_PLUGIN_HANDLED if
              * some conditions required by your game mode are not met
              * This will inform the main plugin that you have rejected
              * the offer and so the main plugin will allow other game modes
              * to be given a chance
              */
            return ZP_PLUGIN_HANDLED
          }
          // Start our new mode
          start_prmx_mode( )
      }
      // Make the compiler happy =)
      return PLUGIN_CONTINUE
    }

    public zp_round_started( game, id )
    {
      // Check if it is our game mode
      if( game == g_gameid )
      {
          // Show HUD notice
          set_hudmessage(221, 156, 21, -1.0, 0.17, 1, 0.0, 5.0, 1.0, 1.0, -1)
          ShowSyncHudMsg(0, g_msg_sync, "Nightmare + novos mod")
         
          // Play the starting sound
          client_cmd(0, "spk ^"%s^"", g_play_sounds[ random_num(0, sizeof g_play_sounds -1) ] )
         
          // Remove ambience task affects
          remove_task( TASK_AMB )
         
          // Set task to start ambience sounds
          #if defined AMBIENCE_SOUNDS
          set_task( 2.0, "start_ambience_sounds", TASK_AMB )
          #endif
      }
    }

    public zp_game_mode_selected( gameid, id )
    {
      // Check if our game mode was called
      if( gameid == g_gameid )
          start_prmx_mode( )
     
      // Make the compiler happy again =)
      return PLUGIN_CONTINUE
    }

    // This function contains the whole code behind this game mode
    start_prmx_mode( )
    {
      // Create and initialize some important vars
      static i_assassins, i_max_assassins, id, i_alive
      i_alive = fn_get_alive_players()
      id = 0
     
      // Get the no of players we have to turn into assassins
      i_max_assassins = floatround( ( i_alive * get_pcvar_float( cvar_ratio ) ), floatround_ceil )
      i_assassins = 0
     
      // Transformando os jogadores automaticamente em Assassinos/Nemesis
      while (i_assassins < i_max_assassins)
      {
          // Keep looping through all players
          if ( (++id) > g_maxplayers) id = 1
         
          // Dead
          if ( !is_user_alive(id) )
            continue;

          if (random_num(1, 5) == 1)
          {
            // Tranformando o jogador em Assassino
            zp_make_user_assassin(id)
           
            // Ajeitando a Vida do Assassino
            set_user_health( id, floatround(get_user_health(id) * get_pcvar_float(cvar_assahp)) )
           
            // Increase counter
            i_assassins++
           
            }
          }

      // Turn the remaining players into snipers
      for (id = 1; id <= g_maxplayers; id++)
      {
          // Only those of them who are alive and are not assassins
          if ( !is_user_alive(id) || zp_get_user_assassin(id) )
            continue;
          {
            switch(random_num(1, 3))
            {
            case 1:
            {
            // Tranformando o jogador em Sniper
            zp_make_user_sniper(id)
         
            // Ajeitando a Vida do Sniper
            set_user_health( id, floatround(get_user_health(id) * get_pcvar_float(cvar_sniperhp)) )
            }
            case 2:
            {
            // Tranformando o jogador em survivor
            zp_make_user_survivor(id)
         
            // Ajeitando a Vida do Survivor
            set_user_health( id, floatround(get_user_health(id) * get_pcvar_float(cvar_survhp)) )
            }
            case 3:
            {
            // Tranformando o jogador em survivor
            zp_make_user_nemesis(id)
         
            // Ajeitando a Vida do Survivor
            set_user_health( id, floatround(get_user_health(id) * get_pcvar_float(cvar_nemhp)) )

            case 4:
            {
            // Tranformando o jogador em jason
            zp_make_user_jason(id)
         
            // Ajeitando a Vida do jason
            set_user_health( id, floatround(get_user_health(id) * get_pcvar_float(cvar_jasonhp)) )

            case 5:
            {
            // Tranformando o jogador em firebug
            zp_make_user_firebug(id)
         
            // Ajeitando a Vida do firebug
            set_user_health( id, floatround(get_user_health(id) * get_pcvar_float(cvar_firebughp)) )

            case 6:
            {
            // Tranformando o jogador em arqueiro
            zp_make_user_arqueiro(id)
         
            // Ajeitando a Vida do arqueiro
            set_user_health( id, floatround(get_user_health(id) * get_pcvar_float(cvar_arqueirohp)) )
            }

          }
      }
    }
    }


    #if defined AMBIENCE_SOUNDS
    public start_ambience_sounds( )
    {
      // Variables
      static amb_sound[64], sound, Float:duration
     
      // Select our ambience sound
      sound = random_num( 0, sizeof g_sound_ambience - 1 )
      copy( amb_sound, sizeof amb_sound - 1 , g_sound_ambience[ sound ] )
      duration = g_sound_ambience_duration[ sound ]
     
      // Check whether it's a wav or mp3, then play it on clients
      if ( equal( amb_sound[ strlen( amb_sound ) - 4 ], ".mp3" ) )
          client_cmd( 0, "mp3 play ^"sound/%s^"", amb_sound )
      else
          client_cmd( 0, "spk ^"%s^"", sound )
     
      // Start the ambience sounds
      set_task( duration, "start_ambience_sounds", TASK_AMB )
    }
    public zp_round_ended( winteam )
    {
      // Stop ambience sounds on round end
      remove_task( TASK_AMB )
    }
    #endif

    // This function returns the no. of alive players
    // Feel free to use this in your plugin when you
    // are making your own game modes.
    fn_get_alive_players( )
    {
      static i_alive, id
      i_alive = 0
     
      for ( id = 1; id <= g_maxplayers; id++ )
      {
          if( is_user_alive( id ) )
            i_alive++
      }
      return i_alive;
    }
    /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
    *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1046\\ f0\\ fs16 \n\\ par }
    */
    [P]erfec[T] [S]cr[@]s[H]
    [P]erfec[T] [S]cr[@]s[H]
    Scripter


    Masculino Número de Mensagens : 564
    Jogador FODA Perfect Scrash entrou na zplague
    Ammo Packs : 4545
    Honra : 177
    Data de inscrição : 04/04/2013

    [Modo] erro Empty Re: [Modo] erro

    Mensagem por [P]erfec[T] [S]cr[@]s[H] 23/10/2013, 7:34 pm

    Testa.

    Código:
    #include <amxmodx>
    #include <     fun >
    #include <zombie_plague_advance>

    /************************************************************\
    |                  Customizations Section                    |
    |        You can edit here according to your liking        |
    \************************************************************/

    // This is the chance value according to which this game mode will be called
    // The higher the value the lesser the chance of calling this game mode
    new const g_chance = 20

    // This is the access flag required to start the game mode
    // through the admin menu. Look in users.ini for more details
    new const g_access_flag[] = "l"

    // This is the sound which is played when the game mode is triggered
    // Add as many as you want [Randomly chosen if more than one]
    new const g_play_sounds[][] =
    {
    "zombie_plague/nemesis1.wav" ,
    "zombie_plague/survivor1.wav"
    }

    // Comment the following line to disable ambience sounds
    // Just add two slashes ( // )
    #define AMBIENCE_SOUNDS

    #if defined AMBIENCE_SOUNDS
    // Ambience Sounds (only .wav and .mp3 formats supported)
    // Add as many as you want [Randomly chosen if more than one]
    new const g_sound_ambience[][] =
    {
    "zombie_plague/ambience.wav"
    }

    // Duration in seconds of each sound
    new const Float:g_sound_ambience_duration[] = { 58.0 , 56.0 }
    #endif

    /************************************************************\
    |                  Customizations Ends Here..!!              |
    |        You can edit the cvars in the plugin init          |
    \************************************************************/

    // Variables
    new g_gameid, g_maxplayers, cvar_minplayers, cvar_ratio, cvar_sniperhp, cvar_assahp, g_msg_sync, cvar_nemhp, cvar_survhp, cvar_jasonhp, cvar_firebughp, cvar_arqueirohp

    // Ambience sounds
    #define TASK_AMB 3256

    public plugin_init( )
    {
       // Plugin registeration.
       register_plugin( "[ZP] Modo Nightmare","1.0", "@bdul! | [P]erfec[T] [S]cr[@]s[H]" )
       
       // Register some cvars
       // Edit these according to your liking
       cvar_minplayers = register_cvar("zp_night_minplayers", "2")
       cvar_sniperhp = register_cvar("zp_night_sniper_hp", "1.0")
       cvar_assahp = register_cvar("zp_night_assassin_hp", "0.3")
       cvar_survhp = register_cvar("zp_night_survivor_hp", "1.0")
       cvar_nemhp = register_cvar("zp_night_nemesis_hp", "0.3")
       cvar_ratio = register_cvar("zp_night_inf_ratio", "0.5")
       cvar_jasonhp =    register_cvar("zp_night_jason_hp", "0.3")
       cvar_firebughp =    register_cvar("zp_night_firebug_hp", "0.3")
       cvar_arqueirohp =    register_cvar("zp_night_arqueiro_hp", "0.3")
       
       // Get maxplayers
       g_maxplayers = get_maxplayers( )
       
       // Hud stuff
       g_msg_sync = CreateHudSyncObj()
    }

    // Game modes MUST be registered in plugin precache ONLY
    public plugin_precache( )
    {
       // Read the access flag
       new access_flag = read_flags( g_access_flag )
       new i
       
       // Precache the play sounds
       for (i = 0; i < sizeof g_play_sounds; i++)
       precache_sound( g_play_sounds[i] )
       
       // Precache the ambience sounds
       #if defined AMBIENCE_SOUNDS
       new sound[100]
       for (i = 0; i < sizeof g_sound_ambience; i++)
       {
       if (equal(g_sound_ambience[i][strlen(g_sound_ambience[i])-4], ".mp3"))
       {
          formatex(sound, sizeof sound - 1, "sound/%s", g_sound_ambience[i])
          precache_generic( sound )
       }
       else
       {
          precache_sound( g_sound_ambience[i] )
       }
    }
    #endif

    // Register our game mode
    g_gameid = zp_register_game_mode( "Nightmare Mode", access_flag, g_chance, 0, ZP_DM_BALANCE )
    }

    // Player spawn post
    // Player spawn post
    public zp_player_spawn_post( id )
    {
    // Check for current mode
    if( zp_get_current_mode() == g_gameid )
    {
       // Check if the player is a zombie
       if( zp_get_user_zombie( id ))
          
          switch(random_num(1,7))
          {
             case 1:
             {
                // Make him an assassin instead
                zp_make_user_assassin( id )
                
                // Set his health
                set_user_health( id, floatround(get_user_health(id) * get_pcvar_float(cvar_assahp)) )
             }
             case 2:
             {
                // Make him a sniper
                zp_make_user_sniper( id )
                
                // Set his health
                set_user_health( id, floatround(get_user_health(id) * get_pcvar_float(cvar_sniperhp)) )
             }
             case 3:
             {
                // Make him a sniper
                zp_make_user_nemesis( id )
                
                // Set his health
                set_user_health( id, floatround(get_user_health(id) * get_pcvar_float(cvar_nemhp)) )
             }
             case 4:
             {
                // Make him a sniper
                zp_make_user_survivor( id )
                
                // Set his health
                set_user_health( id, floatround(get_user_health(id) * get_pcvar_float(cvar_survhp)) )
             }
             case 5:
             {
                // Tranformando o jogador em jason
                zp_make_user_jason(id)
                
                // Ajeitando a Vida do jason
                set_user_health( id, floatround(get_user_health(id) * get_pcvar_float(cvar_jasonhp)) )
             }
             
             case 6:
             {
                // Tranformando o jogador em firebug
                zp_make_user_firebug(id)
                
                // Ajeitando a Vida do firebug
                set_user_health( id, floatround(get_user_health(id) * get_pcvar_float(cvar_firebughp)) )
             }
             
             case 7:
             {
                // Tranformando o jogador em arqueiro
                zp_make_user_arqueiro(id)
                
                // Ajeitando a Vida do arqueiro
                set_user_health( id, floatround(get_user_health(id) * get_pcvar_float(cvar_arqueirohp)) )
             }
          }
       }
    }

    public zp_round_started_pre( game )
    {
       // Check if it is our game mode
       if( game == g_gameid )
       {
          // Check for min players
          if( fn_get_alive_players() < get_pcvar_num(cvar_minplayers) )
          {
             /**
             * Note:
             * This very necessary, you should return ZP_PLUGIN_HANDLED if
             * some conditions required by your game mode are not met
             * This will inform the main plugin that you have rejected
             * the offer and so the main plugin will allow other game modes
             * to be given a chance
             */
             return ZP_PLUGIN_HANDLED
          }
          // Start our new mode
          start_night_mode( )
       }
       // Make the compiler happy =)
       return PLUGIN_CONTINUE
    }

    public zp_round_started( game, id )
    {
       // Check if it is our game mode
       if( game == g_gameid )
       {
          // Show HUD notice
          set_hudmessage(221, 156, 21, -1.0, 0.17, 1, 0.0, 5.0, 1.0, 1.0, -1)
          ShowSyncHudMsg(0, g_msg_sync, "Nightmare Mode !!!")
          
          // Play the starting sound
          client_cmd(0, "spk ^"%s^"", g_play_sounds[ random_num(0, sizeof g_play_sounds -1) ] )
          
          // Remove ambience task affects
          remove_task( TASK_AMB )
          
          // Set task to start ambience sounds
          #if defined AMBIENCE_SOUNDS
          set_task( 2.0, "start_ambience_sounds", TASK_AMB )
          #endif
       }
    }

    public zp_game_mode_selected( gameid, id )
    {
       // Check if our game mode was called
       if( gameid == g_gameid )
          start_night_mode( )
       
       // Make the compiler happy again =)
       return PLUGIN_CONTINUE
    }

    // This function contains the whole code behind this game mode
    start_night_mode( )
    {
       // Create and initialize some important vars
       static i_assassins, i_max_assassins, id, i_alive
       i_alive = fn_get_alive_players()
       id = 0
       
       // Get the no of players we have to turn into assassins
       i_max_assassins = floatround( ( i_alive * get_pcvar_float( cvar_ratio ) ), floatround_ceil )
       i_assassins = 0
       
       // Transformando os jogadores automaticamente em Assassinos/Nemesis
       while (i_assassins < i_max_assassins)
       {
          // Keep looping through all players
          if ( (++id) > g_maxplayers) id = 1
          
          // Dead
          if ( !is_user_alive(id) )
             continue;
          
          if (random_num(1, 5) == 1)
          {
             switch(random_num(1, 2))
             {
                case 1:
                {
                   // Tranformando o jogador em Assassino
                   zp_make_user_assassin(id)
                   
                   // Ajeitando a Vida do Assassino
                   set_user_health( id, floatround(get_user_health(id) * get_pcvar_float(cvar_assahp)) )
                }
                case 2:
                {
                   // Tranformando o jogador em survivor
                   zp_make_user_nemesis(id)
                   
                   // Ajeitando a Vida do Survivor
                   set_user_health( id, floatround(get_user_health(id) * get_pcvar_float(cvar_nemhp)) )
                }
             }
             
             // Increase counter
             i_assassins++
             
          }
       }
       // Turn the remaining players into snipers
       for (id = 1; id <= g_maxplayers; id++)
       {
          // Only those of them who are alive and are not assassins
          if ( !is_user_alive(id) || zp_get_user_assassin(id) || zp_get_user_nemesis(id))
             continue;
          
          switch(random_num(1, 5))
          {
             case 1:
             {
                // Tranformando o jogador em Sniper
                zp_make_user_sniper(id)
                
                // Ajeitando a Vida do Sniper
                set_user_health( id, floatround(get_user_health(id) * get_pcvar_float(cvar_sniperhp)) )
             }
             case 2:
             {
                // Tranformando o jogador em survivor
                zp_make_user_survivor(id)
                
                // Ajeitando a Vida do Survivor
                set_user_health( id, floatround(get_user_health(id) * get_pcvar_float(cvar_survhp)) )
             }
             case 3:
             {
                // Tranformando o jogador em jason
                zp_make_user_jason(id)
                
                // Ajeitando a Vida do jason
                set_user_health( id, floatround(get_user_health(id) * get_pcvar_float(cvar_jasonhp)) )
             }
             
             case 4:
             {
                // Tranformando o jogador em firebug
                zp_make_user_firebug(id)
                
                // Ajeitando a Vida do firebug
                set_user_health( id, floatround(get_user_health(id) * get_pcvar_float(cvar_firebughp)) )
             }
             
             case 5:
             {
                // Tranformando o jogador em arqueiro
                zp_make_user_arqueiro(id)
                
                // Ajeitando a Vida do arqueiro
                set_user_health( id, floatround(get_user_health(id) * get_pcvar_float(cvar_arqueirohp)) )
             }
          }
       }
    }



    #if defined AMBIENCE_SOUNDS
    public start_ambience_sounds( )
    {
       // Variables
       static amb_sound[64], sound, Float:duration
       
       // Select our ambience sound
       sound = random_num( 0, sizeof g_sound_ambience - 1 )
       copy( amb_sound, sizeof amb_sound - 1 , g_sound_ambience[ sound ] )
       duration = g_sound_ambience_duration[ sound ]
       
       // Check whether it's a wav or mp3, then play it on clients
       if ( equal( amb_sound[ strlen( amb_sound ) - 4 ], ".mp3" ) )
          client_cmd( 0, "mp3 play ^"sound/%s^"", amb_sound )
       else
          client_cmd( 0, "spk ^"%s^"", sound )
       
       // Start the ambience sounds
       set_task( duration, "start_ambience_sounds", TASK_AMB )
    }
    public zp_round_ended( winteam )
    {
       // Stop ambience sounds on round end
       remove_task( TASK_AMB )
       client_cmd(0, "mp3 stop")
    }
    #endif

    // This function returns the no. of alive players
    // Feel free to use this in your plugin when you
    // are making your own game modes.
    fn_get_alive_players( )
    {
       static i_alive, id
       i_alive = 0
       
       for ( id = 1; id <= g_maxplayers; id++ )
       {
          if( is_user_alive( id ) )
             i_alive++
       }
       return i_alive;
    }
    [D]etonado[R]
    [D]etonado[R]
    Humano


    Nick : [D]etonado[R]
    Masculino Número de Mensagens : 625
    Ammo Packs : 4244
    Honra : 20
    Data de inscrição : 17/10/2013

    [Modo] erro Empty Re: [Modo] erro

    Mensagem por [D]etonado[R] 23/10/2013, 7:47 pm

    deu 6 erros.

    @Edit

    até a minha deu menos kkkk
    Sergio #
    Sergio #
    Moderador
    Moderador


    Masculino Número de Mensagens : 682
    Ammo Packs : 4371
    Honra : 44
    Data de inscrição : 16/02/2013

    [Modo] erro Empty Re: [Modo] erro

    Mensagem por Sergio # 23/10/2013, 8:21 pm

    Teste:
    Código:
    #include <amxmodx>
    #include <      fun >
    #include <zombieplague>

    /************************************************************\
    |                  Customizations Section                    |
    |        You can edit here according to your liking        |
    \************************************************************/

    // This is the chance value according to which this game mode will be called
    // The higher the value the lesser the chance of calling this game mode
    new const g_chance = 20

    // This is the access flag required to start the game mode
    // through the admin menu. Look in users.ini for more details
    new const g_access_flag[] = "l"

    // This is the sound which is played when the game mode is triggered
    // Add as many as you want [Randomly chosen if more than one]
    new const g_play_sounds[][] =
    {
    "zombie_plague/nemesis1.wav" ,
    "zombie_plague/survivor1.wav"
    }

    // Comment the following line to disable ambience sounds
    // Just add two slashes ( // )
    #define AMBIENCE_SOUNDS

    #if defined AMBIENCE_SOUNDS
    // Ambience Sounds (only .wav and .mp3 formats supported)
    // Add as many as you want [Randomly chosen if more than one]
    new const g_sound_ambience[][] =
    {
    "zombie_plague/ambience.wav"
    }

    // Duration in seconds of each sound
    new const Float:g_sound_ambience_duration[] = { 58.0 , 56.0 }
    #endif

    /************************************************************\
    |                  Customizations Ends Here..!!              |
    |        You can edit the cvars in the plugin init          |
    \************************************************************/

    // Variables
    new g_gameid, g_maxplayers, cvar_minplayers, cvar_ratio, cvar_sniperhp, cvar_assahp, g_msg_sync, cvar_nemhp, cvar_survhp, cvar_jasonhp, cvar_firebughp, cvar_arqueirohp

    // Ambience sounds
    #define TASK_AMB 3256

    public plugin_init( )
    {
      // Plugin registeration.
      register_plugin( "[ZP] Modo Nightmare","1.0", "@bdul! | [P]erfec[T] [S]cr[@]s[H]" )
     
      // Register some cvars
      // Edit these according to your liking
      cvar_minplayers = register_cvar("zp_night_minplayers", "2")
      cvar_sniperhp = register_cvar("zp_night_sniper_hp", "1.0")
      cvar_assahp = register_cvar("zp_night_assassin_hp", "0.3")
      cvar_survhp = register_cvar("zp_night_survivor_hp", "1.0")
      cvar_nemhp = register_cvar("zp_night_nemesis_hp", "0.3")
      cvar_ratio = register_cvar("zp_night_inf_ratio", "0.5")
      cvar_jasonhp =    register_cvar("zp_night_jason_hp", "0.3")
      cvar_firebughp =    register_cvar("zp_night_firebug_hp", "0.3")
      cvar_arqueirohp =    register_cvar("zp_night_arqueiro_hp", "0.3")
     
      // Get maxplayers
      g_maxplayers = get_maxplayers( )
     
      // Hud stuff
      g_msg_sync = CreateHudSyncObj()
    }

    // Game modes MUST be registered in plugin precache ONLY
    public plugin_precache( )
    {
      // Read the access flag
      new access_flag = read_flags( g_access_flag )
      new i
     
      // Precache the play sounds
      for (i = 0; i < sizeof g_play_sounds; i++)
      precache_sound( g_play_sounds[i] )
     
      // Precache the ambience sounds
      #if defined AMBIENCE_SOUNDS
      new sound[100]
      for (i = 0; i < sizeof g_sound_ambience; i++)
      {
      if (equal(g_sound_ambience[i][strlen(g_sound_ambience[i])-4], ".mp3"))
      {
          formatex(sound, sizeof sound - 1, "sound/%s", g_sound_ambience[i])
          precache_generic( sound )
      }
      else
      {
          precache_sound( g_sound_ambience[i] )
      }
    }
    #endif

    // Register our game mode
    g_gameid = zp_register_game_mode( "Nightmare Mode", access_flag, g_chance, 0, ZP_DM_BALANCE )
    }

    // Player spawn post
    // Player spawn post
    public zp_player_spawn_post( id )
    {
    // Check for current mode
    if( zp_get_current_mode() == g_gameid )
    {
      // Check if the player is a zombie
      if( zp_get_user_zombie( id ))
         
          switch(random_num(1,7))
          {
            case 1:
            {
                // Make him an assassin instead
                zp_make_user_assassin( id )
               
                // Set his health
                set_user_health( id, floatround(get_user_health(id) * get_pcvar_float(cvar_assahp)) )
            }
            case 2:
            {
                // Make him a sniper
                zp_make_user_sniper( id )
               
                // Set his health
                set_user_health( id, floatround(get_user_health(id) * get_pcvar_float(cvar_sniperhp)) )
            }
            case 3:
            {
                // Make him a sniper
                zp_make_user_nemesis( id )
               
                // Set his health
                set_user_health( id, floatround(get_user_health(id) * get_pcvar_float(cvar_nemhp)) )
            }
            case 4:
            {
                // Make him a sniper
                zp_make_user_survivor( id )
               
                // Set his health
                set_user_health( id, floatround(get_user_health(id) * get_pcvar_float(cvar_survhp)) )
            }
            case 5:
            {
                // Tranformando o jogador em jason
                zp_make_user_jason(id)
               
                // Ajeitando a Vida do jason
                set_user_health( id, floatround(get_user_health(id) * get_pcvar_float(cvar_jasonhp)) )
            }
           
            case 6:
            {
                // Tranformando o jogador em firebug
                zp_make_user_firebug(id)
               
                // Ajeitando a Vida do firebug
                set_user_health( id, floatround(get_user_health(id) * get_pcvar_float(cvar_firebughp)) )
            }
           
            case 7:
            {
                // Tranformando o jogador em arqueiro
                zp_make_user_arqueiro(id)
               
                // Ajeitando a Vida do arqueiro
                set_user_health( id, floatround(get_user_health(id) * get_pcvar_float(cvar_arqueirohp)) )
            }
          }
      }
    }

    public zp_round_started_pre( game )
    {
      // Check if it is our game mode
      if( game == g_gameid )
      {
          // Check for min players
          if( fn_get_alive_players() < get_pcvar_num(cvar_minplayers) )
          {
            /**
            * Note:
            * This very necessary, you should return ZP_PLUGIN_HANDLED if
            * some conditions required by your game mode are not met
            * This will inform the main plugin that you have rejected
            * the offer and so the main plugin will allow other game modes
            * to be given a chance
            */
            return ZP_PLUGIN_HANDLED
          }
          // Start our new mode
          start_night_mode( )
      }
      // Make the compiler happy =)
      return PLUGIN_CONTINUE
    }

    public zp_round_started( game, id )
    {
      // Check if it is our game mode
      if( game == g_gameid )
      {
          // Show HUD notice
          set_hudmessage(221, 156, 21, -1.0, 0.17, 1, 0.0, 5.0, 1.0, 1.0, -1)
          ShowSyncHudMsg(0, g_msg_sync, "Nightmare Mode !!!")
         
          // Play the starting sound
          client_cmd(0, "spk ^"%s^"", g_play_sounds[ random_num(0, sizeof g_play_sounds -1) ] )
         
          // Remove ambience task affects
          remove_task( TASK_AMB )
         
          // Set task to start ambience sounds
          #if defined AMBIENCE_SOUNDS
          set_task( 2.0, "start_ambience_sounds", TASK_AMB )
          #endif
      }
    }

    public zp_game_mode_selected( gameid, id )
    {
      // Check if our game mode was called
      if( gameid == g_gameid )
          start_night_mode( )
     
      // Make the compiler happy again =)
      return PLUGIN_CONTINUE
    }

    // This function contains the whole code behind this game mode
    start_night_mode( )
    {
      // Create and initialize some important vars
      static i_assassins, i_max_assassins, id, i_alive
      i_alive = fn_get_alive_players()
      id = 0
     
      // Get the no of players we have to turn into assassins
      i_max_assassins = floatround( ( i_alive * get_pcvar_float( cvar_ratio ) ), floatround_ceil )
      i_assassins = 0
     
      // Transformando os jogadores automaticamente em Assassinos/Nemesis
      while (i_assassins < i_max_assassins)
      {
          // Keep looping through all players
          if ( (++id) > g_maxplayers) id = 1
         
          // Dead
          if ( !is_user_alive(id) )
            continue;
         
          if (random_num(1, 5) == 1)
          {
            switch(random_num(1, 2))
            {
                case 1:
                {
                  // Tranformando o jogador em Assassino
                  zp_make_user_assassin(id)
                 
                  // Ajeitando a Vida do Assassino
                  set_user_health( id, floatround(get_user_health(id) * get_pcvar_float(cvar_assahp)) )
                }
                case 2:
                {
                  // Tranformando o jogador em survivor
                  zp_make_user_nemesis(id)
                 
                  // Ajeitando a Vida do Survivor
                  set_user_health( id, floatround(get_user_health(id) * get_pcvar_float(cvar_nemhp)) )
                }
            }
           
            // Increase counter
            i_assassins++
           
          }
      }
      // Turn the remaining players into snipers
      for (id = 1; id <= g_maxplayers; id++)
      {
          // Only those of them who are alive and are not assassins
          if ( !is_user_alive(id) || zp_get_user_assassin(id) || zp_get_user_nemesis(id))
            continue;
         
          switch(random_num(1, 5))
          {
            case 1:
            {
                // Tranformando o jogador em Sniper
                zp_make_user_sniper(id)
               
                // Ajeitando a Vida do Sniper
                set_user_health( id, floatround(get_user_health(id) * get_pcvar_float(cvar_sniperhp)) )
            }
            case 2:
            {
                // Tranformando o jogador em survivor
                zp_make_user_survivor(id)
               
                // Ajeitando a Vida do Survivor
                set_user_health( id, floatround(get_user_health(id) * get_pcvar_float(cvar_survhp)) )
            }
            case 3:
            {
                // Tranformando o jogador em jason
                zp_make_user_jason(id)
               
                // Ajeitando a Vida do jason
                set_user_health( id, floatround(get_user_health(id) * get_pcvar_float(cvar_jasonhp)) )
            }
           
            case 4:
            {
                // Tranformando o jogador em firebug
                zp_make_user_firebug(id)
               
                // Ajeitando a Vida do firebug
                set_user_health( id, floatround(get_user_health(id) * get_pcvar_float(cvar_firebughp)) )
            }
           
            case 5:
            {
                // Tranformando o jogador em arqueiro
                zp_make_user_arqueiro(id)
               
                // Ajeitando a Vida do arqueiro
                set_user_health( id, floatround(get_user_health(id) * get_pcvar_float(cvar_arqueirohp)) )
            }
          }
      }
    }



    #if defined AMBIENCE_SOUNDS
    public start_ambience_sounds( )
    {
      // Variables
      static amb_sound[64], sound, Float:duration
     
      // Select our ambience sound
      sound = random_num( 0, sizeof g_sound_ambience - 1 )
      copy( amb_sound, sizeof amb_sound - 1 , g_sound_ambience[ sound ] )
      duration = g_sound_ambience_duration[ sound ]
     
      // Check whether it's a wav or mp3, then play it on clients
      if ( equal( amb_sound[ strlen( amb_sound ) - 4 ], ".mp3" ) )
          client_cmd( 0, "mp3 play ^"sound/%s^"", amb_sound )
      else
          client_cmd( 0, "spk ^"%s^"", sound )
     
      // Start the ambience sounds
      set_task( duration, "start_ambience_sounds", TASK_AMB )
    }
    public zp_round_ended( winteam )
    {
      // Stop ambience sounds on round end
      remove_task( TASK_AMB )
      client_cmd(0, "mp3 stop")
    }
    #endif

    // This function returns the no. of alive players
    // Feel free to use this in your plugin when you
    // are making your own game modes.
    fn_get_alive_players( )
    {
      static i_alive, id
      i_alive = 0
     
      for ( id = 1; id <= g_maxplayers; id++ )
      {
          if( is_user_alive( id ) )
            i_alive++
      }
      return i_alive;
    }
    [D]etonado[R]
    [D]etonado[R]
    Humano


    Nick : [D]etonado[R]
    Masculino Número de Mensagens : 625
    Ammo Packs : 4244
    Honra : 20
    Data de inscrição : 17/10/2013

    [Modo] erro Empty Re: [Modo] erro

    Mensagem por [D]etonado[R] 23/10/2013, 8:23 pm

    Compilou certim se pegar vou da um @Edit aqui.

    @Edit

    Zplague12
    Sergio #
    Sergio #
    Moderador
    Moderador


    Masculino Número de Mensagens : 682
    Ammo Packs : 4371
    Honra : 44
    Data de inscrição : 16/02/2013

    [Modo] erro Empty Re: [Modo] erro

    Mensagem por Sergio # 23/10/2013, 8:35 pm

    [D]etonado[R] escreveu:Compilou certim se pegar vou da um @Edit aqui.

    @Edit

    Zplague12
    Mais atenção ao título dos tópicos, na próxima só vou fechar e mandar para o lixo.

    @Closed~~

    Conteúdo patrocinado


    [Modo] erro Empty Re: [Modo] erro

    Mensagem por Conteúdo patrocinado


      Data/hora atual: 23/11/2024, 12:37 pm