Jump to content
News ticker
  • Bienvenue sur le nouveau forum VeryGames
  • Welcome to the new VeryGames forum
  • VeryNews

    [AIDE]Rajouter une CPrintTochat a un plugin


    Guest miew627
     Share

    Recommended Posts

    Guest miew627

    Bonjour,

    Voila j'aurai besoin de votre aide , ou explication pour pouvoir ajouter un CPrintToChat au demarrage du round qui dirais " veuiller taper !bunny pour activer/desactiver l'autobunny"

     

    je vous montre la source :(source de infinity-jump légerement modifiée pour la commande d'activation .

     

    D'avance merci

    Link to comment
    Share on other sites

    Ligne 61 ajoute ceci :

    #include <colors>
    

     

    Ligne 245 ajoute ceci :

    HookEvent("round_start", Event_Round_Start);
    

     

    Ligne 550 ajoute ceci :

    public Action:Event_Round_Start(Handle:event, const String:name[], bool:dontBroadcast)
    {
    CPrintToChatAll("{green}[JUMP] {lightgreen}Veuiller taper !bunny pour activer/désactiver l'autobunny");
    }
    

     

    Principalement ça fonctionneras.

     

    Kriax.

    Link to comment
    Share on other sites

    Tu avais créé l'event dans un event en-fait.

     

    Tu as copié mon bous de code une ligne plus bas ^^

     

    Ton code (erreur

    public Action:Event_Player_Hurt(Handle:event, const String:name[], bool:dontBroadcast){
    public Action:Event_Round_Start(Handle:event, const String:name[], bool:dontBroadcast)
    {
    CPrintToChatAll("{green}[R4zen'jumping] {lightgreen}Veuillez taper !bunny pour activer/désactiver l'autobunny");
    }      
           if(g_iPlugin_Enable == 0){
                   return Plugin_Continue;
           }
    
           if(g_flPlugin_Or_SlowDownOnHurt == -1.0){
                   return Plugin_Continue;
           }
    
           if(g_Offset_m_flVelocityModifier < 1){
                   return Plugin_Continue;
           }
    
           new client = GetClientOfUserId(GetEventInt(event, "userid"));
    
           if(!g_bAllow_AntiSlowDowns[client] || IsFakeClient(client)){
                   return Plugin_Continue;
           }
    
           Client_PrintDebug(client,"setting your: m_flVelocityModifier (off: %d) to: %f",g_Offset_m_flVelocityModifier,g_flPlugin_Or_SlowDownOnHurt);
    
           SetEntDataFloat(client, g_Offset_m_flVelocityModifier, g_flPlugin_Or_SlowDownOnHurt, true);
    
           return Plugin_Continue;
    }
    

     

    La solution :

     

    public Action:Event_Round_Start(Handle:event, const String:name[], bool:dontBroadcast)
    {
       CPrintToChatAll("{green}[R4zen'jumping] {lightgreen}Veuillez taper !bunny pour activer/désactiver l'autobunny");
    }    
    
    public Action:Event_Player_Hurt(Handle:event, const String:name[], bool:dontBroadcast){  
           if(g_iPlugin_Enable == 0){
                   return Plugin_Continue;
           }
    
           if(g_flPlugin_Or_SlowDownOnHurt == -1.0){
                   return Plugin_Continue;
           }
    
           if(g_Offset_m_flVelocityModifier < 1){
                   return Plugin_Continue;
           }
    
           new client = GetClientOfUserId(GetEventInt(event, "userid"));
    
           if(!g_bAllow_AntiSlowDowns[client] || IsFakeClient(client)){
                   return Plugin_Continue;
           }
    
           Client_PrintDebug(client,"setting your: m_flVelocityModifier (off: %d) to: %f",g_Offset_m_flVelocityModifier,g_flPlugin_Or_SlowDownOnHurt);
    
           SetEntDataFloat(client, g_Offset_m_flVelocityModifier, g_flPlugin_Or_SlowDownOnHurt, true);
    
           return Plugin_Continue;
    }
    

    Kriax.

    Link to comment
    Share on other sites

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Reply to this topic...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

     Share

    ×
    ×
    • Create New...