Raised This Month: $ Target: $400
 0% 

Why does those 2 plugins not work?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
MrKiller2010
Senior Member
Join Date: Aug 2012
Old 07-27-2013 , 06:13   Why does those 2 plugins not work?
Reply With Quote #1

So i searched around for things i needed. I found those two by Arkshine.
But i tried them and none works. I don't know why.



Code:
    #include <amxmodx>         new gi_FriendlyFire;         public plugin_init ()     {         register_plugin ( "Block Attack/Kill Teammates Messages", "1.0.0", "Arksine" );                 gi_FriendlyFire = get_cvar_pointer ( "mp_friendlyfire" );                 if ( !get_pcvar_num ( gi_FriendlyFire ) )         {             pause ( "ad" );             return;         }                 register_message ( get_user_msgid ( "TextMsg" ), "m_TextMsg" );     }         public m_TextMsg ( msg_id, msg_type, msg_id )     {         if ( get_msg_arg_int ( 1 ) == print_notify )         {             return PLUGIN_CONTINUE;         }             static s_Message[ 22 ];         get_msg_arg_string  ( 2, s_Message, charsmax ( s_Message ) );                 if ( equal ( s_Message, "#Game_teammate_attack" ) || equal ( s_Message, "#Killed_Teammate" ) || equal ( s_Message, "#Game_teammate_kills" ) )         {             return PLUGIN_HANDLED;         }                 return PLUGIN_CONTINUE;     }         /* -- Informations --             s_Message = #Game_teammate_attack | print_chat         s_Message = #Killed_Teammate      | print_center         s_Message = #Game_teammate_kills  | print_console     */

Second request :

Code:
      #include <amxmodx>     #include <fakemeta>         #define FRAGS_TO_ADD 1         new gi_FriendlyFire;         #define MAX_CLIENTS 32     new bool:gb_TeamKill[ MAX_CLIENTS + 1 ];         public plugin_init ()     {         register_plugin ( "Teamkill Frag", "1.0.0", "Arksine" );                 gi_FriendlyFire = get_cvar_pointer ( "mp_friendlyfire" );                 if ( !get_pcvar_num ( gi_FriendlyFire ) )         {             pause ( "ad" );             return;         }                 register_event ( "DeathMsg", "e_DeathMsg", "a" );         register_message ( get_user_msgid ( "ScoreInfo" ), "m_ScoreInfo" );     }             public client_putinserver ( id )     {         gb_TeamKill[ id ] = false;     }         public m_ScoreInfo ( msg_id, msg_type, msg_id )     {         new id = get_msg_arg_int ( 1 );           if ( gb_TeamKill[ id ] )         {             gb_TeamKill[ id ] = false;             new i_CurrentFrag = get_msg_arg_int ( 2 );                         i_CurrentFrag += FRAGS_TO_ADD + 1;                         set_pev ( id, pev_frags, i_CurrentFrag * 1.0 );             set_msg_arg_int ( 2, ARG_SHORT, i_CurrentFrag );         }     }         public e_DeathMsg ()     {           new i_Killer = read_data ( 1 );         new i_Victim = read_data ( 2 );                 if ( get_user_team ( i_Killer ) == get_user_team ( i_Victim ) )         {             gb_TeamKill[ i_Killer ] = true;         }     }


Link to thread: https://www.sourcemod.net/showthread.php?t=72295
MrKiller2010 is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:24.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode