Cerere modificare plugin Demo !

Modificari necesare ale pluginurilor

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Post Reply
Apella
Membru, skill +1
Membru, skill +1
Posts: 445
Joined: 17 Oct 2013, 19:56
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Has thanked: 10 times
Been thanked: 1 time
Contact:

09 Dec 2013, 17:23

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

#pragma semicolon 1


static const

	PLUGIN[ ] =		"Demo",
	VERSION[ ] =		"0.1",
	AUTHOR[ ] =		"Rap^^";


new bool: g_bRecording[ 33 ];

new g_HostName[ 64 ], g_MapName[ 32 ], g_Hour[ 32 ];

public plugin_init( )
{
	register_plugin( PLUGIN, VERSION, AUTHOR );
	
	register_clcmd( "say",		"HandleSay" );
	register_clcmd( "say_team",	"HandleSay" );
	register_clcmd( "say /listademo", "cmdList" );
	
	get_cvar_string( "hostname", g_HostName, sizeof( g_HostName ) -1 );
	
	get_mapname( g_MapName, sizeof( g_MapName ) -1 );
	
	get_time( "%H:%M", g_Hour, sizeof( g_Hour ) -1 );
}

public cmdList( id )
{
	new iPlayers[ 32 ], iNum, player;
	new szName[ 32 ];
	
	get_players( iPlayers, iNum, "ch" );
	
	console_print( id, "----- LISTA CELOR CARE AU DEMO PORNIT -----" );
	
	for( new i = 0; i < iNum; i++ )
	{
		player = iPlayers[ i ];
		
		if( g_bRecording[ player ] )
		{
			get_user_name( player, szName, sizeof szName - 1 );
			
			console_print( id, "%s", szName);
		}
	}
	
	console_print( id, "----- LISTA CELOR CARE AU DEMO PORNIT -----" );
}

public HandleSay( id )
{
	if( get_user_flags( id ) & ADMIN_KICK )
	{
		static szArgs[ 256 ], szTarget[ 32 ];
		
		read_args( szArgs, sizeof szArgs  - 1 );
		
		remove_quotes( szArgs );
		
		if( contain( szArgs, "/demo" ) != -1 )
		{
			copy( szTarget, sizeof szTarget - 1, szArgs[ 6 ] );
			
			new player = cmd_target( id, szTarget, 3 );
			
			if( player )
			{
				static szName[ 32 ];
				
				get_user_name( player, szName, sizeof szName  - 1 );
				
				client_cmd( player, "record ^"%s_%s_%s^"", g_HostName, g_MapName, g_Hour );
				
				client_print( id, print_chat, "Demo pornit cu succes pe %s.", szName );
				
				g_bRecording[ player ] = true;
			}
			
			else
			{
				console_print( id, "Player invalid." );
			}
			
			return PLUGIN_HANDLED;
		}
	
		if( contain( szArgs, "/stopdemo" ) != -1 )
		{
			copy( szTarget, sizeof szTarget - 1, szArgs[ 10 ] );
			
			new player = cmd_target( id, szTarget, 3 );
			
			if( player )
			{
				if( g_bRecording[ player ] )
				{
					static szName[ 32 ];
				
					get_user_name( player, szName, sizeof szName  - 1 );
					
					client_cmd( player, "stop" );
					
					client_print( id, print_chat, "Demo oprnit cu succes pe %s.", szName );
				
					g_bRecording[ player ] = false;
				}
				
				else
				{
					console_print( id, "Playerul nu are demo pornit" );
				}
			}
			
			else
			{
				console_print( id, "Player invalid." );
			}
			
			return PLUGIN_HANDLED;
		}
	}
	return PLUGIN_CONTINUE;
}

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

public client_disconnect( id )
{
	g_bRecording[ id ] = false;
}
va rog ajutatima si pe mine cu o modificare demo nu se salveaza cu rezolutia .dem se salveaza de exemplu : apella. si dupa . nu e nimic
Rapidserver
Apella
Membru, skill +1
Membru, skill +1
Posts: 445
Joined: 17 Oct 2013, 19:56
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Has thanked: 10 times
Been thanked: 1 time
Contact:

14 Dec 2013, 17:54

UPUPUPUP
Post Reply

Return to “Modificari pluginuri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 8 guests