Page 1 of 1
Cerere modificare plugin
Posted: 01 Aug 2018, 19:57
by Karamel
Vreau si eu sa imi modificati acest plugin, sa nu mai arate ( ) in paranteze.
Apare Membrii VIP ( 1 ) , vreau sa fie doar "Membrii VIP:"
Sma-ul care l-am gasit:
- | Afiseaza codul
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#define PLUGIN "New Plugin"
#define VERSION "1.0"
new const g_szBeginning[ ] = "Membrii VIP"
new g_szMessage[ 256 ];
new SyncHudMessage;
public plugin_init( )
{
register_plugin( PLUGIN, VERSION, "Askhanar" );
set_task( 1.0, "TaskDisplayVips", _, _, _, "b", 0 );
SyncHudMessage = CreateHudSyncObj( );
// Add your code here...
}
public TaskDisplayVips( )
{
static iPlayers[ 32 ];
static iPlayersNum;
get_players( iPlayers, iPlayersNum, "ch" );
if( !iPlayersNum )
return;
static iVipsConnected, szVipsNames[ 128 ], szName[ 32 ];
//formatex( szVipsNames, sizeof ( szVipsNames ) -1, "" ); // Is this needed ?
iVipsConnected = 0;
static id, i;
for( i = 0; i < iPlayersNum; i++ )
{
id = iPlayers[ i ];
if( get_user_flags( id ) & read_flags( "l" ) )
{
get_user_name( id, szName, sizeof ( szName ) -1 );
add( szVipsNames, sizeof ( szVipsNames ) -1, szName );
add( szVipsNames, sizeof ( szVipsNames ) -1, "^n" );
iVipsConnected++;
}
}
formatex( g_szMessage, sizeof ( g_szMessage ) -1, "%s ( %i )^n%s",
g_szBeginning, iVipsConnected, szVipsNames );
set_hudmessage( 25, 255, 25, 0.01, 0.25, 0, 0.0, 1.0, 0.1, 0.1, -1 );
ShowSyncHudMsg( 0, SyncHudMessage, g_szMessage );
}
Re: Cerere modificare plugin
Posted: 02 Aug 2018, 00:18
by DanN
Karamel wrote:Vreau si eu sa imi modificati acest plugin, sa nu mai arate ( ) in paranteze.
Apare Membrii VIP ( 1 ) , vreau sa fie doar "Membrii VIP:"
Sma-ul care l-am gasit:
- | Afiseaza codul
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#define PLUGIN "New Plugin"
#define VERSION "1.0"
new const g_szBeginning[ ] = "Membrii VIP"
new g_szMessage[ 256 ];
new SyncHudMessage;
public plugin_init( )
{
register_plugin( PLUGIN, VERSION, "Askhanar" );
set_task( 1.0, "TaskDisplayVips", _, _, _, "b", 0 );
SyncHudMessage = CreateHudSyncObj( );
// Add your code here...
}
public TaskDisplayVips( )
{
static iPlayers[ 32 ];
static iPlayersNum;
get_players( iPlayers, iPlayersNum, "ch" );
if( !iPlayersNum )
return;
static iVipsConnected, szVipsNames[ 128 ], szName[ 32 ];
//formatex( szVipsNames, sizeof ( szVipsNames ) -1, "" ); // Is this needed ?
iVipsConnected = 0;
static id, i;
for( i = 0; i < iPlayersNum; i++ )
{
id = iPlayers[ i ];
if( get_user_flags( id ) & read_flags( "l" ) )
{
get_user_name( id, szName, sizeof ( szName ) -1 );
add( szVipsNames, sizeof ( szVipsNames ) -1, szName );
add( szVipsNames, sizeof ( szVipsNames ) -1, "^n" );
iVipsConnected++;
}
}
formatex( g_szMessage, sizeof ( g_szMessage ) -1, "%s ( %i )^n%s",
g_szBeginning, iVipsConnected, szVipsNames );
set_hudmessage( 25, 255, 25, 0.01, 0.25, 0, 0.0, 1.0, 0.1, 0.1, -1 );
ShowSyncHudMsg( 0, SyncHudMessage, g_szMessage );
}
formatex( g_szMessage, sizeof ( g_szMessage ) -1, "%s %i ^n%s",
Re: Cerere modificare plugin
Posted: 02 Aug 2018, 07:25
by Karamel
Nu ai inteles, vreau sa apara doar Membrii VIP: si dedesupt numele la vipi, am incercat tot felul de "%s%s" "%s^n" s.a.m.d
Re: Cerere modificare plugin
Posted: 02 Aug 2018, 08:21
by Laurentiu P.
- Testat | Afiseaza codul
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#define PLUGIN "New Plugin"
#define VERSION "1.0"
new const g_szBeginning[ ] = "Membrii VIP"
new g_szMessage[ 256 ];
new SyncHudMessage;
public plugin_init( )
{
register_plugin( PLUGIN, VERSION, "Askhanar" );
set_task( 1.0, "TaskDisplayVips", _, _, _, "b", 0 );
SyncHudMessage = CreateHudSyncObj( );
// Add your code here...
}
public TaskDisplayVips( )
{
static iPlayers[ 32 ];
static iPlayersNum;
get_players( iPlayers, iPlayersNum, "ch" );
if( !iPlayersNum )
return;
static szVipsNames[ 128 ], szName[ 32 ];
formatex( szVipsNames, sizeof ( szVipsNames ) -1, "" ); // Is this needed ?
static id, i;
for( i = 0; i < iPlayersNum; i++ )
{
id = iPlayers[ i ];
if( get_user_flags( id ) & read_flags( "l" ) )
{
get_user_name( id, szName, sizeof ( szName ) -1 );
add( szVipsNames, sizeof ( szVipsNames ) -1, szName );
add( szVipsNames, sizeof ( szVipsNames ) -1, "^n" );
}
}
formatex( g_szMessage, sizeof ( g_szMessage ) -1, "%s:^n%s", g_szBeginning, szVipsNames );
set_hudmessage( 25, 255, 25, 0.01, 0.25, 0, 0.0, 1.0, 0.1, 0.1, -1 );
ShowSyncHudMsg( 0, SyncHudMessage, g_szMessage );
}
Print
- | Afiseaza codul
Re: Cerere modificare plugin
Posted: 02 Aug 2018, 09:59
by Karamel
Rezolvat, mersi.
Re: Cerere modificare plugin
Posted: 02 Aug 2018, 21:26
by Karamel
EDIT: am gresit, ma scuzati !!