User
Pass
2FA
 
 

Problema Plugin

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Freakz Forum Index -> Trash Bin -> CS 2006-2019 (Archived) -> Plugins - Help / Support
Author Message961
Liviu3

[Sacred Legion]



Status: Offline
(since 07-10-2021 08:24)
Joined: 16 Dec 2011
Posts: 121, Topics: 45
Location: Bucuresti

Reputation: 76.6
Votes: 5

   
Post Posted: 16-01-2016, 19:35:40 | Translate post to: ... (Click for more languages)

»Nume*: Ace + semi-ace Announcement
»Descriere problema*: As dori daca se poate sa schimb sunetul cand cineva da ace sau semi. Am sunetele, am modificat in .sma sunetul care era default, dar se aude numai la mine in pc ci nu si la ceilalti + .sma-ul contine doar o comanda pentru ambele ace si semi. Nu are ace o comanda pt sunet propriu si semi o comanda pt alt sunet.
»Poze/Sma: Poftim arhiva cu sunetele care le vreau + .sma-ul default DownloadSMA

0 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID
EDUTz

[HardcoreAmxxScripter]



Status: Offline
(since 15-08-2021 16:34)
Joined: 27 Dec 2010
Posts: 4306, Topics: 244
Location: Jud. Miserupia, sat Bagadanc

Reputation: 4085
Votes: 179

         
Post Posted: 16-01-2016, 19:51:49 | Translate post to: ... (Click for more languages)

Cu placere !

Code:
#include < amxmodx >
#include < cstrike >
#include < ColorChat >

#pragma semicolon 1

#define SEMI_ACE 4


static const

   PLUGIN[ ] =      "Ace_announcement",
   VERSION[ ] =      "1.1",
   AUTHOR[ ] =      "JusTCs",
   
   TAG[ ] =      "[-JusTCs-]";


new g_iFrags[ 33 ];

new iForward;


public plugin_init( )
{
   register_plugin( PLUGIN, VERSION, AUTHOR );
   register_cvar( PLUGIN, AUTHOR, FCVAR_SERVER );
   
   register_event( "HLTV", "EventNewRound", "a", "1=0", "2=0" );
   register_event( "DeathMsg", "EventDeathMsg", "a" );
   
   register_logevent( "LogEventRoundEnd", 2, "1=Round_End" );
   
   iForward  = CreateMultiForward( "FwdPlayerDidAceOrSemi", ET_STOP, FP_CELL, FP_CELL );
}

public plugin_end( )
{
   DestroyForward( iForward );
}

public client_connect( id )
{
   g_iFrags[ id ] = 0;
}

public EventNewRound( )
{
   arrayset( g_iFrags, 0, sizeof g_iFrags );
}

public EventDeathMsg( )
{
   new iKiller = read_data( 1 );
   new iVictim = read_data( 2 );
   
   CheckAce( iVictim );
   
   if( !iKiller || iKiller == iVictim || cs_get_user_team( iKiller ) == cs_get_user_team( iVictim ) )
   {
      return PLUGIN_CONTINUE;
   }
   
   g_iFrags[ iKiller ]++;
   
   return PLUGIN_CONTINUE;
}

public LogEventRoundEnd( )
{
   new iPlayers[ 32 ], iNum, player;
   
   get_players( iPlayers, iNum, "ch" );
   
   for( new i = 0; i < iNum; i++ )
   {
      player = iPlayers[ i ];
      
      if( g_iFrags[ player ] >= SEMI_ACE )
      {
         DidAceOrSemi( player );
         
         if( g_iFrags[ player ] == SEMI_ACE + 1 )
         {
            return PLUGIN_CONTINUE;
         }
      }
   }
   
   return PLUGIN_CONTINUE;
}

public CheckAce( id )
{
   if( g_iFrags[ id ] >= SEMI_ACE )
   {
      DidAceOrSemi( id );
   }
   
   g_iFrags[ id ] = 0;
}

public DidAceOrSemi( id )
{
   new iReturn = PLUGIN_CONTINUE;
   
   ExecuteForward( iForward, iReturn, id, g_iFrags[ id ] );
   
   if( iReturn == PLUGIN_HANDLED || iReturn == PLUGIN_HANDLED_MAIN )
   {
      return PLUGIN_HANDLED;
   }
   
   new szName[ 32 ];
   
   get_user_name( id, szName, sizeof szName - 1 );
      
   if(g_iFrags[id] == 4) {
      ColorChat( 0, GREEN, "%s^x03 %s^x01 a REALIZAT UN ^x03SEMI-ACE^x01.", TAG, szName);
      client_cmd(0, "mp3 play sound/misc/Ace.mp3");
   }
   else if(g_iFrags[id] == 5) {
      ColorChat( 0, GREEN, "%s^x03 %s^x01 a REALIZAT UN ^x03ACE^x01.", TAG, szName);
      client_cmd(0, "mp3 play sound/misc/Semi-Ace.mp3");
   }
   
   return PLUGIN_HANDLED;
}

