Zumbis Online
Últimos assuntos
» [PEDIDO] Plugin Quiz
por [Dk]Serial-Killer 13/9/2017, 10:02 pm

» [PEDIDO] Limite de madness ZP50
por cancels 9/9/2017, 5:38 pm

» [PEDIDO] Midnight's Darkness para ZPA
por PRO DARK 7/9/2017, 5:45 pm

» fast dl
por william 31/8/2017, 3:51 pm

» [ZP 5.0.8] Zombie Madness LIMIT! Ajuda Por Favor
por cancels 29/7/2017, 10:36 pm

» [Dúvida]Limit Madness
por cancels 29/7/2017, 7:31 pm

» [Dúvida]Menu VIP
por cancels 29/7/2017, 7:30 pm

» [Duvida]Menu
por cancels 28/7/2017, 9:31 pm

» [Pedido] Som De Tiros
por N0th1ng 26/7/2017, 7:06 pm

» [PEDIDO] Mudando Menu VIP
por PRO DARK 22/7/2017, 9:37 am

Frases filosóficas Zplague:
....
Os membros mais ativos da semana

Adsense

[Pedido] Sma

Ver o tópico anterior Ver o tópico seguinte Ir em baixo

[Pedido] Sma

Mensagem por moglinh em 23/10/2013, 3:32 pm

Gente eu precisoo da Sma do Assasino alguem tem ?
me passa por favor

@Edit

E Tambem queriia esse Plugin com sma de preferencia



____________________________________________

Skype: abusadoszp:
Adicione Lá em :)
Nao esqueca !


Canal : https://www.facebook.com/JarobeiiOficial :
Se Inscrevam e De Joinha


Facebook : www.facebook.com.br/moglin.henrique :):


Coorraa ! :


Canal Youtube:
avatar
moglinh
Humano
Humano

Nick : Jarobeii
Masculino Número de Mensagens : 203
Ammo Packs : 2072
Honra : -27
Data de inscrição : 30/01/2012

Ver perfil do usuário abusadoszp

Voltar ao Topo Ir em baixo

Re: [Pedido] Sma

Mensagem por [D]etonado[R] em 23/10/2013, 3:55 pm

Ta ai
Código:
#include <amxmodx>
#include <amx_settings_api>
#include <cs_teams_api>
#include <zp50_gamemodes>
#include <zp50_class_assassin>
#include <zp50_deathmatch>
#include <zp50_items.inc>

new modo

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

// Default sounds
new const sound_assassin[][] = { "zombie_plague/assassin1.wav" , "zombie_plague/assassin2.wav" }

#define SOUND_MAX_LENGTH 64

new Array:g_sound_assassin

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

new g_MaxPlayers
new g_HudSync
new g_TargetPlayer

new cvar_assassin_chance, cvar_assassin_min_players
new cvar_assassin_show_hud, cvar_assassin_sounds
new cvar_assassin_allow_respawn
#include <hamsandwich>
public plugin_init()
{
   RegisterHam(Ham_Spawn, "player", "fw_PlayerSpawn_Post", 1);
}
public plugin_precache()
{
   // Register game mode at precache (plugin gets paused after this)
   register_plugin("[ZP] Game Mode: assassin", ZP_VERSION_STRING, "ZP Dev Team")
   zp_gamemodes_register("Assasin Mode")
   
   // Create the HUD Sync Objects
   g_HudSync = CreateHudSyncObj()
   
   g_MaxPlayers = get_maxplayers()
   
   cvar_assassin_chance = register_cvar("zp_assassin_chance", "20")
   cvar_assassin_min_players = register_cvar("zp_assassin_min_players", "0")
   cvar_assassin_show_hud = register_cvar("zp_assassin_show_hud", "1")
   cvar_assassin_sounds = register_cvar("zp_assassin_sounds", "1")
   cvar_assassin_allow_respawn = register_cvar("zp_assassin_allow_respawn", "0")
   
   // Initialize arrays
   g_sound_assassin = ArrayCreate(SOUND_MAX_LENGTH, 1)
   
   // Load from external file
   amx_load_setting_string_arr(ZP_SETTINGS_FILE, "Sounds", "ROUND ASSASSIN", g_sound_assassin)
   
   // If we couldn't load custom sounds from file, use and save default ones
   new index
   if (ArraySize(g_sound_assassin) == 0)
   {
      for (index = 0; index < sizeof sound_assassin; index++)
         ArrayPushString(g_sound_assassin, sound_assassin[index])
      
      // Save to external file
      amx_save_setting_string_arr(ZP_SETTINGS_FILE, "Sounds", "ROUND ASSASSIN", g_sound_assassin)
   }
   
   // Precache sounds
   new sound[SOUND_MAX_LENGTH]
   for (index = 0; index < ArraySize(g_sound_assassin); index++)
   {
      ArrayGetString(g_sound_assassin, 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_assassin_allow_respawn))
      return PLUGIN_HANDLED;
   
   return PLUGIN_CONTINUE;
}

