Auto Restart Round

Pluginuri facute de utilizatorii forumului eXtream.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Post Reply
User avatar
LondoN eXtream
Membru eXtream
Membru eXtream
Posts: 2755
Joined: 10 Oct 2014, 06:21
Detinator Steam: Da
SteamID: /id/london_extreamcs
Reputatie: Fost scripter eXtreamCS
Fost moderator ajutator
Membru Club eXtreamCS (6 luni)
Fond eXtream: 0
Location: Roman, Neamț
Has thanked: 3 times
Been thanked: 12 times

15 Dec 2018, 17:24

Descriere: Este un plugin de auto restart pentru serverele clasice.

Nume: Auto Round Restart
Versiune: 1.0
Autor: LondoN eXtream

Descarcare:
AutoRestartRound.sma | Afiseaza codul
#include < amxmodx >
#include < amxmisc >

new const PLUGIN [ ] =	"Auto Round Restart";
new const VERSION [ ] =	"1.0";
new const AUTHOR [ ] =	"LondoN eXtream";

new Players [ 32 ], Num, g_Count, iSec;
new MessageScreenFade;

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

	MessageScreenFade = 	get_user_msgid ( "ScreenFade" );

	register_event ( "TextMsg", "Event_Game", "a", "2&#Game_C" );
	register_event ( "HLTV", "Event_NewRound", "a", "1=0", "2=0" );
}

public Event_Game ( )	g_Count = 0;
public Event_NewRound ( )
{
	if ( g_Count++ == 1 )
	{
		server_cmd ( "sv_restart 1" );

		get_players ( Players, Num );

		for ( new i = 0; i < Num; i++ )
		{
			iSec = clamp ( ( 2 * (1<<12) ), 0, 0xFFFF );

			message_begin ( MSG_ONE_UNRELIABLE, MessageScreenFade, _, Players [ i ] );
			write_short ( iSec );
			write_short ( iSec );
			write_short ( 0x0001 );
			write_byte ( 0 );
			write_byte ( 127 );
			write_byte ( 255 );
			write_byte ( 255 );
			message_end ( );
		}

		new StringMap [ 32 ];
		new Players = get_playersnum ( );
		new MaxP = get_maxplayers ( );

		get_mapname ( StringMap, charsmax ( StringMap ) );

		Print ( 0, "^x04Live^x03 #^x04 Live^x03 #^x04 Live^x03 #^x04 Live^x03 #" );
		Print ( 0, "^x04[Auto Round Restart]^x01 We are^x03 %d^x01 /^x03 %d players connected.", Players, MaxP );
		Print ( 0, "^x04[Auto Round Restart]^x01 We are playing on map^x03 %s", StringMap );
		Print ( 0, "^x04Live^x03 #^x04 Live^x03 #^x04 Live^x03 #^x04 Live^x03 #" );
	}
}

stock Print(const id, const input[], any:...) {
    new count = 1, players[32];
    static msg[191];
    vformat(msg, 190, input, 3);
   
    if(id) players[0] = id;
    else get_players(players, count, "ch"); {
        for(new i = 0; i < count; i++) {
            if(is_user_connected(players)) {
                message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players);
                write_byte(players);
                write_string(msg);
                message_end();
            }
        }
    }
}


Instalare:
  • 1. AutoRestartRound.sma il puneti in fisierul scripting
    2. AutoRestartRound.amxx il puneti in fisierul plugins.
    3. Intrati in plugins.ini si adaugati:

    Code: Select all

    AutoRestartRound.amxx
Last edited by LondoN eXtream on 15 Dec 2018, 18:07, edited 1 time in total.
RoyalServer 2
User avatar
j a h k 0-
Membru, skill +4
Membru, skill +4
Posts: 1536
Joined: 26 Jan 2016, 10:24
Detinator Steam: Da
CS Status: segmentation fault
SteamID: /ID/jkhalibu
Reputatie: Utilizator neserios
Restrictie moderator [permanent]
Membru Club eXtreamCS (3 luni)
Nume anterior: Jah#
Fond eXtream: 0
Location: Chişinău, Republic Of Moldova
Has thanked: 69 times
Been thanked: 13 times
Contact:

15 Dec 2018, 17:27

