[REZOLVAT]Eroare LOGS

Discutii legate de instalarea, configurarea si modificarea unui server de Counter-Strike.

Moderators: Moderatori ajutatori, Moderatori

L1oN98
Membru, skill 0
Membru, skill 0
Posts: 93
Joined: 26 Nov 2018, 19:52
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Contact:

29 Jan 2019, 00:34

EnTeR_, am incercat sa pun acel INC dar tot asa imi face..
Chiar nu se poate rezolva problema asta, sa nu mai apara in logs?
Trebuie sa fie o solutie
IG-BOOST.org - Instagram Followers Best, Cheap, Reliable
L1oN98
Membru, skill 0
Membru, skill 0
Posts: 93
Joined: 26 Nov 2018, 19:52
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Contact:

02 Feb 2019, 11:29

Stie cineva ce trebuie sa fac sa rezolv problema?
L1oN98
Membru, skill 0
Membru, skill 0
Posts: 93
Joined: 26 Nov 2018, 19:52
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Contact:

09 Feb 2019, 22:15

Up.
User avatar
JaiLBreaK
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 1688
Joined: 05 Jan 2016, 18:17
Detinator Steam: Nu
Detinator server CS: Da
Reputatie: Membru Club eXtreamCS (2 luni)
Scripter eXtreamCS
Fond eXtream: 0
Has thanked: 1 time
Been thanked: 2 times
Contact:

10 Feb 2019, 12:15

testeaza | Afiseaza codul
#include < amxmodx >
#include < cstrike >
#include < fun >

#pragma tabsize 0

#define PLUGIN "DR"
#define VERSION "1.0"

#define      MagicWordTask      112233
#define      MagicWordSecondTask   332211
#define VITEZA      500

enum
{
PRIZE_SPEED,
PRIZE_NOCLIP,
PRIZE_GODMODE,
PRIZE_HP,
PRIZE_RENDERING,
PRIZE_ARMOR,
PRIZE_AK47,
PRIZE_NADES,
PRIZE_AWP
}

new const g_szSmallLetters[    ] =
{
'a','b','c','d',
'e','f','g','h',
'j','k',
'm','n','p',
'q','r','s','t',
'u','v','w','x',
'y','z'
};


new const g_szLargeLetters[    ] =
{
'A','B','C','D',
'E','F','G','H',
'I','J','K','L',
'M','N','P',
'Q','R','S','T',
'U','V','W','X',
'Y','Z'
};


new const g_szNumbers[    ]  =  
{
'1',
'2','3',
'4','5',
'6','7',
'8','9'
};

new const g_szSymbols[    ]  =  
{
'!','?'
};
new bar;
new gCvarMagicWordIterval;
new gCvarMagicWordAnswerTime;
new gCvarMagicWordHP;

new g_iAnswerTime = 0;
new g_szMagicWord[ 32 ];

new bool:g_bPlayersCanAnswer  =  false;
new bool:viteza[31];
new bool:invizibilitate[32];
new SayText
new SyncHudMessage;

public plugin_init( )
{
	register_plugin( PLUGIN, VERSION, "Askhanar" );
	
	gCvarMagicWordIterval =  register_cvar( "fmu_mw_interval",  "180"  );
	gCvarMagicWordAnswerTime = register_cvar( "fmu_mw_answertime",  "15"  );
	gCvarMagicWordHP = register_cvar( "fmu_mw_hp",  "50"  );
	SayText = get_user_msgid("SayText");
	register_clcmd( "amx_magicword", "ClCmdMagicWord" );
	
	register_clcmd( "say", "CheckForMagicWord" );
	register_clcmd( "say_team", "CheckForMagicWord" );
	register_event("CurWeapon", "event_CurWeapon", "be", "1=1");
	register_event("HLTV", "event_newround", "a", "1=0", "2=0");
	
	bar = get_user_msgid("BarTime");   
	
	SyncHudMessage  =  CreateHudSyncObj(    );
	set_task(  15.0,  "ChooseRandomWord",  MagicWordTask  );
	
}

