plugin gamemode sniper 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

    plugin gamemode sniper

    cancels
    cancels
    Humano


    Nick : ByVodka
    Masculino Número de Mensagens : 66
    Woow!!
    Ammo Packs : 2691
    Honra : 1
    Data de inscrição : 25/06/2017

    plugin gamemode sniper Empty plugin gamemode sniper

    Mensagem por cancels 18/11/2017, 8:10 pm

    em qual local eu tenho que altera para adiciona nemesis no lugar dos zm

    ex: quando inicia o modo, e escolhido somente 1 sniper e o restante dos player todos vira zombies

    queria fazer que na hora que ativar o modo, selecionar somente 1 sniper e o restante virar tudo nemesis.

    Código:
    #include <amxmodx>
    #include <amx_settings_api>
    #include <zp50_gamemodes>
    #include <zp50_class_sniper>
    #include <zp50_deathmatch>

    // Settings file
    new const ZP_SETTINGS_FILE[] = "zombieplague.ini"

    // Default sounds
    new const sound_sniper[][] = { "zombie_plague/survivor1.wav" , "zombie_plague/survivor2.wav" }

    #define SOUND_MAX_LENGTH 64

    new Array:g_sound_sniper

    // HUD messages
    #define HUD_EVENT_X -1.0
    #define HUD_EVENT_Y 0.17
    #define HUD_EVENT_R 20
    #define HUD_EVENT_G 20
    #define HUD_EVENT_B 255

    new g_MaxPlayers
    new g_HudSync
    new g_TargetPlayer

    new cvar_sniper_chance, cvar_sniper_min_players
    new cvar_sniper_show_hud, cvar_sniper_sounds
    new cvar_sniper_allow_respawn

    public plugin_precache()
    {
       // Register game mode at precache (plugin gets paused after this)
       register_plugin("[ZP] Game Mode: sniper", ZP_VERSION_STRING, "ZP Dev Team")
       zp_gamemodes_register("Sniper Mode")
       
       // Create the HUD Sync Objects
       g_HudSync = CreateHudSyncObj()
       
       g_MaxPlayers = get_maxplayers()
       
       cvar_sniper_chance = register_cvar("zp_sniper_chance", "20")
       cvar_sniper_min_players = register_cvar("zp_sniper_min_players", "0")
       cvar_sniper_show_hud = register_cvar("zp_sniper_show_hud", "1")
       cvar_sniper_sounds = register_cvar("zp_sniper_sounds", "1")
       cvar_sniper_allow_respawn = register_cvar("zp_sniper_allow_respawn", "0")
       
       // Initialize arrays
       g_sound_sniper = ArrayCreate(SOUND_MAX_LENGTH, 1)
       
       // Load from external file
       amx_load_setting_string_arr(ZP_SETTINGS_FILE, "Sounds", "ROUND SNIPER", g_sound_sniper)
       
       // If we couldn't load custom sounds from file, use and save default ones
       new index
       if (ArraySize(g_sound_sniper) == 0)
       {
          for (index = 0; index < sizeof sound_sniper; index++)
             ArrayPushString(g_sound_sniper, sound_sniper[index])
          
          // Save to external file
          amx_save_setting_string_arr(ZP_SETTINGS_FILE, "Sounds", "ROUND SNIPER", g_sound_sniper)
       }
       
       // Precache sounds
       new sound[SOUND_MAX_LENGTH]
       for (index = 0; index < ArraySize(g_sound_sniper); index++)
       {
          ArrayGetString(g_sound_sniper, index, sound, charsmax(sound))
          if (equal(sound[strlen(sound)-4], ".mp3"))
          {
             format(sound, charsmax(sound), "sound/%s", sound)
             precache_generic(sound)
          }
          else
             precache_sound(sound)
       }
    }

    // Deathmatch module's player respawn forward
    public zp_fw_deathmatch_respawn_pre(id)
    {
       // Respawning allowed?
       if (!get_pcvar_num(cvar_sniper_allow_respawn))
          return PLUGIN_HANDLED;
       
       return PLUGIN_CONTINUE;
    }

    public zp_fw_core_spawn_post(id)
    {
       // Always respawn as human on sniper rounds
       zp_core_respawn_as_zombie(id, false)
    }

    public zp_fw_gamemodes_choose_pre(game_mode_id, skipchecks)
    {
       if (!skipchecks)
       {
          // Random chance
          if (random_num(1, get_pcvar_num(cvar_sniper_chance)) != 1)
             return PLUGIN_HANDLED;
          
          // Min players
          if (GetAliveCount() < get_pcvar_num(cvar_sniper_min_players))
             return PLUGIN_HANDLED;
       }
       
       // Game mode allowed
       return PLUGIN_CONTINUE;
    }

    public zp_fw_gamemodes_choose_post(game_mode_id, target_player)
    {
       // Pick player randomly?
       g_TargetPlayer = (target_player == RANDOM_TARGET_PLAYER) ? GetRandomAlive(random_num(1, GetAliveCount())) : target_player
    }

    public zp_fw_gamemodes_start()
    {
       // Turn player into sniper
       zp_class_sniper_set(g_TargetPlayer)
       
       // Turn the remaining players into zombies
       new id
       for (id = 1; id <= g_MaxPlayers; id++)
       {
          // Not alive
          if (!is_user_alive(id))
             continue;
          
          // sniper or already a zombie
          if (zp_class_sniper_get(id) || zp_core_is_zombie(id))
             continue;
          
          zp_core_infect(id)
       }
       
       // Play sniper sound
       if (get_pcvar_num(cvar_sniper_sounds))
       {
          new sound[SOUND_MAX_LENGTH]
          ArrayGetString(g_sound_sniper, random_num(0, ArraySize(g_sound_sniper) - 1), sound, charsmax(sound))
          PlaySoundToClients(sound)
       }
       
       if (get_pcvar_num(cvar_sniper_show_hud))
       {
          // Show sniper HUD notice
          new name[32]
          get_user_name(g_TargetPlayer, name, charsmax(name))
          set_hudmessage(HUD_EVENT_R, HUD_EVENT_G, HUD_EVENT_B, HUD_EVENT_X, HUD_EVENT_Y, 1, 0.0, 5.0, 1.0, 1.0, -1)
          ShowSyncHudMsg(0, g_HudSync, "%L", LANG_PLAYER, "NOTICE_SNIPER", name)
       }
    }

    // Plays a sound on clients
    PlaySoundToClients(const sound[])
    {
       if (equal(sound[strlen(sound)-4], ".mp3"))
          client_cmd(0, "mp3 play ^"sound/%s^"", sound)
       else
          client_cmd(0, "spk ^"%s^"", sound)
    }

    // Get Alive Count -returns alive players number-
    GetAliveCount()
    {
       new iAlive, id
       
       for (id = 1; id <= g_MaxPlayers; id++)
       {
          if (is_user_alive(id))
             iAlive++
       }
       
       return iAlive;
    }

    // Get Random Alive -returns index of alive player number target_index -
    GetRandomAlive(target_index)
    {
       new iAlive, id
       
       for (id = 1; id <= g_MaxPlayers; id++)
       {
          if (is_user_alive(id))
             iAlive++
          
          if (iAlive == target_index)
             return id;
       }
       
       return -1;
    }
    Biel-oGrande
    Biel-oGrande
    Humano


    Nick : Biel-oGrande
    Masculino Número de Mensagens : 302
    Ammo Packs : 4480
    Honra : -6
    Data de inscrição : 05/09/2012

    plugin gamemode sniper Empty Re: plugin gamemode sniper

    Mensagem por Biel-oGrande 20/11/2017, 2:19 pm

    Não sei mas tentar trocar

    if (zp_class_sniper_get(id) || zp_core_is_zombie(id))

    para

    if (zp_class_sniper_get(id) || zp_core_is_nemesis(id))

    não sei como é o zp50
    [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

    plugin gamemode sniper Empty Re: plugin gamemode sniper

    Mensagem por [P]erfec[T] [S]cr[@]s[H] 20/11/2017, 6:22 pm

    Código:
    #include <amxmodx>
    #include <amx_settings_api>
    #include <zp50_gamemodes>
    #include <zp50_class_sniper>
    #include <zp50_class_nemesis>
    #include <zp50_deathmatch>

    // Settings file
    new const ZP_SETTINGS_FILE[] = "zombieplague.ini"

    // Default sounds
    new const sound_sniper[][] = { "zombie_plague/survivor1.wav" , "zombie_plague/survivor2.wav" }

    #define SOUND_MAX_LENGTH 64

    new Array:g_sound_sniper

    // HUD messages
    #define HUD_EVENT_X -1.0
    #define HUD_EVENT_Y 0.17
    #define HUD_EVENT_R 20
    #define HUD_EVENT_G 20
    #define HUD_EVENT_B 255

    new g_MaxPlayers
    new g_HudSync
    new g_TargetPlayer

    new cvar_sniper_chance, cvar_sniper_min_players
    new cvar_sniper_show_hud, cvar_sniper_sounds
    new cvar_sniper_allow_respawn

    public plugin_precache()
    {
      // Register game mode at precache (plugin gets paused after this)
      register_plugin("[ZP] Game Mode: sniper", ZP_VERSION_STRING, "ZP Dev Team")
      zp_gamemodes_register("Sniper Mode")
     
      // Create the HUD Sync Objects
      g_HudSync = CreateHudSyncObj()
     
      g_MaxPlayers = get_maxplayers()
     
      cvar_sniper_chance = register_cvar("zp_sniper_chance", "20")
      cvar_sniper_min_players = register_cvar("zp_sniper_min_players", "0")
      cvar_sniper_show_hud = register_cvar("zp_sniper_show_hud", "1")
      cvar_sniper_sounds = register_cvar("zp_sniper_sounds", "1")
      cvar_sniper_allow_respawn = register_cvar("zp_sniper_allow_respawn", "0")
     
      // Initialize arrays
      g_sound_sniper = ArrayCreate(SOUND_MAX_LENGTH, 1)
     
      // Load from external file
      amx_load_setting_string_arr(ZP_SETTINGS_FILE, "Sounds", "ROUND SNIPER", g_sound_sniper)
     
      // If we couldn't load custom sounds from file, use and save default ones
      new index
      if (ArraySize(g_sound_sniper) == 0)
      {
          for (index = 0; index < sizeof sound_sniper; index++)
            ArrayPushString(g_sound_sniper, sound_sniper[index])
         
          // Save to external file
          amx_save_setting_string_arr(ZP_SETTINGS_FILE, "Sounds", "ROUND SNIPER", g_sound_sniper)
      }
     
      // Precache sounds
      new sound[SOUND_MAX_LENGTH]
      for (index = 0; index < ArraySize(g_sound_sniper); index++)
      {
          ArrayGetString(g_sound_sniper, index, sound, charsmax(sound))
          if (equal(sound[strlen(sound)-4], ".mp3"))
          {
            format(sound, charsmax(sound), "sound/%s", sound)
            precache_generic(sound)
          }
          else
            precache_sound(sound)
      }
    }

    // Deathmatch module's player respawn forward
    public zp_fw_deathmatch_respawn_pre(id)
    {
      // Respawning allowed?
      if (!get_pcvar_num(cvar_sniper_allow_respawn))
          return PLUGIN_HANDLED;
     
      return PLUGIN_CONTINUE;
    }

    public zp_fw_core_spawn_post(id)
    {
      // Always respawn as human on sniper rounds
      zp_core_respawn_as_zombie(id, false)
    }

    public zp_fw_gamemodes_choose_pre(game_mode_id, skipchecks)
    {
      if (!skipchecks)
      {
          // Random chance
          if (random_num(1, get_pcvar_num(cvar_sniper_chance)) != 1)
            return PLUGIN_HANDLED;
         
          // Min players
          if (GetAliveCount() < get_pcvar_num(cvar_sniper_min_players))
            return PLUGIN_HANDLED;
      }
     
      // Game mode allowed
      return PLUGIN_CONTINUE;
    }

    public zp_fw_gamemodes_choose_post(game_mode_id, target_player)
    {
      // Pick player randomly?
      g_TargetPlayer = (target_player == RANDOM_TARGET_PLAYER) ? GetRandomAlive(random_num(1, GetAliveCount())) : target_player
    }

    public zp_fw_gamemodes_start()
    {
      // Turn player into sniper
      zp_class_sniper_set(g_TargetPlayer)
     
      // Turn the remaining players into zombies
      new id
      for (id = 1; id <= g_MaxPlayers; id++)
      {
          // Not alive
          if (!is_user_alive(id))
            continue;
         
          // sniper or already a zombie
          if (zp_class_sniper_get(id) || zp_class_nemesis_get(id))
            continue;
         
          zp_class_nemesis_set(id)
      }
     
      // Play sniper sound
      if (get_pcvar_num(cvar_sniper_sounds))
      {
          new sound[SOUND_MAX_LENGTH]
          ArrayGetString(g_sound_sniper, random_num(0, ArraySize(g_sound_sniper) - 1), sound, charsmax(sound))
          PlaySoundToClients(sound)
      }
     
      if (get_pcvar_num(cvar_sniper_show_hud))
      {
          // Show sniper HUD notice
          new name[32]
          get_user_name(g_TargetPlayer, name, charsmax(name))
          set_hudmessage(HUD_EVENT_R, HUD_EVENT_G, HUD_EVENT_B, HUD_EVENT_X, HUD_EVENT_Y, 1, 0.0, 5.0, 1.0, 1.0, -1)
          ShowSyncHudMsg(0, g_HudSync, "%L", LANG_PLAYER, "NOTICE_SNIPER", name)
      }
    }

    // Plays a sound on clients
    PlaySoundToClients(const sound[])
    {
      if (equal(sound[strlen(sound)-4], ".mp3"))
          client_cmd(0, "mp3 play ^"sound/%s^"", sound)
      else
          client_cmd(0, "spk ^"%s^"", sound)
    }

    // Get Alive Count -returns alive players number-
    GetAliveCount()
    {
      new iAlive, id
     
      for (id = 1; id <= g_MaxPlayers; id++)
      {
          if (is_user_alive(id))
            iAlive++
      }
     
      return iAlive;
    }

    // Get Random Alive -returns index of alive player number target_index -
    GetRandomAlive(target_index)
    {
      new iAlive, id
     
      for (id = 1; id <= g_MaxPlayers; id++)
      {
          if (is_user_alive(id))
            iAlive++
         
          if (iAlive == target_index)
            return id;
      }
     
      return -1;
    }
    cancels
    cancels
    Humano


    Nick : ByVodka
    Masculino Número de Mensagens : 66
    Woow!!
    Ammo Packs : 2691
    Honra : 1
    Data de inscrição : 25/06/2017

    plugin gamemode sniper Empty Re: plugin gamemode sniper

    Mensagem por cancels 20/11/2017, 7:09 pm

    Biel-oGrande escreveu:Não sei mas tentar trocar

    if (zp_class_sniper_get(id) || zp_core_is_zombie(id))

    para

    if (zp_class_sniper_get(id) || zp_core_is_nemesis(id))

    não sei como é o zp50

    eu ja tinha tentado isso tambem achando que era so ai deu error na hora de compilar ^^
    Biel-oGrande
    Biel-oGrande
    Humano


    Nick : Biel-oGrande
    Masculino Número de Mensagens : 302
    Ammo Packs : 4480
    Honra : -6
    Data de inscrição : 05/09/2012

    plugin gamemode sniper Empty Re: plugin gamemode sniper

    Mensagem por Biel-oGrande 21/11/2017, 12:31 pm

    cancels escreveu:
    Biel-oGrande escreveu:Não sei mas tentar trocar

    if (zp_class_sniper_get(id) || zp_core_is_zombie(id))

    para

    if (zp_class_sniper_get(id) || zp_core_is_nemesis(id))

    não sei como é o zp50

    eu ja tinha tentado isso tambem achando que era so ai deu error na hora de compilar ^^
    pse zp_class_nemesis_get

    fora q ainda tem a include do zp50 q tudo é separado 
    zp50_class_nemesis.inc
    cancels
    cancels
    Humano


    Nick : ByVodka
    Masculino Número de Mensagens : 66
    Woow!!
    Ammo Packs : 2691
    Honra : 1
    Data de inscrição : 25/06/2017

    plugin gamemode sniper Empty Re: plugin gamemode sniper

    Mensagem por cancels 22/11/2017, 12:44 am

    Biel-oGrande escreveu:
    cancels escreveu:
    Biel-oGrande escreveu:Não sei mas tentar trocar

    if (zp_class_sniper_get(id) || zp_core_is_zombie(id))

    para

    if (zp_class_sniper_get(id) || zp_core_is_nemesis(id))

    não sei como é o zp50

    eu ja tinha tentado isso tambem achando que era so ai deu error na hora de compilar ^^
    pse zp_class_nemesis_get

    fora q ainda tem a include do zp50 q tudo é separado 
    zp50_class_nemesis.inc


    verdade nao e tao facil igual eu imaginava eu to tentando aqui mais nao da certo de jeito nenhum
    cancels
    cancels
    Humano


    Nick : ByVodka
    Masculino Número de Mensagens : 66
    Woow!!
    Ammo Packs : 2691
    Honra : 1
    Data de inscrição : 25/06/2017

    plugin gamemode sniper Empty Re: plugin gamemode sniper

    Mensagem por cancels 22/11/2017, 12:58 am

    [P]erfec[T] [S]cr[@]s[H] escreveu:
    Código:
    #include <amxmodx>
    #include <amx_settings_api>
    #include <zp50_gamemodes>
    #include <zp50_class_sniper>
    #include <zp50_class_nemesis>
    #include <zp50_deathmatch>

    // Settings file
    new const ZP_SETTINGS_FILE[] = "zombieplague.ini"

    // Default sounds
    new const sound_sniper[][] = { "zombie_plague/survivor1.wav" , "zombie_plague/survivor2.wav" }

    #define SOUND_MAX_LENGTH 64

    new Array:g_sound_sniper

    // HUD messages
    #define HUD_EVENT_X -1.0
    #define HUD_EVENT_Y 0.17
    #define HUD_EVENT_R 20
    #define HUD_EVENT_G 20
    #define HUD_EVENT_B 255

    new g_MaxPlayers
    new g_HudSync
    new g_TargetPlayer

    new cvar_sniper_chance, cvar_sniper_min_players
    new cvar_sniper_show_hud, cvar_sniper_sounds
    new cvar_sniper_allow_respawn

    public plugin_precache()
    {
       // Register game mode at precache (plugin gets paused after this)
       register_plugin("[ZP] Game Mode: sniper", ZP_VERSION_STRING, "ZP Dev Team")
       zp_gamemodes_register("Sniper Mode")
      
       // Create the HUD Sync Objects
       g_HudSync = CreateHudSyncObj()
      
       g_MaxPlayers = get_maxplayers()
      
       cvar_sniper_chance = register_cvar("zp_sniper_chance", "20")
       cvar_sniper_min_players = register_cvar("zp_sniper_min_players", "0")
       cvar_sniper_show_hud = register_cvar("zp_sniper_show_hud", "1")
       cvar_sniper_sounds = register_cvar("zp_sniper_sounds", "1")
       cvar_sniper_allow_respawn = register_cvar("zp_sniper_allow_respawn", "0")
      
       // Initialize arrays
       g_sound_sniper = ArrayCreate(SOUND_MAX_LENGTH, 1)
      
       // Load from external file
       amx_load_setting_string_arr(ZP_SETTINGS_FILE, "Sounds", "ROUND SNIPER", g_sound_sniper)
      
       // If we couldn't load custom sounds from file, use and save default ones
       new index
       if (ArraySize(g_sound_sniper) == 0)
       {
          for (index = 0; index < sizeof sound_sniper; index++)
             ArrayPushString(g_sound_sniper, sound_sniper[index])
          
          // Save to external file
          amx_save_setting_string_arr(ZP_SETTINGS_FILE, "Sounds", "ROUND SNIPER", g_sound_sniper)
       }
      
       // Precache sounds
       new sound[SOUND_MAX_LENGTH]
       for (index = 0; index < ArraySize(g_sound_sniper); index++)
       {
          ArrayGetString(g_sound_sniper, index, sound, charsmax(sound))
          if (equal(sound[strlen(sound)-4], ".mp3"))
          {
             format(sound, charsmax(sound), "sound/%s", sound)
             precache_generic(sound)
          }
          else
             precache_sound(sound)
       }
    }

    // Deathmatch module's player respawn forward
    public zp_fw_deathmatch_respawn_pre(id)
    {
       // Respawning allowed?
       if (!get_pcvar_num(cvar_sniper_allow_respawn))
          return PLUGIN_HANDLED;
      
       return PLUGIN_CONTINUE;
    }

    public zp_fw_core_spawn_post(id)
    {
       // Always respawn as human on sniper rounds
       zp_core_respawn_as_zombie(id, false)
    }

    public zp_fw_gamemodes_choose_pre(game_mode_id, skipchecks)
    {
       if (!skipchecks)
       {
          // Random chance
          if (random_num(1, get_pcvar_num(cvar_sniper_chance)) != 1)
             return PLUGIN_HANDLED;
          
          // Min players
          if (GetAliveCount() < get_pcvar_num(cvar_sniper_min_players))
             return PLUGIN_HANDLED;
       }
      
       // Game mode allowed
       return PLUGIN_CONTINUE;
    }

    public zp_fw_gamemodes_choose_post(game_mode_id, target_player)
    {
       // Pick player randomly?
       g_TargetPlayer = (target_player == RANDOM_TARGET_PLAYER) ? GetRandomAlive(random_num(1, GetAliveCount())) : target_player
    }

    public zp_fw_gamemodes_start()
    {
       // Turn player into sniper
       zp_class_sniper_set(g_TargetPlayer)
      
       // Turn the remaining players into zombies
       new id
       for (id = 1; id <= g_MaxPlayers; id++)
       {
          // Not alive
          if (!is_user_alive(id))
             continue;
          
          // sniper or already a zombie
          if (zp_class_sniper_get(id) || zp_class_nemesis_get(id))
             continue;
          
          zp_class_nemesis_set(id)
       }
      
       // Play sniper sound
       if (get_pcvar_num(cvar_sniper_sounds))
       {
          new sound[SOUND_MAX_LENGTH]
          ArrayGetString(g_sound_sniper, random_num(0, ArraySize(g_sound_sniper) - 1), sound, charsmax(sound))
          PlaySoundToClients(sound)
       }
      
       if (get_pcvar_num(cvar_sniper_show_hud))
       {
          // Show sniper HUD notice
          new name[32]
          get_user_name(g_TargetPlayer, name, charsmax(name))
          set_hudmessage(HUD_EVENT_R, HUD_EVENT_G, HUD_EVENT_B, HUD_EVENT_X, HUD_EVENT_Y, 1, 0.0, 5.0, 1.0, 1.0, -1)
          ShowSyncHudMsg(0, g_HudSync, "%L", LANG_PLAYER, "NOTICE_SNIPER", name)
       }
    }

    // Plays a sound on clients
    PlaySoundToClients(const sound[])
    {
       if (equal(sound[strlen(sound)-4], ".mp3"))
          client_cmd(0, "mp3 play ^"sound/%s^"", sound)
       else
          client_cmd(0, "spk ^"%s^"", sound)
    }

    // Get Alive Count -returns alive players number-
    GetAliveCount()
    {
       new iAlive, id
      
       for (id = 1; id <= g_MaxPlayers; id++)
       {
          if (is_user_alive(id))
             iAlive++
       }
      
       return iAlive;
    }

    // Get Random Alive -returns index of alive player number target_index -
    GetRandomAlive(target_index)
    {
       new iAlive, id
      
       for (id = 1; id <= g_MaxPlayers; id++)
       {
          if (is_user_alive(id))
             iAlive++
          
          if (iAlive == target_index)
             return id;
       }
      
       return -1;
    }


    deu certinho aqui valeu  [P]erfec[T] [S]cr[@]s[H] pela força;

    +REP




    Biel-oGrande  Brigadao ai pela força tambem manin =D

    Conteúdo patrocinado


    plugin gamemode sniper Empty Re: plugin gamemode sniper

    Mensagem por Conteúdo patrocinado


      Data/hora atual: 23/11/2024, 1:52 am