[Cerere Plugin] restart la mapa dupa x kills

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 .
Post Reply
User avatar
Diablo.22
Membru, skill +1
Membru, skill +1
Posts: 287
Joined: 30 Apr 2020, 22:44
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com...!
Detinator server CS: CS.DARKNIGHT.RO
Fond eXtream: 0
Discord: Charis#6312
Has thanked: 5 times

12 Mar 2023, 12:22

Plugin Cerut: restart runda/harta pentru modul respawn
Descriere (adica ce face el mai exact): La X (250) numar de fraguri sa se dea rr la mapa automat (amx_cvar sv_restart 1)
Ai cautat pluginul?(daca da, precizeaza cum): da...
Serverul impune conditii strict HLDS/REHLDS?: nu
Necesita mod special?: respawn
Versiune AMXX Server:
Last edited by levin on 12 Mar 2023, 20:48, edited 1 time in total.
Reason: n ai căutat
RoyalServer 2
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

14 Mar 2023, 14:31

| Afiseaza codul
#include < amxmodx >
#include < amxmisc >

#define MAX_PLAYERS	32

new g_KillsCounting [ MAX_PLAYERS + 1 ], g_pcvar_kills;

public plugin_init ( ) {
	register_plugin ( "Reset on kills", "1.0", "LondoN eXtream" );
	register_event ( "DeathMsg", "pfn_ReadMessage", "a" );
	g_pcvar_kills = register_cvar ( "max_kills", "250" );
}

public pfn_ReadMessage ( ) {
	new id = read_data ( 1 ), victim = read_data ( 2 );
	
	if ( id == victim )	return;

	if ( g_KillsCounting [ id ] < get_pcvar_num ( g_pcvar_kills ) && is_user_alive ( id ) )
	{
		g_KillsCounting [ id ]++;

		pfn_CheckForNewData ( id );
	}
}

public pfn_CheckForNewData ( id ) {
	if ( g_KillsCounting [ id ] >= get_pcvar_num ( g_pcvar_kills ) ) {
		g_KillsCounting [ id ] = 0;
		server_cmd ( "amx_cvar sv_restart 1" );
	}
}
Cu placere.

max_kills 250 - cvar
Last edited by levin on 14 Mar 2023, 20:19, edited 1 time in total.
Reason: nu i bn codat
User avatar
EnTeR_
Membru, skill +2
Membru, skill +2
Posts: 577
Joined: 13 Sep 2014, 16:36
Detinator Steam: Da
Fond eXtream: 0
Has thanked: 3 times
Been thanked: 29 times

14 Mar 2023, 15:42

LondoN eXtream wrote:
14 Mar 2023, 14:31
| Afiseaza codul
#include < amxmodx >
#include < amxmisc >

#define MAX_PLAYERS	32

new g_KillsCounting [ MAX_PLAYERS + 1 ], g_pcvar_kills;

public plugin_init ( ) {
	register_plugin ( "Reset on kills", "1.0", "LondoN eXtream" );
	register_event ( "DeathMsg", "pfn_ReadMessage", "a" );
	g_pcvar_kills = register_cvar ( "max_kills", "250" );
}

public pfn_ReadMessage ( ) {
	new id = read_data ( 1 ), victim = read_data ( 2 );
	
	if ( id == victim )	return;

	if ( g_KillsCounting [ id ] < get_pcvar_num ( g_pcvar_kills ) && is_user_alive ( id ) )
	{
		g_KillsCounting [ id ]++;

		pfn_CheckForNewData ( id );
	}
}

public pfn_CheckForNewData ( id ) {
	if ( g_KillsCounting [ id ] >= get_pcvar_num ( g_pcvar_kills ) ) {
		g_KillsCounting [ id ] = 0;
		server_cmd ( "amx_cvar sv_restart 1" );
	}
}
Cu placere.

max_kills 250 - cvar
Vezi ca trebuie resetat la toți
Discord: eyekon13
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

14 Mar 2023, 18:31

EnTeR_ wrote:
14 Mar 2023, 15:42
LondoN eXtream wrote:
14 Mar 2023, 14:31
| Afiseaza codul
#include < amxmodx >
#include < amxmisc >

#define MAX_PLAYERS	32

new g_KillsCounting [ MAX_PLAYERS + 1 ], g_pcvar_kills;

public plugin_init ( ) {
	register_plugin ( "Reset on kills", "1.0", "LondoN eXtream" );
	register_event ( "DeathMsg", "pfn_ReadMessage", "a" );
	g_pcvar_kills = register_cvar ( "max_kills", "250" );
}

public pfn_ReadMessage ( ) {
	new id = read_data ( 1 ), victim = read_data ( 2 );
	
	if ( id == victim )	return;

	if ( g_KillsCounting [ id ] < get_pcvar_num ( g_pcvar_kills ) && is_user_alive ( id ) )
	{
		g_KillsCounting [ id ]++;

		pfn_CheckForNewData ( id );
	}
}

public pfn_CheckForNewData ( id ) {
	if ( g_KillsCounting [ id ] >= get_pcvar_num ( g_pcvar_kills ) ) {
		g_KillsCounting [ id ] = 0;
		server_cmd ( "amx_cvar sv_restart 1" );
	}
}
Cu placere.

max_kills 250 - cvar
Vezi ca trebuie resetat la toți
Ai dreptate, nu am tinut cont.
new | Afiseaza codul
#include < amxmodx >
#include < amxmisc >

#define MAX_PLAYERS	32

new g_KillsCounting [ MAX_PLAYERS + 1 ], g_pcvar_kills;

public plugin_init ( ) {
	register_plugin ( "Reset on kills", "1.0", "LondoN eXtream" );
	register_event ( "DeathMsg", "pfn_ReadMessage", "a" );
	g_pcvar_kills = register_cvar ( "max_kills", "250" );
}

public pfn_ReadMessage ( ) {
	new id = read_data ( 1 ), victim = read_data ( 2 );
	
	if ( id == victim )	return;

	if ( g_KillsCounting [ id ] < get_pcvar_num ( g_pcvar_kills ) && is_user_alive ( id ) )
	{
		g_KillsCounting [ id ]++;

		pfn_CheckForNewData ( id );
	}
}

public pfn_CheckForNewData ( id ) {
	new bool:Found = false;
	if ( g_KillsCounting [ id ] >= get_pcvar_num ( g_pcvar_kills ) ) {
		g_KillsCounting [ id ] = 0;
		Found = true;
		server_cmd ( "amx_cvar sv_restart 1" );
	}

	if ( Found ) {
		for ( new i = 1; i <= get_maxplayers ( ); i++ ) {
			if ( !is_user_connected ( i )	)	continue;
			g_KillsCounting [ i ] = 0;
		}
	}
}
Post Reply

Return to “Cereri”

  • Information