public event_newround()
{
	arrayset(viteza, false, charsmax(viteza));
	
	new i, players[32], num, id;
	get_players(players, num);
	for(i = 0; i < num; i++)
	{
		id = players;
		if(!is_user_alive(id))
			continue;
		
		if(invizibilitate[id])
		{
			invizibilitate[id] = false;
			set_user_rendering(id);
		}
	}
}

public client_death(killer, victim, wpnindex, hitplace, tk)
{
	if(!is_user_alive(killer))
		return;
	
	if(killer == victim)
		return;
	
	if(viteza[killer]) viteza[killer] = false;
	if(invizibilitate[killer])
	{
		invizibilitate[killer] = false;
		set_user_rendering(killer);
	}
}


public client_putinserver(id)
{
	viteza[id] = false;
	invizibilitate[id] = false;
}

public ClCmdMagicWord( id )
{
	if( !UserHasAcces( id ) )
	{
		client_cmd( id, "echo Nu ai acces la aceasta comanda !" );
		return PLUGIN_HANDLED;
	}
	
	read_argv( 1, g_szMagicWord, 14 );
	if( equal( g_szMagicWord, "" ) )
	{
		
		remove_task( MagicWordTask );
		remove_task( MagicWordSecondTask );
		g_bPlayersCanAnswer = false;
		
		ChooseRandomWord( );
	}
	else
	{
		remove_task( MagicWordTask );
		remove_task( MagicWordSecondTask );
		g_bPlayersCanAnswer = false;
		
		DisplayMagicWord( );
	}
	
	
	return 1;
}

public CheckForMagicWord(  id  )
{
	static szSaid[ 192 ];
	read_args( szSaid, sizeof ( szSaid ) -1 );
	remove_quotes( szSaid );
	
	if( equali( szSaid, "" )  || !g_bPlayersCanAnswer || cs_get_user_team(id) == CS_TEAM_SPECTATOR )   return PLUGIN_CONTINUE;
	
	if( equal( szSaid, g_szMagicWord ) )
	{
		if(cs_get_user_team( id ) == CS_TEAM_T)
		{
			print_color(id, "^x04[DR]^x01 Doar^x03 CT^x01 beneficiaza de acest sistem!")
			return PLUGIN_HANDLED
		}
		g_bPlayersCanAnswer  =  false;
		client_cmd( 0, "spk woop" );
		GiveUserPrize( id );
		return PLUGIN_HANDLED
	}
	
	return PLUGIN_CONTINUE;
}


public ChooseRandomWord( )
{
	if( !get_playersnum( ) )
	{
		set_task( float( get_pcvar_num( gCvarMagicWordIterval ) ), "ChooseRandomWord", MagicWordTask );
		return;
	}
	
	new iLen = random_num( 7, 8 );
	formatex( g_szMagicWord, sizeof ( g_szMagicWord ) -1, "" );
	
	for( new i = 0; i < iLen; i++ )
		g_szMagicWord[ i ] = GetRandomCharacter( );
	
	StartMagicWord( );
	client_cmd( 0, "spk doop" );
	
	set_task( float( get_pcvar_num( gCvarMagicWordIterval ) ), "ChooseRandomWord", MagicWordTask );
}

public DisplayMagicWord( )
{
	if( !get_playersnum( ) )
	{
		set_task( float( get_pcvar_num( gCvarMagicWordIterval ) ), "ChooseRandomWord", MagicWordTask );
		return;
	}
	
	StartMagicWord( );
	client_cmd( 0, "spk doop" );
	
	set_task( float( get_pcvar_num( gCvarMagicWordIterval ) ), "ChooseRandomWord", MagicWordTask );
}

