Cerere modificare autorestart

Modificari necesare ale pluginurilor

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Post Reply
User avatar
pgvd
Membru, skill +1
Membru, skill +1
Posts: 212
Joined: 15 Dec 2013, 23:15
Detinator Steam: Da
Has thanked: 36 times
Been thanked: 1 time
Contact:

29 Jan 2014, 23:53

Buna seara. As vrea sa se deie auto restart dupa prima runda, nu dupa a 2-a.
.SMA | Afiseaza codul
#include < amxmodx >

#define PLUGIN "New auto round restart"
#define VERSION "1.0"
#define AUTHOR "P.Of.Pw"

#define HUD_MESSAGES
#define MAX_COUNT 2

new g_Count

public plugin_init() 
{
   register_plugin( PLUGIN, VERSION, AUTHOR )
   register_event( "TextMsg", "event_gamecomencing", "a", "2&#Game_C" )
   
   register_event( "HLTV", "event_newround", "a", "1=0","2=0" )
   state START_FUNCTION
}

public event_gamecomencing() g_Count = 0

public event_newround() < BLOCK_FUNCTION > { }
public event_newround() < START_FUNCTION >
{
   if( g_Count++ == MAX_COUNT )
   {
      server_cmd( "sv_restart 1" )
      #if defined HUD_MESSAGES
      set_task( 3.0, "show_messages" )
      #endif
      state BLOCK_FUNCTION
   }
}

public show_messages()
{
   set_hudmessage( 255, 0, 0, -1.0, 0.19, 2, 6.0, 12.0, 0.1, 0.2, -1 )
   show_hudmessage( 0, "Game restart^nGL and  HF !" )
}
Multumesc si o seara placuta.
RoyalServer 2
#Vali
Fost moderator
Fost moderator
Posts: 2611
Joined: 24 Jan 2012, 11:00
Detinator Steam: Da
SteamID: id/spryt3
Reputatie: Fost Moderator
Fost Scripter eXtreamCS.com
1.2 / 3
Location: root
Has thanked: 81 times
Been thanked: 144 times
Contact:

30 Jan 2014, 11:25

| Afiseaza codul
#include < amxmodx >

#define PLUGIN "New auto round restart"
#define VERSION "1.0"
#define AUTHOR "P.Of.Pw"

#define HUD_MESSAGES
#define MAX_COUNT 1

new g_Count

public plugin_init() 
{
   register_plugin( PLUGIN, VERSION, AUTHOR )
   register_event( "TextMsg", "event_gamecomencing", "a", "2&#Game_C" )
   
   register_event( "HLTV", "event_newround", "a", "1=0","2=0" )
   state START_FUNCTION
}

public event_gamecomencing() g_Count = 0

public event_newround() < BLOCK_FUNCTION > { }
public event_newround() < START_FUNCTION >
{
   if( g_Count++ == MAX_COUNT )
   {
      server_cmd( "sv_restart 1" )
      #if defined HUD_MESSAGES
      set_task( 3.0, "show_messages" )
      #endif
      state BLOCK_FUNCTION
   }
}

public show_messages()
{
   set_hudmessage( 255, 0, 0, -1.0, 0.19, 2, 6.0, 12.0, 0.1, 0.2, -1 )
   show_hudmessage( 0, "Game restart^nGL and  HF !" )
}
User avatar
pgvd
Membru, skill +1
Membru, skill +1
Posts: 212
Joined: 15 Dec 2013, 23:15
Detinator Steam: Da
Has thanked: 36 times
Been thanked: 1 time
Contact:

30 Jan 2014, 11:49

Multumesc. Puteti da T/C
User avatar
zw0w # ROMANIA !
Fost moderator
Fost moderator
Posts: 1318
Joined: 16 Jul 2009, 23:29
Detinator Steam: Da
SteamID: roby93_extream
Reputatie: Fost moderator ajutator
Nume anterior: Roby93
Location: Piteşti
Has thanked: 165 times
Been thanked: 101 times

30 Jan 2014, 11:54

Si ca sa stii data viitoare, aici se facea modificarea

Code: Select all

#define MAX_COUNT 2
User avatar
pgvd
Membru, skill +1
Membru, skill +1
Posts: 212
Joined: 15 Dec 2013, 23:15
Detinator Steam: Da
Has thanked: 36 times
Been thanked: 1 time
Contact:

30 Jan 2014, 11:57

Da.. am observat.
Post Reply

Return to “Modificari pluginuri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 10 guests