public plugin_precache()
{
 precache_sound("misc/Ace.mp3"); // sound
 precache_sound("misc/Semi-Ace.mp3"); // sound
}




Pentru pluginuri complicate le fac cu $$ pe paypal/psc. PM

0 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID
Liviu3

[Sacred Legion]



Status: Offline
(since 07-10-2021 08:24)
Joined: 16 Dec 2011
Posts: 121, Topics: 45
Location: Bucuresti

Reputation: 76.6
Votes: 5

   
Post Posted: 16-01-2016, 19:57:03 | Translate post to: ... (Click for more languages)

Mersi mult Edutz, revin cu edit daca e ok pe sv

Edit: Cand dai Ace apare : "[] AnNa a REALIZAT UN . " (am sters [] pt motive de reclama)

Si la sunete se aud invers. Dar incerc sa rezolv eu trb cu sunetu.

0 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID
EDUTz

[HardcoreAmxxScripter]



Status: Offline
(since 15-08-2021 16:34)
Joined: 27 Dec 2010
Posts: 4306, Topics: 244
Location: Jud. Miserupia, sat Bagadanc

Reputation: 4085
Votes: 179

         
Post Posted: 16-01-2016, 21:19:25 | Translate post to: ... (Click for more languages)

Quote:
#include < amxmodx >
#include < cstrike >
#include < ColorChat >

#pragma semicolon 1

#define SEMI_ACE 4


static const

PLUGIN[ ] = "Ace_announcement",
VERSION[ ] = "1.1",
AUTHOR[ ] = "JusTCs",

TAG[ ] = "[-JusTCs-]";


new g_iFrags[ 33 ];

new iForward;


public plugin_init( )
{
register_plugin( PLUGIN, VERSION, AUTHOR );
register_cvar( PLUGIN, AUTHOR, FCVAR_SERVER );

register_event( "HLTV", "EventNewRound", "a", "1=0", "2=0" );
register_event( "DeathMsg", "EventDeathMsg", "a" );

register_logevent( "LogEventRoundEnd", 2, "1=Round_End" );

iForward = CreateMultiForward( "FwdPlayerDidAceOrSemi", ET_STOP, FP_CELL, FP_CELL );
}

public plugin_end( )
{
DestroyForward( iForward );
}

public client_connect( id )
{
g_iFrags[ id ] = 0;
}

public EventNewRound( )
{
arrayset( g_iFrags, 0, sizeof g_iFrags );
}

public EventDeathMsg( )
{
new iKiller = read_data( 1 );
new iVictim = read_data( 2 );

CheckAce( iVictim );

if( !iKiller || iKiller == iVictim || cs_get_user_team( iKiller ) == cs_get_user_team( iVictim ) )
{
return PLUGIN_CONTINUE;
}

g_iFrags[ iKiller ]++;

return PLUGIN_CONTINUE;
}

public LogEventRoundEnd( )
{
new iPlayers[ 32 ], iNum, player;

get_players( iPlayers, iNum, "ch" );

for( new i = 0; i < iNum; i++ )
{
player = iPlayers[ i ];

if( g_iFrags[ player ] >= SEMI_ACE )
{
DidAceOrSemi( player );

if( g_iFrags[ player ] == SEMI_ACE + 1 )
{
return PLUGIN_CONTINUE;
}
}
}

return PLUGIN_CONTINUE;
}

public CheckAce( id )
{
if( g_iFrags[ id ] >= SEMI_ACE )
{
DidAceOrSemi( id );
}

g_iFrags[ id ] = 0;
}

public DidAceOrSemi( id )
{
new iReturn = PLUGIN_CONTINUE;

ExecuteForward( iForward, iReturn, id, g_iFrags[ id ] );

if( iReturn == PLUGIN_HANDLED || iReturn == PLUGIN_HANDLED_MAIN )
{
return PLUGIN_HANDLED;
}

new szName[ 32 ];

get_user_name( id, szName, sizeof szName - 1 );

if(g_iFrags[id] == 4) {
ColorChat( 0, GREEN, "%s^x03 %s^x01 a REALIZAT UN ^x03SEMI-ACE^x01.", TAG, szName);
client_cmd(0, "mp3 play sound/misc/Semi-Ace.mp3");
}
else if(g_iFrags[id] == 5) {
ColorChat( 0, GREEN, "%s^x03 %s^x01 a REALIZAT UN ^x03ACE^x01.", TAG, szName);
client_cmd(0, "mp3 play sound/misc/Ace.mp3");
}

return PLUGIN_HANDLED;
}

public plugin_precache()
{
precache_sound("misc/Ace.mp3"); // sound
precache_sound("misc/Semi-Ace.mp3"); // sound
}


SPer ca e bine acum.




Pentru pluginuri complicate le fac cu $$ pe paypal/psc. PM

0 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID
Liviu3

[Sacred Legion]



Status: Offline
(since 07-10-2021 08:24)
Joined: 16 Dec 2011
Posts: 121, Topics: 45
Location: Bucuresti