public GetRandomCharacter( )
{
	new Float:fRandom = random_float( 1.0, 100.0 );
	
	if( fRandom <= 25.0 )
	{
		return g_szSmallLetters[ random( sizeof ( g_szSmallLetters ) ) ];
	}
	
	else if( fRandom > 25.0 && fRandom <= 50.0 )
	{
		return g_szLargeLetters[ random( sizeof ( g_szLargeLetters ) ) ];
	}
	
	else if( fRandom > 50.0 && fRandom < 75.0 )
	{
		return g_szNumbers[ random( sizeof ( g_szNumbers ) ) ];
	}
	else if( fRandom > 75.0 )
	{
		return g_szSymbols[ random( sizeof ( g_szSymbols ) ) ];
	}
	
	return EOS;
}

public StartMagicWord( )
{
	g_bPlayersCanAnswer = true;
	
	g_iAnswerTime = get_pcvar_num( gCvarMagicWordAnswerTime );
	CountAnswerTime( );
	
}

public CountAnswerTime( )
{
	
	if( g_bPlayersCanAnswer )
	{
		
		if( g_iAnswerTime <= 0 )
		{
			g_bPlayersCanAnswer  =  false;
			print_color(0, "^x04[DR]^x01 Nu a scris nimeni cuvantul, poate data viitoare.." );
			return PLUGIN_HANDLED;
		}
		
		set_hudmessage( 0, 255, 255, -1.0, 0.10, 0, 0.0, 1.0, 0.0, 0.1, 2 );
		ShowSyncHudMsg( 0, SyncHudMessage, "Cine scrie primul:     %s    castiga un premiu!^n %i secund%s ramas%s !!",
		g_szMagicWord, g_iAnswerTime, g_iAnswerTime  ==  1 ? "a" : "e", g_iAnswerTime  ==  1 ? "a" : "e" );
		
		g_iAnswerTime--;
		
		set_task( 1.0, "CountAnswerTime", MagicWordSecondTask );
	}
	
	return PLUGIN_CONTINUE;
}

public GiveUserPrize( id )
{
	
	new szName[ 55 ];
	get_user_name( id, szName, sizeof ( szName ) -1 );
	
	new iRandomPrize = random_num( PRIZE_SPEED, PRIZE_AWP);
	
	switch( iRandomPrize )
	{
		
		case PRIZE_SPEED:
		{
			viteza[id] = true;
			set_user_maxspeed(id, float(VITEZA));
			print_color(0, "^x04[DR]^x03 %s^x01 a scris primul^x03 %s^x01 si a primit^x03 400 Speed^x01 !", szName, g_szMagicWord, get_pcvar_num( gCvarMagicWordHP ) );
		}
		case PRIZE_NOCLIP:
		{
			set_user_noclip(id,1);
			set_task(8.0,"removeClip",id);
			print_color(0, "^x04[DR]^x03 %s^x01 a scris primul^x03 %s^x01 si a primit^x03 NOCLIP^x01 8 sec!", szName, g_szMagicWord, get_pcvar_num( gCvarMagicWordHP ) );
			
			message_begin(MSG_ONE_UNRELIABLE, bar, .player=id);
			write_short(8);
			message_end();
			
		}   
		
		case PRIZE_GODMODE:
		{
			set_user_godmode(id,1);
			set_task(10.0,"removeGodMode",id);
			print_color(0, "^x04[DR]^x03 %s^x01 a scris primul^x03 %s^x01 si este^x03 Invincibil^x01 10 Secunde!", szName, g_szMagicWord, get_pcvar_num( gCvarMagicWordHP ) );
			
			message_begin(MSG_ONE_UNRELIABLE, bar, .player=id);
			write_short(10);
			message_end();
		}
		
		case PRIZE_HP:
		{
			set_user_health( id, get_user_health( id ) + get_pcvar_num( gCvarMagicWordHP ) );
			print_color(0, "^x04[DR]^x03 %s^x01 a scris primul^x03 %s^x01 si a primit^x03 %i HP^x01 !", szName, g_szMagicWord, get_pcvar_num( gCvarMagicWordHP ) );
		}
		case PRIZE_RENDERING:
		{
			invizibilitate[id] = true;
			set_user_rendering ( id, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, 32 );
			print_color(0, "^x04[DR]^x03 %s^x01 a scris primul^x03 %s^x01 si a primit^x03 Invizibilitate^x01 !", szName, g_szMagicWord, get_pcvar_num( gCvarMagicWordHP ) );
		}
		case PRIZE_ARMOR:
		{
			set_user_armor(id, 100);
			print_color(0, "^x04[DR]^x03 %s^x01 a scris primul^x03 %s^x01 si a primit^x03 100 Armura^x01 !", szName, g_szMagicWord, get_pcvar_num( gCvarMagicWordHP ) );
		}
		case PRIZE_AK47:
		{
			cs_set_weapon_ammo( give_item( id, "weapon_ak47" ), 50 );
			cs_set_user_bpammo(id, CSW_AK47, 99);
			print_color(0, "^x04[DR]^x03 %s^x01 a scris primul^x03 %s^x01 si a primit^x03 AK47^x01 !", szName, g_szMagicWord, get_pcvar_num( gCvarMagicWordHP ) );
		}
		case PRIZE_NADES:
		{
			give_item( id, "weapon_hegrenade" );
			give_item( id, "weapon_smokegrenade" );
			
			cs_set_user_bpammo( id, CSW_HEGRENADE, 3 );
			cs_set_user_bpammo( id, CSW_SMOKEGRENADE, 1 );
			
			print_color(0, "^x04[DR]^x03 %s^x01 a scris primul^x03 %s^x01 si a primit^x03 grenade ^x01 !", szName, g_szMagicWord );
		}
		case PRIZE_AWP:
		{
			cs_set_weapon_ammo( give_item( id, "weapon_awp" ), 20 );
			cs_set_user_bpammo(id, CSW_AWP, 99);
			print_color(0, "^x04[DR]^x03 %s^x01 a scris primul^x03 %s^x01 si a primit^x03 AWP ^x01 !", szName, g_szMagicWord, get_pcvar_num( gCvarMagicWordHP ) );
		}
		
		
	}
	
	formatex( g_szMagicWord, sizeof ( g_szMagicWord ) -1, "" );
	return 0;
}

