Aller au contenu
News ticker
  • Bienvenue sur le nouveau forum VeryGames
  • Welcome to the new VeryGames forum
  • VeryNews

    Cherche plugin "Quand on kill quelqu'un"


    ciMsoC

    Messages recommandés

    Salutations,

     

    Voila je suis à la recherche d'un plugin qui, lorsque l'on ture quelqu'un dans condition-zéro, il y a une sorte de flash vert (ou bleu, jaune, touge ... ca varie selon les plugins et les serveurs).

    J'ai vu ça sur des serveurs et j'aimerai le mettre.

     

    Je vous remercie par avance

    Cordialement.

     

     

    EDIT : Sur ce deathmatch ( 94.23.2.227:28015 ) il y a ce que je cherche lorsqu'on tue quelqu'un, qui sait le nom ?

    Modifié par ciMsoC
    Lien vers le commentaire
    Partager sur d’autres sites

    Le temps que dure la couleur en secondes:

    amx_kill_notifier_duration < durée >

     

    La couleur et l'intensité (alpha) de la couleur :

    amx_kill_notifier < RRRGGGBBBAAA >

     

    de 000 à 255 pour chaque valeur R=rouge G=vert B=blue A=alpha

     

    Pas testé mais ça compile.

     

    /*	Copyright © 2008, ConnorMcLeod
    
    Kill Flash Notifier is free software;
    you can redistribute it and/or modify it under the terms of the
    GNU General Public License as published by the Free Software Foundation.
    
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
    
    You should have received a copy of the GNU General Public License
    along with Kill Flash Notifier; if not, write to the
    Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.
    */
    
    #include <amxmodx>
    
    #pragma semicolon 1
    
    #define PLUGIN "Kill Flash Notifier"
    #define AUTHOR "ConnorMcLeod"
    #define VERSION "0.0.2"
    
    enum {
    Red,
    Green,
    Blue
    };
    
    new g_pCvarProps, g_pCvarHoldTime;
    
    public plugin_init()
    {
    register_plugin( PLUGIN, VERSION, AUTHOR );
    
    g_pCvarProps = register_cvar("amx_kill_notifier", "000255200050");
    g_pCvarHoldTime = register_cvar("amx_kill_notifier_duration", "0.15");
    
    register_event("DeathMsg", "Event_DeathMsg", "a");
    }
    
    public Event_DeathMsg()
    {
    new id = read_data(1);
    if( !is_user_connected(id) )
    	return;
    
    new szProps[13];
    get_pcvar_string(g_pCvarProps,szProps,charsmax(szProps));
    
    new iColor[3], iAlpha;
    new c = str_to_num(szProps);
    iColor[Red] = c / 1000000000;
    c %= 1000000000;
    iColor[Green] = c / 1000000;
    c %= 1000000;
    iColor[blue] = c / 1000;
    iAlpha = c % 1000;
    
    UTIL_ScreenFade(id, iColor, get_pcvar_float(g_pCvarHoldTime), iAlpha);
    }
    
    UTIL_ScreenFade(id, iColor[3], Float:flHoldTime, iAlpha)
    {
    static gmsgScreenFade;
    if( !gmsgScreenFade )
    {
    	gmsgScreenFade = get_user_msgid("ScreenFade");
    }
    
    new iHoldTime = FixedUnsigned16( flHoldTime , 1<<12 );
    
    message_begin( MSG_ONE_UNRELIABLE, gmsgScreenFade, _, id );
    write_short( iHoldTime );
    write_short( iHoldTime );
    write_short( 0x0000 );
    write_byte( iColor[Red] );
    write_byte( iColor[Green] );
    write_byte( iColor[blue] );
    write_byte( iAlpha );
    message_end();
    }
    
    FixedUnsigned16(Float:flValue, iScale)
    {
    new iOutput;
    
    iOutput = floatround(flValue * iScale);
    
    if ( iOutput < 0 )
    	iOutput = 0;
    
    if ( iOutput > 0xFFFF )
    	iOutput = 0xFFFF;
    
    return iOutput;
    }

    Modifié par dentelle
    Lien vers le commentaire
    Partager sur d’autres sites

    Rejoindre la conversation

    Vous pouvez publier maintenant et vous inscrire plus tard. Si vous avez un compte, connectez-vous maintenant pour publier avec votre compte.

    Invité
    Répondre à ce sujet…

    ×   Collé en tant que texte enrichi.   Coller en tant que texte brut à la place

      Seulement 75 émoticônes maximum sont autorisées.

    ×   Votre lien a été automatiquement intégré.   Afficher plutôt comme un lien

    ×   Votre contenu précédent a été rétabli.   Vider l’éditeur

    ×   Vous ne pouvez pas directement coller des images. Envoyez-les depuis votre ordinateur ou insérez-les depuis une URL.

    ×
    ×
    • Créer...