Cerere plugin rezolvare

Cereri de resurse: addons-uri, modele, sunete, etc.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Post Reply
Cs-3r4z3r
Membru, skill +1
Membru, skill +1
Posts: 326
Joined: 28 Mar 2008, 01:12
Detinator Steam: Da
CS Status: mai putin cu cs-ul in ultimul timp
Detinator server CS: Cs.Samara.Ro
Location: Bucuresti
Has thanked: 8 times

27 Dec 2013, 04:04

Salut! Ma poate ajuta si pe mine sa rezolva si eu problema asta la pluginul asta ? am uitat sa zic pentru versiune 1.8.1 si 1.8.2
| Afiseaza codul
/****************************************/
/*					*/
/*	Auto Demo Recorder		*/
/*	by IzI				*/
/*					*/
/****************************************/

#include <amxmodx>
#pragma semicolon 1

new g_Toggle, g_DMod, g_UseNI, g_RStartAfter, g_DemoName, g_DemoNamePrefix;

public plugin_init() { 
	register_plugin( "Auto Demo Recorder", "1.5", "IzI" );
	g_Toggle 		= register_cvar( "amx_demo",		"1" );
	g_DMod			= register_cvar( "amx_demo_mode",	"0" );
	g_UseNI 		= register_cvar( "amx_demo_steamid",	"0" );
	g_RStartAfter 		= register_cvar( "amx_demo_rectime",	"15" );	// If it is less than 5, it will automatically set to 5, but willn't apply the changes to the console. I recoment to use default settings.
	g_DemoName 		= register_cvar( "amx_demo_name",	"Autorecorded demo" );
	g_DemoNamePrefix	= register_cvar( "amx_demo_prefix",	"AMXX" );
	register_dictionary( "demorecorder.txt" );
}

public client_putinserver( id ) {
	if( get_pcvar_num( g_Toggle ) ) {
		new Float:delay = get_pcvar_float( g_RStartAfter );
		if( delay < 5 )
			set_pcvar_float( g_RStartAfter, ( delay = 5.0 ) );
		set_task( delay, "Record", id );
	}
}

