Skocz do zawartości

Witamy w Nieoficjalnym polskim support'cie AMX Mod X

Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
  • Rozpoczynaj nowe tematy i odpowiedaj na inne
  • Zapisz się do tematów i for, aby otrzymywać automatyczne uaktualnienia
  • Dodawaj wydarzenia do kalendarza społecznościowego
  • Stwórz swój własny profil i zdobywaj nowych znajomych
  • Zdobywaj nowe doświadczenia

Dołączona grafika Dołączona grafika

Guest Message by DevFuse
 

Zdjęcie

Plugin do przerzucania graczy po x rundach


  • Nie możesz napisać tematu
  • Zaloguj się, aby dodać odpowiedź
4 odpowiedzi w tym temacie

#1 kijo

    Zaawansowany

  • Użytkownik

Reputacja: 19
Początkujący

  • Postów:141
  • GG:
  • Imię:Mateusz
  • Lokalizacja:Polska
Offline

Napisano 04.10.2012 17:27

A więc jak w temacie. Plugin który po 12 rundach przerzuca cały team do przeciwnej drużyny i zeruje im staty. Za pomoc daje plusiki ++ :) Dziękuje .
  • +
  • -
  • 0

#2 sNH.

    Czy MisieQ ukradł ciasteczko?

  • Power User

Reputacja: 299
Wszechwidzący

  • Postów:1 070
  • Steam:steam
  • Imię:Bartek
  • Lokalizacja:Ełk
Offline

Napisano 04.10.2012 17:33



/********************************************************************************
* Auto Team Switch Every X Rounds By *
* *
* Author: nikhilgupta345 *
* ------------------------------------------------------------------------ *
* Info: *
* This plugin allows you to switch sides of teams every set number *
* of rounds. Also gives a command to restart the number of rounds played. * *
* ------------------------------------------------------------------------ *
* Cvars: *
* amx_atsrounds - sets the number of rounds before a team switch occurs. *
* ------------------------------------------------------------------------ *
* Commands: *
* amx_roundrestart - restarts the number of rounds that have been played. *
* say /roundnumber - displays the amount of rounds that have been played. *
* ------------------------------------------------------------------------ *
* Credits: *
* Nextra - Giving suggestions and making the code more efficient. *
* Tirant - Giving suggestions as well and providing code for the delay. *
* Connormcleod - Final suggestions on optimizing code. *
* ------------------------------------------------------------------------ *
* Changelog: *
* v1.0 - Initial release *
* v1.01 - Fixed Bugs - Optimized Code *
* v1.1 - Fixed crashing with certain amount of people. *********************************
* v1.1.1 - Added new client command - /roundnumber, which displays the amount of rounds that have passed. *
* v1.2 - Further optimized. Changed name of cvar to make it easier to remember. Added comments. *
* *
* Plugin Main Thread: http://forums.alliedmods.net/showthread.php?p=1288262 *
* *
****************************************************************************************************************/

#include <amxmodx>
#include <amxmisc>
#include <cstrike>

#define PLUGIN "Auto Team Switcher"
#define VERSION "1.0"
#define AUTHOR "nikhilgupta345"

#pragma semicolon 1

new roundnumber = 0;
new Atsround;

public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR);

register_clcmd( "say /roundnumber", "sayRound" );
register_concmd( "amx_roundrestart", "restartnumber", ADMIN_KICK );

register_logevent( "roundend", 2, "1=Round_End" );
register_event( "TextMsg","restart","a","2&#Game_C", "2&#Game_W" ); // Event for "Game Commencing" TextMsg and "Game Will Restart in X Seconds" TextMsg

Atsround = register_cvar( "amx_atsrounds", "15" );

}

public sayRound( id )
{
client_print( id, print_chat, "The current round is %i.", roundnumber );
return PLUGIN_HANDLED;
}

public roundend()
{
roundnumber++;

if( roundnumber >= get_pcvar_num( Atsround ) )
{
new players[32], num;
get_players( players, num );

for( new i; i < num; i++ )
add_delay( players[i] ); // Prevent Server Crash with a lot of people.

}
}


public restartnumber( id, level, cid )
{
if( !cmd_access( id, level, cid, 1 ) )
return PLUGIN_HANDLED;

roundnumber = 0;
return PLUGIN_HANDLED;
}

public restart( id )
{
roundnumber = 0;
return PLUGIN_HANDLED;
}

public changeTeam( id )
{
switch( cs_get_user_team( id ) )
{
case CS_TEAM_CT: cs_set_user_team( id, CS_TEAM_T );

case CS_TEAM_T: cs_set_user_team( id, CS_TEAM_CT );
}

roundnumber = 0;
server_cmd("amx_roundrestart");
}

add_delay( id )
{
switch( id )
{
case 1..7: set_task( 0.1, "changeTeam", id );
case 8..15: set_task( 0.2, "changeTeam", id );
case 16..23: set_task( 0.3, "changeTeam", id );
case 24..32: set_task( 0.4, "changeTeam", id );
}
}


Cvar: amx_atsrounds - co ile rund ma zmieniać teamy


amx_roundrestart - restartuje grę.
say /roundnumber - wyświetla ilość rund, które zostały przegrane