public removeGodMode(id) {
	set_user_godmode(id,0);
	print_color( id, "^x04[DR]^x01 Nu mai esti ^x03Invincibil!");  
}

public removeClip(id) {
	set_user_noclip(id,0);
	print_color( id, "^x04[DR]^x01 NoClip ^x03OFF!");  
}

public event_CurWeapon(id)
{
	if(is_user_alive(id))
	{
		if(get_user_maxspeed(id) != 1.0 && viteza[id] == true)
		{
			set_user_maxspeed(id, float(VITEZA));
		}
	}
	
	return PLUGIN_CONTINUE;
}

public ShakeScreen(id, const Float:iSeconds)
{
	static g_msg_SS = 0;
	if(!g_msg_SS)
		g_msg_SS = get_user_msgid("ScreenShake");
	
	message_begin(MSG_ONE, g_msg_SS, _, id);
	write_short(floatround(4096.0 * iSeconds, floatround_round));
	write_short(floatround(4096.0 * iSeconds, floatround_round));
	write_short(1<<13);
	message_end();
}

bool:UserHasAcces( id )
{
	
	if( get_user_flags( id ) & ADMIN_RCON )
		return true;
	
	return false;
	
}
print_color(const id, const input[], any:...)
{
	new Count = 1, Players[32];
	static Msg[191];
	vformat(Msg, 190, input, 3);
	
	replace_all(Msg, 190, "!g", "^4");
	replace_all(Msg, 190, "!y", "^1");
	replace_all(Msg, 190, "!t", "^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, SayText, _, Players);
			write_byte(Players);
			write_string(Msg);
			message_end();
		}
	}
	return PLUGIN_HANDLED;
}
Image
L1oN98
Membru, skill 0
Membru, skill 0
Posts: 93
Joined: 26 Nov 2018, 19:52
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Contact:

10 Feb 2019, 12:56

S-a rezolvat, nu mai apare cand ies si pluginul ruleaza, iti multumesc mult JaiLBreaK!
Post Reply

Return to “Probleme la servere dedicate de Counter-Strike”

  • Information