Frumos, la serverele clasice merge sigur :D
Tranzactii efectuate cu succes.
| Afiseaza codul
anunturi/vand-cont-rockstar-gta-15euro- ... 49363.html
anunturi/vand-cont-rockstar-gta-euro-paypal-t349373.html
anunturi/cumpar-tema-ipb-t349335.html
anunturi/recomandare-utilizatori-pentru-tranzactii-t323814-60.html
anunturi/recomandare-utilizatori-pentru-tranzactii-t323814-72.html
post2692853.html#p2692853
anunturi/addons-furien-classic-cyby-t348802.html
Image
| Afiseaza codul
Image
Image
smileye
Fost moderator
Fost moderator
Posts: 4648
Joined: 12 Jun 2012, 15:18
Detinator Steam: Da
Reputatie: Fost moderator
Has thanked: 258 times
Been thanked: 38 times
Contact:

15 Dec 2018, 17:45

Si ce e asa diferit fata de clasicul autorestart?
In loc sa faci ceva diferit la ce am facut cerere de exemplu tu vrei bani, dar esti scripter ca faci un plugin care exista deja si e mult mai avansat decat al tau.
#Frumos #Scripter #Bravo!

Si sa iti dau si link ca urmatoarea ta intrebare sa ghicesc va fi "unde ai vazut ceva asemanator"?
https://forums.alliedmods.net/showthrea ... 8?p=789518
Sa nu mai zic ca sunt pe aici zeci de postari cu acest plugin chiar de autori romani.
User avatar
JaiLBreaK
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 1517
Joined: 05 Jan 2016, 18:17
Detinator Steam: Nu
Detinator server CS: Da
Reputatie: Membru Club eXtreamCS (2 luni)
Fost Scripter eXtreamCS
Fond eXtream: 0
Has thanked: 5 times
Been thanked: 10 times
Contact:

16 Dec 2018, 11:14

Sa inteleg ca mai nou toti primesc "scripter"
Nu e nevoie sa iti explic de ce am facut asta pentru ca esti "scripter" =]]]]
| Afiseaza codul
#include < amxmodx >

#define PLUGIN "Auto Round Restart"
#define VERSION "1.0"
#define AUTHOR "LondoN eXtream"

new g_Count

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

	register_event ( "TextMsg", "Event_Game", "a", "2&#Game_C" );
	register_event ( "HLTV", "Event_NewRound", "a", "1=0", "2=0" );
}

public Event_Game ( )	g_Count = 0;
public Event_NewRound ( )
{
	if ( g_Count++ == 1 )
	{
		new Players [ 32 ], Num, MessageScreenFade = get_user_msgid ( "ScreenFade" ),iSec = clamp ( ( 2 * (1<<12) ), 0, 0xFFFF );
		server_cmd ( "sv_restart 1" );
		get_players ( Players, Num );
		for ( new i = 0; i < Num; i++ )
		{
			message_begin ( MSG_ONE_UNRELIABLE, MessageScreenFade, _, Players [ i ] );
			write_short ( iSec );
			write_short ( iSec );
			write_short ( 0x0001 );
			write_byte ( 0 );
			write_byte ( 127 );
			write_byte ( 255 );
			write_byte ( 255 );
			message_end ( );
		}

		new StringMap [ 32 ];
		get_mapname ( StringMap, charsmax ( StringMap ) );

		Print ( 0, "^x04Live^x03 #^x04 Live^x03 #^x04 Live^x03 #^x04 Live^x03 #" );
		Print ( 0, "^x04[Auto Round Restart]^x01 We are^x03 %d^x01 /^x03 %d players connected.", get_playersnum ( ), get_maxplayers ( ));
		Print ( 0, "^x04[Auto Round Restart]^x01 We are playing on map^x03 %s", StringMap );
		Print ( 0, "^x04Live^x03 #^x04 Live^x03 #^x04 Live^x03 #^x04 Live^x03 #" );
	}
}

stock Print(const id, const input[], any:...) {
	new players[32],count = 1;
	static msg[191];
	vformat(msg, 190, input, 3);
	new SayTxt = get_user_msgid("SayText");

	if(id)
		players[0] = id;
	else
		get_players(players, count, "ch");

	for(new i = 0; i < count; i++)
	{
		if(is_user_connected(players))
		{
			message_begin(MSG_ONE_UNRELIABLE, SayTxt, _, players);
			write_byte(players);
			write_string(msg);
			message_end();
		}
	}
}
Image
CSGO Original Module[35%]
User avatar
AcridGamer
Membru, skill +2
Membru, skill +2
Posts: 658
Joined: 01 Dec 2016, 17:06
Detinator Steam: Da
CS Status: Very Good
Detinator server CS: Da
SteamID: acridgamer3
Fond eXtream: 0
Location: Tulcea
Contact:

19 Nov 2019, 21:44

autorestart.txt(61) : error 035: argument type mismatch (argument 1)
autorestart.txt(63) : error 035: argument type mismatch (argument 4)
autorestart.txt(64) : error 035: argument type mismatch (argument 1)

Da eroare la compilare
Tranzactii Reusite

Discord Click
[*1*] Click
[*2*] Click

[*3*] Click
[*4*] Click
[*5*] Click

"Un subscribe va rog Gamer Channel" By LORD KALU #KALUTU MAGIC

ImageImage
User avatar
levin
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 3844
Joined: 24 Aug 2011, 12:24
Detinator Steam: Da
CS Status:
Detinator server CS: ☯∴
SteamID: riseofevo
Reputatie: Scripter eXtreamCS
Nume anterior: Adryyy
Location: ҳ̸Ҳ̸ҳ
Discord: devilclass
Has thanked: 36 times
Been thanked: 594 times
Contact:

19 Nov 2019, 23:18

Code: Select all

#include < amxmodx >

#define PLUGIN "Auto Round Restart"
#define VERSION "1.0"
#define AUTHOR "LondoN eXtream"

new g_Count

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

	register_event ( "TextMsg", "Event_Game", "a", "2&#Game_C" );
	register_event ( "HLTV", "Event_NewRound", "a", "1=0", "2=0" );
}

public Event_Game ( )	g_Count = 0;
public Event_NewRound ( )
{
	if ( g_Count++ == 1 )
	{
		new Players [ 32 ], Num, MessageScreenFade = get_user_msgid ( "ScreenFade" ),iSec = clamp ( ( 2 * (1<<12) ), 0, 0xFFFF );
		server_cmd ( "sv_restart 1" );
		get_players ( Players, Num );
		for ( new i = 0; i < Num; i++ )
		{
			message_begin ( MSG_ONE_UNRELIABLE, MessageScreenFade, _, Players [ i ] );
			write_short ( iSec );
			write_short ( iSec );
			write_short ( 0x0001 );
			write_byte ( 0 );
			write_byte ( 127 );
			write_byte ( 255 );
			write_byte ( 255 );
			message_end ( );
		}

		new StringMap [ 32 ];
		get_mapname ( StringMap, charsmax ( StringMap ) );

		Print ( 0, "^x04Live^x03 #^x04 Live^x03 #^x04 Live^x03 #^x04 Live^x03 #" );
		Print ( 0, "^x04[Auto Round Restart]^x01 We are^x03 %d^x01 /^x03 %d players connected.", get_playersnum ( ), get_maxplayers ( ));
		Print ( 0, "^x04[Auto Round Restart]^x01 We are playing on map^x03 %s", StringMap );
		Print ( 0, "^x04Live^x03 #^x04 Live^x03 #^x04 Live^x03 #^x04 Live^x03 #" );
	}
}

stock Print(const id, const input[], any:...) {
	new players[32],count = 1;
	static msg[191];
	vformat(msg, 190, input, 3);
	new SayTxt = get_user_msgid("SayText");

	if(id)
		players[0] = id;
	else
		get_players(players, count, "ch");

	for(new i = 0; i < count; i++)
	{
		if(is_user_connected(players[i]))
		{
			message_begin(MSG_ONE_UNRELIABLE, SayTxt, _, players[i]);
			write_byte(players[i]);
			write_string(msg);
			message_end();
		}
	}
}
Pentru ajutor, faceți cerere bine detaliată, completând și respectând modelul corespunzător.
Nu-mi mai dați cereri doar pentru a mă avea în lista de prieteni.
Dacă te ajut, și mă ignori/etc > te adaug în „foe”.
Aveți grijă la cei ce încearcă să mă copieze sau să dea drept mine..Puteți lua legătura cu mine prin STEAM dacă aveți o problemă/nelămurire în acest caz! Cont de forum am doar aici.
În cazul în care utilizați ceva din ce am postat(ex: aici), e bine să fiți la curent cu modificările aduse și de aici, iar dacă sunt ceva probleme nu ezitați să luați legătura cu mine. Actualizarea unor coduri nu se vor afișa public, doar dacă se găsește ceva critic/urgent de remediat, unele fiind coduri vechi iar unele refăcute chiar recent dar private.
* Nume pe cs1.6: eVoLuTiOn \ Nume vechi: eVo
* Atelierul meu - post2819572.html#p2819572 (închis, click link ca să vedeți de ce)
Post Reply

Return to “Pluginuri eXtream”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 18 guests