Reputation: 76.6
Votes: 5

   
Post Posted: 16-01-2016, 21:20:54 | Translate post to: ... (Click for more languages)

Ok, verific imediat, revin cu edit


EDIT: tot la fel... sunetele sunt schimbate intre ele si apare "player a realizat un ." la ace

EDIT2: Sunetele merg bine acum, dar tot apare faza cu "player a realizat un."

0 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID
EDUTz

[HardcoreAmxxScripter]



Status: Offline
(since 15-08-2021 16:34)
Joined: 27 Dec 2010
Posts: 4306, Topics: 244
Location: Jud. Miserupia, sat Bagadanc

Reputation: 4085
Votes: 179

         
Post Posted: 16-01-2016, 22:22:42 | Translate post to: ... (Click for more languages)

Code:
#include < amxmodx >
#include < cstrike >
#include < ColorChat >

#pragma semicolon 1

#define SEMI_ACE 4


static const

PLUGIN[ ] = "Ace_announcement",
VERSION[ ] = "1.1",
AUTHOR[ ] = "JusTCs",

TAG[ ] = "[-JusTCs-]";


new g_iFrags[ 33 ];

new iForward;


public plugin_init( )
{
register_plugin( PLUGIN, VERSION, AUTHOR );
register_cvar( PLUGIN, AUTHOR, FCVAR_SERVER );

register_event( "HLTV", "EventNewRound", "a", "1=0", "2=0" );
register_event( "DeathMsg", "EventDeathMsg", "a" );

register_logevent( "LogEventRoundEnd", 2, "1=Round_End" );

iForward = CreateMultiForward( "FwdPlayerDidAceOrSemi", ET_STOP, FP_CELL, FP_CELL );
}

public plugin_end( )
{
DestroyForward( iForward );
}

public client_connect( id )
{
g_iFrags[ id ] = 0;
}

public EventNewRound( )
{
arrayset( g_iFrags, 0, sizeof g_iFrags );
}

public EventDeathMsg( )
{
new iKiller = read_data( 1 );
new iVictim = read_data( 2 );

CheckAce( iVictim );

if( !iKiller || iKiller == iVictim || cs_get_user_team( iKiller ) == cs_get_user_team( iVictim ) )
{
return PLUGIN_CONTINUE;
}

g_iFrags[ iKiller ]++;

return PLUGIN_CONTINUE;
}

public LogEventRoundEnd( )
{
new iPlayers[ 32 ], iNum, player;

get_players( iPlayers, iNum, "ch" );

for( new i = 0; i < iNum; i++ )
{
player = iPlayers[ i ];

if( g_iFrags[ player ] >= SEMI_ACE )
{
DidAceOrSemi( player );

if( g_iFrags[ player ] == SEMI_ACE + 1 )
{
return PLUGIN_CONTINUE;
}
}
}

return PLUGIN_CONTINUE;
}

public CheckAce( id )
{
if( g_iFrags[ id ] >= SEMI_ACE )
{
DidAceOrSemi( id );
}

g_iFrags[ id ] = 0;
}

public DidAceOrSemi( id )
{
new iReturn = PLUGIN_CONTINUE;

ExecuteForward( iForward, iReturn, id, g_iFrags[ id ] );

if( iReturn == PLUGIN_HANDLED || iReturn == PLUGIN_HANDLED_MAIN )
{
return PLUGIN_HANDLED;
}

new szName[ 32 ];

get_user_name( id, szName, sizeof szName - 1 );

if(g_iFrags[id] == 4) {
ColorChat( 0, GREEN, "%s a REALIZAT UN SEMI-ACE", szName);
client_cmd(0, "mp3 play sound/misc/Semi-Ace.mp3");
}
else if(g_iFrags[id] == 5) {
ColorChat( 0, GREEN, "%s a REALIZAT UN ACE", szName);
client_cmd(0, "mp3 play sound/misc/Ace.mp3");
}

return PLUGIN_HANDLED;
}

public plugin_precache()
{
precache_sound("misc/Ace.mp3"); // sound
precache_sound("misc/Semi-Ace.mp3"); // sound
}




Pentru pluginuri complicate le fac cu $$ pe paypal/psc. PM

0 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID
Liviu3

[Sacred Legion]



Status: Offline
(since 07-10-2021 08:24)
Joined: 16 Dec 2011
Posts: 121, Topics: 45
Location: Bucuresti

Reputation: 76.6
Votes: 5

   
Post Posted: 16-01-2016, 23:56:09 | Translate post to: ... (Click for more languages)

Verific si revin cu un edit.

Edit: S-a rezolvat, mersi mult EDUTZ

0 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID

  Topic locked


Topic is closed, you cannot post any messages in it anymore

Locked by EDUTz, 17 January 2016 17:39



 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Freakz Forum Index -> Trash Bin -> CS 2006-2019 (Archived) -> Plugins - Help / Support  


The time now is 12-05-2024, 17:22:53
Copyright info

Based on phpBB ro/com
B

 
 
 







I forgot my password


This message appears only once, so
like us now until it's too late ! :D
x