Cerere plugin [ priceputii in plugin`uri ] [rezolvat!]

Categoria cu cereri de pluginuri si nu numai.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Forum rules
Accesează link-ul pentru a putea vedea regulile forumului

Daca doriti sa vi se modifice un plugin, va rugam postati aici .
PoSiTiOn Of PoWeR
Utilizator banat
Utilizator banat
Posts: 2467
Joined: 28 Oct 2007, 12:18
Detinator Steam: Nu
Reputatie: Fost super moderator (suspendare 2 luni)
Fost scripter eXtreamCS
Nick anterior : AlinHD
1.6 / 3
Has thanked: 4 times
Been thanked: 116 times

14 Feb 2010, 09:44

| Afiseaza codul
[code]#include < amxmodx >
#include < hamsandwich >
#include < biohazard >

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "P.Of.Pw"

#define CAN_USE 1

new g_endround, g_maxplayers, g_use[ 33 ]

public plugin_init()
{
   register_plugin( PLUGIN, VERSION, AUTHOR )
   
   register_event( "HLTV", "event_round_start", "a", "1=0", "2=0" )
   register_logevent( "logevent_round_end", 2, "1=Round_End" )
   
   register_clcmd( "say /respawn", "spawn_user" )
   register_clcmd( "say /zspawn", "spawn_user" )
   register_clcmd( "say !spawn", "spawn_user" )
   
   g_maxplayers = get_maxplayers()
}

public event_round_start()
{
   g_endround = false
}

public logevent_round_end()
{
	g_endround = true
	for( new i = 1; i <= g_maxplayers; i++ )
	{
		if( !is_user_connected( i ) )
			continue;
		g_use[ i ] = 0
	}
}

public spawn_user( id )
{
   if( g_endround )
      return PLUGIN_HANDLED;
   if( !game_started() )
   {
      client_print( id, print_chat, "Inca nu a inceput runda. Incearca peste cateva momente!" )
      return PLUGIN_HANDLED;
   }
   if( is_user_alive( id ) )
   {
      client_print( id, print_chat, "Esti deja in viata!" )
      return PLUGIN_HANDLED;
   }
   g_use[ id ]++
   if( g_use[ id ] > CAN_USE )
   {
      client_print( id, print_chat, "Poti folosi doar %d comanda pe runda!", CAN_USE )
      return PLUGIN_HANDLED;
   }
   
   ExecuteHamB( Ham_CS_RoundRespawn, id )
   set_task( 1.0, "set_bh_zombie", id )
   
   return PLUGIN_HANDLED;
}

public set_bh_zombie( id )
{
   if( !is_user_connected( id ) )
      return;
     
   static name[ 32 ]
   get_user_name( id, name, 31 )
   server_cmd( "amx_show_activity 0" )
   server_cmd( "amx_infect %s", name )
   server_cmd( "amx_show_activity 2" )
}[/code]
Modifici aici
#define CAN_USE 1
de cate ori poate folosi comanda pe runda.
RoyalServer
MADE12
Membru, skill +1
Membru, skill +1
Posts: 137
Joined: 18 Sep 2009, 21:34
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com!
Has thanked: 11 times
Been thanked: 3 times

14 Feb 2010, 09:58

PoSiTiOn Of PoWeR wrote:
| Afiseaza codul
[code]#include < amxmodx >
#include < hamsandwich >
#include < biohazard >

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "P.Of.Pw"

#define CAN_USE 1

new g_endround, g_maxplayers, g_use[ 33 ]

public plugin_init()
{
   register_plugin( PLUGIN, VERSION, AUTHOR )
   
   register_event( "HLTV", "event_round_start", "a", "1=0", "2=0" )
   register_logevent( "logevent_round_end", 2, "1=Round_End" )
   
   register_clcmd( "say /respawn", "spawn_user" )
   register_clcmd( "say /zspawn", "spawn_user" )
   register_clcmd( "say !spawn", "spawn_user" )
   
   g_maxplayers = get_maxplayers()
}

public event_round_start()
{
   g_endround = false
}

public logevent_round_end()
{
	g_endround = true
	for( new i = 1; i <= g_maxplayers; i++ )
	{
		if( !is_user_connected( i ) )
			continue;
		g_use[ i ] = 0
	}
}

public spawn_user( id )
{
   if( g_endround )
      return PLUGIN_HANDLED;
   if( !game_started() )
   {
      client_print( id, print_chat, "Inca nu a inceput runda. Incearca peste cateva momente!" )
      return PLUGIN_HANDLED;
   }
   if( is_user_alive( id ) )
   {
      client_print( id, print_chat, "Esti deja in viata!" )
      return PLUGIN_HANDLED;
   }
   g_use[ id ]++
   if( g_use[ id ] > CAN_USE )
   {
      client_print( id, print_chat, "Poti folosi doar %d comanda pe runda!", CAN_USE )
      return PLUGIN_HANDLED;
   }
   
   ExecuteHamB( Ham_CS_RoundRespawn, id )
   set_task( 1.0, "set_bh_zombie", id )
   
   return PLUGIN_HANDLED;
}

public set_bh_zombie( id )
{
   if( !is_user_connected( id ) )
      return;
     
   static name[ 32 ]
   get_user_name( id, name, 31 )
   server_cmd( "amx_show_activity 0" )
   server_cmd( "amx_infect %s", name )
   server_cmd( "amx_show_activity 2" )
}[/code]
Modifici aici
#define CAN_USE 1
de cate ori poate folosi comanda pe runda.
>:D< daca ai stii cat iti multumesc . :* tie si lui crywolf .
http://www.georgeblog.info - Un blog pentru toti cititorii .


Image
User avatar
*Joker*
Membru, skill +1
Membru, skill +1
Posts: 297
Joined: 16 Jul 2009, 09:11
Detinator Steam: Da
Detinator server CS: Nu
SteamID: wicke7
Been thanked: 9 times

20 Feb 2010, 11:48

cum fac sa inceapa imediat fara sa scrie /zspawn?
PoSiTiOn Of PoWeR
Utilizator banat
Utilizator banat
Posts: 2467
Joined: 28 Oct 2007, 12:18
Detinator Steam: Nu
Reputatie: Fost super moderator (suspendare 2 luni)
Fost scripter eXtreamCS
Nick anterior : AlinHD
1.6 / 3
Has thanked: 4 times
Been thanked: 116 times

20 Feb 2010, 12:16

Pentru zombie plague sau biohazard ?
User avatar
*Joker*
Membru, skill +1
Membru, skill +1
Posts: 297
Joined: 16 Jul 2009, 09:11
Detinator Steam: Da
Detinator server CS: Nu
SteamID: wicke7
Been thanked: 9 times

20 Feb 2010, 18:01

biohazard b2.03 :D ..
PoSiTiOn Of PoWeR
Utilizator banat
Utilizator banat
Posts: 2467
Joined: 28 Oct 2007, 12:18
Detinator Steam: Nu
Reputatie: Fost super moderator (suspendare 2 luni)
Fost scripter eXtreamCS
Nick anterior : AlinHD
1.6 / 3
Has thanked: 4 times
Been thanked: 116 times

20 Feb 2010, 23:19

| Afiseaza codul
[code]#include < amxmodx >
#include < hamsandwich >
#include < biohazard >

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "P.Of.Pw"

new g_endround

public plugin_init() 
{
   register_plugin( PLUGIN, VERSION, AUTHOR )
   
   register_event( "HLTV", "event_round_start", "a", "1=0", "2=0" )
   register_logevent( "logevent_round_end", 2, "1=Round_End" )
   
   RegisterHam(Ham_Killed, "player", "fwd_PlayerKilled", 1)
}

public event_round_start()
{
   g_endround = false
}

public logevent_round_end()
{
   g_endround = true
}

public fwd_PlayerKilled(id)
{
   if( g_endround )
      return HAM_IGNORED;
   if( !game_started() )
      return HAM_IGNORED;
      
   set_task( 1.0, "ham_spawn", id )
   return HAM_IGNORED
}

public ham_spawn(id)
{
   if( !is_user_alive( id ) )
   {
      remove_task( id )  
      ExecuteHamB( Ham_CS_RoundRespawn, id )
      set_task( 1.0, "set_bh_zombie", id )
   }
}

public set_bh_zombie( id )
{
   if( !is_user_connected( id ) )
      return;
      
   static name[ 32 ]
   get_user_name( id, name, 31 )
   server_cmd( "amx_show_activity 0" )
   server_cmd( "amx_infect %s", name )
   server_cmd( "amx_show_activity 2" )
}[/code]
Post Reply

Return to “Cereri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 24 guests