public zp_fw_core_spawn_post(id)
{
   // Always respawn as human on assassin 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_assassin_chance)) != 1)
         return PLUGIN_HANDLED;
      
      // Min players
      if (GetAliveCount() < get_pcvar_num(cvar_assassin_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 assassin
   zp_class_assassin_set(g_TargetPlayer)

   
   // Remaining players should be humans (CTs)
   new id
   for (id = 1; id <= g_MaxPlayers; id++)
   {
      // Not alive
      if (!is_user_alive(id))
         continue;
      
      // This is our assassin
      if (zp_class_assassin_get(id))
         continue;
      
      // Switch to CT
      cs_set_player_team(id, CS_TEAM_CT)
   }
   
   // Play assassin sound
   if (get_pcvar_num(cvar_assassin_sounds))
   {
      new sound[SOUND_MAX_LENGTH]
      ArrayGetString(g_sound_assassin, random_num(0, ArraySize(g_sound_assassin) - 1), sound, charsmax(sound))
      PlaySoundToClients(sound)
   }
   
   if (get_pcvar_num(cvar_assassin_show_hud))
   {
      // Show assassin 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, "%s e o Assassino !!!", name)
   }
   modo = true
}

// 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;
}
public zp_fw_gamemodes_end()
{
   if(modo)
   modo = false
}
public zp_fw_items_select_pre(id, itemid, ignorecost)
{
   if(modo)
   {         
      return ZP_ITEM_DONT_SHOW;
   }
   //return HAM_IGNORED;
   return PLUGIN_CONTINUE
}
public fw_PlayerSpawn_Post(id)
{
   if(!modo)
      return PLUGIN_HANDLED
   
   if (zp_class_assassin_get(id))
      return PLUGIN_HANDLED
   
   if (!zp_core_is_zombie(id))
      return PLUGIN_HANDLED   
      
   zp_core_cure(id)
   
   return PLUGIN_HANDLED_MAIN   
}

Só falta converter  pra advance

@Edit

Ta ai como colocar essa mensaginha verde 

Link: http://zplague.forumclan.com/t5412-include-zp_tutor_print

____________________________________________

avatar
[D]etonado[R]
Humano
Humano

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

Ver perfil do usuário

Voltar ao Topo Ir em baixo

Re: [Pedido] Sma

Mensagem por 0wnderless em 23/10/2013, 4:09 pm

[D]etonado[R] escreveu:Ta ai
Código:
#include <amxmodx>
#include <amx_settings_api>
#include <cs_teams_api>
#include <zp50_gamemodes>
#include <zp50_class_assassin>
#include <zp50_deathmatch>
#include <zp50_items.inc>

new modo

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

// Default sounds
new const sound_assassin[][] = { "zombie_plague/assassin1.wav" , "zombie_plague/assassin2.wav" }

#define SOUND_MAX_LENGTH 64

new Array:g_sound_assassin

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

new g_MaxPlayers
new g_HudSync
new g_TargetPlayer

new cvar_assassin_chance, cvar_assassin_min_players
new cvar_assassin_show_hud, cvar_assassin_sounds
new cvar_assassin_allow_respawn
#include <hamsandwich>
public plugin_init()
{
 RegisterHam(Ham_Spawn, "player", "fw_PlayerSpawn_Post", 1);
}
public plugin_precache()
{
 // Register game mode at precache (plugin gets paused after this)
 register_plugin("[ZP] Game Mode: assassin", ZP_VERSION_STRING, "ZP Dev Team")
 zp_gamemodes_register("Assasin Mode")
 
// Create the HUD Sync Objects
 g_HudSync = CreateHudSyncObj()
 
g_MaxPlayers = get_maxplayers()
 
cvar_assassin_chance = register_cvar("zp_assassin_chance", "20")
 cvar_assassin_min_players = register_cvar("zp_assassin_min_players", "0")
 cvar_assassin_show_hud = register_cvar("zp_assassin_show_hud", "1")
 cvar_assassin_sounds = register_cvar("zp_assassin_sounds", "1")
 cvar_assassin_allow_respawn = register_cvar("zp_assassin_allow_respawn", "0")
 
// Initialize arrays
 g_sound_assassin = ArrayCreate(SOUND_MAX_LENGTH, 1)
 
// Load from external file
 amx_load_setting_string_arr(ZP_SETTINGS_FILE, "Sounds", "ROUND ASSASSIN", g_sound_assassin)
 
// If we couldn't load custom sounds from file, use and save default ones
 new index
 if (ArraySize(g_sound_assassin) == 0)
 {
 for (index = 0; index < sizeof sound_assassin; index++)
 ArrayPushString(g_sound_assassin, sound_assassin[index])
 
// Save to external file
 amx_save_setting_string_arr(ZP_SETTINGS_FILE, "Sounds", "ROUND ASSASSIN", g_sound_assassin)
 }
 
// Precache sounds
 new sound[SOUND_MAX_LENGTH]
 for (index = 0; index < ArraySize(g_sound_assassin); index++)
 {
 ArrayGetString(g_sound_assassin, 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_assassin_allow_respawn))
 return PLUGIN_HANDLED;
 
return PLUGIN_CONTINUE;
}

public zp_fw_core_spawn_post(id)
{
 // Always respawn as human on assassin 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_assassin_chance)) != 1)
 return PLUGIN_HANDLED;
 
// Min players
 if (GetAliveCount() < get_pcvar_num(cvar_assassin_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 assassin
 zp_class_assassin_set(g_TargetPlayer)

 
// Remaining players should be humans (CTs)
 new id
 for (id = 1; id <= g_MaxPlayers; id++)
 {
 // Not alive
 if (!is_user_alive(id))
 continue;
 
// This is our assassin
 if (zp_class_assassin_get(id))
 continue;
 
// Switch to CT
 cs_set_player_team(id, CS_TEAM_CT)
 }
 
// Play assassin sound
 if (get_pcvar_num(cvar_assassin_sounds))
 {
 new sound[SOUND_MAX_LENGTH]
 ArrayGetString(g_sound_assassin, random_num(0, ArraySize(g_sound_assassin) - 1), sound, charsmax(sound))
 PlaySoundToClients(sound)
 }
 
if (get_pcvar_num(cvar_assassin_show_hud))
 {
 // Show assassin 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, "%s e o Assassino !!!", name)
 }
 modo = true
}

// 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;
}
public zp_fw_gamemodes_end()
{
 if(modo)
 modo = false
}
public zp_fw_items_select_pre(id, itemid, ignorecost)
{
 if(modo)
 {
return ZP_ITEM_DONT_SHOW;
 }
 //return HAM_IGNORED;
 return PLUGIN_CONTINUE
}
public fw_PlayerSpawn_Post(id)
{
 if(!modo)
 return PLUGIN_HANDLED
 
if (zp_class_assassin_get(id))
 return PLUGIN_HANDLED
 
if (!zp_core_is_zombie(id))
 return PLUGIN_HANDLED

zp_core_cure(id)
 
return PLUGIN_HANDLED_MAIN
}

Só falta converter  pra advance

@Edit

Ta ai como colocar essa mensaginha verde 

Link: http://zplague.forumclan.com/t5412-include-zp_tutor_print
Não tem o plugin que ele pediu ai no post, ai so ta falando como arruma o erro.

____________________________________________

avatar
0wnderless
Moderador
Moderador

Masculino Número de Mensagens : 579
Love you Rafaella <3
Ammo Packs : 1818
Honra : 20
Data de inscrição : 24/08/2013

Ver perfil do usuário http://zplague.forumclan.com/ josh.griz1

Voltar ao Topo Ir em baixo

Re: [Pedido] Sma

Mensagem por Conteúdo patrocinado


Conteúdo patrocinado


Voltar ao Topo Ir em baixo

Ver o tópico anterior Ver o tópico seguinte Voltar ao Topo

- Tópicos similares

 
Permissão deste fórum:
Você não pode responder aos tópicos neste fórum