Po x rundach plugin przeniesie drużyny i zrobi restart.
  • +
  • -
  • 1

#3 kijo

    Zaawansowany

  • Autor tematu
  • Użytkownik

Reputacja: 19
Początkujący

  • Postów:141
  • GG:
  • Imię:Mateusz
  • Lokalizacja:Polska
Offline

Napisano 04.10.2012 17:48

amx_roundrestart do caverów? Wgrałem go na serwer i owszem zmienia team ale dalej mamy takie samy staty.'
Plugin ma polegać na tym: TT wygrywa 12 rund i jest zmiana teamu, nie zależnie ile Ct ma wygranych. Ten plugin zmienia team co x rund ale łącznie, np: ustawiłem co 6 rund i on zmienia jak jest 3:3. I opisz jak mam zrobić ten reset + :)

Użytkownik kijo edytował ten post 04.10.2012 18:18

  • +
  • -
  • 0

#4 sNH.

    Czy MisieQ ukradł ciasteczko?

  • Power User

Reputacja: 299
Wszechwidzący

  • Postów:1 070
  • Steam:steam
  • Imię:Bartek
  • Lokalizacja:Ełk
Offline

Napisano 04.10.2012 18:30

Z tym restartem looknij teraz


/********************************************************************************
* Auto Team Switch Every X Rounds By *
* *
* Author: nikhilgupta345 *
* ------------------------------------------------------------------------ *
* Info: *
* This plugin allows you to switch sides of teams every set number *
* of rounds. Also gives a command to restart the number of rounds played. * *
* ------------------------------------------------------------------------ *
* Cvars: *
* amx_atsrounds - sets the number of rounds before a team switch occurs. *
* ------------------------------------------------------------------------ *
* Commands: *
* amx_roundrestart - restarts the number of rounds that have been played. *
* say /roundnumber - displays the amount of rounds that have been played. *
* ------------------------------------------------------------------------ *
* Credits: *
* Nextra - Giving suggestions and making the code more efficient. *
* Tirant - Giving suggestions as well and providing code for the delay. *
* Connormcleod - Final suggestions on optimizing code. *
* ------------------------------------------------------------------------ *
* Changelog: *
* v1.0 - Initial release *
* v1.01 - Fixed Bugs - Optimized Code *
* v1.1 - Fixed crashing with certain amount of people. *********************************
* v1.1.1 - Added new client command - /roundnumber, which displays the amount of rounds that have passed. *
* v1.2 - Further optimized. Changed name of cvar to make it easier to remember. Added comments. *
* *
* Plugin Main Thread: http://forums.allied...d.php?p=1288262 *
* *
****************************************************************************************************************/

#include <amxmodx>
#include <amxmisc>
#include <cstrike>

#define PLUGIN "Auto Team Switcher"
#define VERSION "1.0"
#define AUTHOR "nikhilgupta345"

#pragma semicolon 1

new roundnumber = 0;
new Atsround;

public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR);

register_clcmd( "say /roundnumber", "sayRound" );
register_concmd( "amx_roundrestart", "restartnumber", ADMIN_KICK );

register_logevent( "roundend", 2, "1=Round_End" );
register_event( "TextMsg","restart","a","2&#Game_C", "2&#Game_W" ); // Event for "Game Commencing" TextMsg and "Game Will Restart in X Seconds" TextMsg

Atsround = register_cvar( "amx_atsrounds", "15" );

}

public sayRound( id )
{
client_print( id, print_chat, "The current round is %i.", roundnumber );
return PLUGIN_HANDLED;
}

public roundend()
{
roundnumber++;

if( roundnumber >= get_pcvar_num( Atsround ) )
{
new players[32], num;
get_players( players, num );

for( new i; i < num; i++ )
add_delay( players[i] ); // Prevent Server Crash with a lot of people.

}
}


public restartnumber( id, level, cid )
{
if( !cmd_access( id, level, cid, 1 ) )
return PLUGIN_HANDLED;

roundnumber = 0;
return PLUGIN_HANDLED;
}

public restart( id )
{
roundnumber = 0;
return PLUGIN_HANDLED;
}

public changeTeam( id )
{
switch( cs_get_user_team( id ) )
{
case CS_TEAM_CT: cs_set_user_team( id, CS_TEAM_T );

case CS_TEAM_T: cs_set_user_team( id, CS_TEAM_CT );
}

roundnumber = 0;
server_cmd("amx_roundrestart 1");
}

add_delay( id )
{
switch( id )
{
case 1..7: set_task( 0.1, "changeTeam", id );
case 8..15: set_task( 0.2, "changeTeam", id );
case 16..23: set_task( 0.3, "changeTeam", id );
case 24..32: set_task( 0.4, "changeTeam", id );
}
}

  • +
  • -
  • 0

#5 kijo

    Zaawansowany

  • Autor tematu
  • Użytkownik

Reputacja: 19
Początkujący

  • Postów:141
  • GG:
  • Imię:Mateusz
  • Lokalizacja:Polska
Offline

Napisano 04.10.2012 18:58

Dalej tak samo, nic się nie zmieniło.
  • +
  • -
  • 0




Użytkownicy przeglądający ten temat: 0

0 użytkowników, 0 gości, 0 anonimowych