public Record( id ) {
	if( !is_user_connected( id ) || get_pcvar_num( g_Toggle ) != 1 )
		return;

	// Getting time, client SteamID, server's name, server's ip with port.
	new szSName[128], szINamePrefix[64], szTimedata[9];
	new iUseIN = get_pcvar_num( g_UseNI );
	new iDMod = get_pcvar_num( g_DMod );
	get_pcvar_string( g_DemoNamePrefix, szINamePrefix, 63 );
	get_time ( "%H:%M:%S", szTimedata, 8 );

	switch( iDMod ) {
		case 0: get_pcvar_string( g_DemoName, szSName, 127 );
		case 1: get_user_ip( 0, szSName, 127, 0 );
		case 2: get_user_name( 0, szSName, 127 );
	}

	if( iUseIN ) {
		new szCID[32];
		get_user_authid( id, szCID, 31 );
		format( szSName, 127, "[%s]%s", szCID, szSName );
	}

	// Replacing signs.
	replace_all( szSName, 127, ":", "_" );
	replace_all( szSName, 127, ".", "_" );
	replace_all( szSName, 127, "*", "_" );
	replace_all( szSName, 127, "/", "_" );
	replace_all( szSName, 127, "|", "_" );
	replace_all( szSName, 127, "\", "_" );
	replace_all( szSName, 127, "?", "_" );
	replace_all( szSName, 127, ">", "_" );
	replace_all( szSName, 127, "<", "_" );
	replace_all( szSName, 127, " ", "_" );

	// Displaying messages.
	client_cmd( id, "stop; record ^"%s^"", szSName );
	client_print( id, print_chat, "[%s] %L ^"%s.dem^"", szINamePrefix, LANG_PLAYER, "RECORDINGIN", szSName );
	client_print( id, print_chat, "[%s] %L", szINamePrefix, LANG_PLAYER, "RECORDINGAT", szTimedata );
}
erori ete

L 12/27/2013 - 03:44:45: [AMXX] Displaying debug trace (plugin "amx_demorecorder.amxx")
L 12/27/2013 - 03:44:45: [AMXX] Run time error 10: native error (native "get_pcvar_num")
L 12/27/2013 - 03:44:45: [AMXX] [0] amx_demorecorder.sma::client_putinserver (line 25)
Rapidserver
HaLoGeN
Membru, skill 0
Membru, skill 0
Posts: 3
Joined: 26 Dec 2013, 22:54
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Been thanked: 1 time
Contact:

27 Dec 2013, 13:53

#include <amxmodx>
#pragma semicolon 1

new g_Toggle, g_DMod, g_UseNI, g_RStartAfter, g_DemoName, g_DemoNamePrefix;

public plugin_init() {
register_plugin( "Auto Demo Recorder", "1.5", "IzI" );
g_Toggle = register_cvar( "amx_demo", "1" );
g_DMod = register_cvar( "amx_demo_mode", "0" );
g_UseNI = register_cvar( "amx_demo_steamid", "0" );
g_RStartAfter = register_cvar( "amx_demo_rectime", "15" ); // If it is less than 5, it will automatically set to 5, but willn't apply the changes to the console. I recoment to use default settings.
g_DemoName = register_cvar( "amx_demo_name", "Autorecorded demo" );
g_DemoNamePrefix = register_cvar( "amx_demo_prefix", "AMXX" );
register_dictionary( "demorecorder.txt" );
}

public client_putinserver( id ) {
if( get_pcvar_num( g_Toggle ) ) {
new Float:delay = get_pcvar_float( g_RStartAfter );
if( delay < 5 )
set_pcvar_float( g_RStartAfter, ( delay = 5.0 ) );
set_task( delay, "Record", id );
}
}

public Record( id ) {
if( !is_user_connected( id ) || get_pcvar_num( g_Toggle ) != 1 )
return;

// Getting time, client SteamID, server's name, server's ip with port.
new szSName[128], szINamePrefix[64], szTimedata[9];
new iUseIN = get_pcvar_num( g_UseNI );
new iDMod = get_pcvar_num( g_DMod );
get_pcvar_string( g_DemoNamePrefix, szINamePrefix, 63 );
get_time ( "%H:%M:%S", szTimedata, 8 );

switch( iDMod ) {
case 0: get_pcvar_string( g_DemoName, szSName, 127 );
case 1: get_user_ip( 0, szSName, 127, 0 );
case 2: get_user_name( 0, szSName, 127 );
}

if( iUseIN ) {
new szCID[32];
get_user_authid( id, szCID, 31 );
format( szSName, 127, "[%s]%s", szCID, szSName );
}

// Replacing signs.
replace_all( szSName, 127, ":", "_" );
replace_all( szSName, 127, ".", "_" );
replace_all( szSName, 127, "*", "_" );
replace_all( szSName, 127, "/", "_" );
replace_all( szSName, 127, "|", "_" );
replace_all( szSName, 127, "\", "_" );
replace_all( szSName, 127, "?", "_" );
replace_all( szSName, 127, ">", "_" );
replace_all( szSName, 127, "<", "_" );
replace_all( szSName, 127, " ", "_" );

// Displaying messages.
client_cmd( id, "stop; record ^"%s^"", szSName );
client_print( id, print_chat, "[%s] %L ^"%s.dem^"", szINamePrefix, LANG_PLAYER, "RECORDINGIN", szSName );
client_print( id, print_chat, "[%s] %L", szINamePrefix, LANG_PLAYER, "RECORDINGAT", szTimedata );
}
nu erau bine asezate.
dar trebuie si fisierul care se pune in cstrike/addons/amxmodx/data/lang
se numeste demorecorder.ini
Download demorecorder.ini si .amxx
Post Reply

Return to “Cereri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 5 guests