[Plugin] AutoRespawn
Results 1 to 6 of 6

Thread: AutoRespawn

  1. #1
    Junior Member Array
    Join Date
    Apr 2018
    Karma
    0

    Default AutoRespawn

    Dosta se trazi u poslednje vreme Auto Respawn plugin. Dosta jednostavan i dobar plugin
    za Knife, DR, Surf, DM, ZM servere... Ja ga koristim za Knife mod i odlicno radi, bez gresaka.


    amx_cvar autorespawn_ukljucen (0 - Iskljucen Respawn, 1 - Ukljucen Respawn)
    amx_cvar respawn_sekunde (Posle koliko sekundi ce se igrac respawnovati)
    /respawn (Respawnuje igraca ako je mrtav i slucajno se ne respawnuje)


    Predlazem vam da gasite plugin dok ne koristite Respawn, jer ja ga palim dva puta dnevno. Ako radite isto sto
    i ja onda morate da gasite plugin dok nema respawna inace ce igracti moci da koriste /respawn kad god hoce.
    Ali ako vam treba stalno da radi, ovaj plugin je odlican i siguran sam da ce vam posluziti.


    PHP Code:
    #include <amxmodx>
    #include <hamsandwich>
    #include <CromChat>
    #include <cstrike>
    #include <fun>

    new const PLUGIN[ ] = "Auto Respawn"
    new const VERSION[ ] = "1.0"
    new const AUTHOR[ ] = "Besir"
    new cvar1;
    new 
    cvar2;

    public 
    plugin_init( ) 
    {
        
    register_pluginPLUGINVERSIONAUTHOR );
        
        
    cvar1 register_cvar"autorespawn_ukljucen",     "0" );
        
    cvar2 register_cvar"respawn_sekunde",     "1.0" );
        
        
    register_clcmd("say /respawn""RespawnujMe")
        
    register_clcmd("say_team /respawn""RespawnujMe")
        
        
    RegisterHam(Ham_Killed"player""Ham_PlayerKilled"1)
    }

    public 
    Ham_PlayerKilledvictimattacker )
    {
        if( !
    is_user_connectedattacker ) || !get_pcvar_numcvar1 ) )
            return;
        
        
    set_taskget_pcvar_floatcvar2 ), "respawn"victim );
    }

    public 
    respawnid )    
    {
        
    ExecuteHamBHam_CS_RoundRespawnid )
        
    give_item(id"weapon_knife")
        
    CC_SendMessage(id"&x04[&x03Auto-Respawn&x04] &x04Respawnovao si se")
        return 
    PLUGIN_HANDLED
    }
    public 
    RespawnujMe(id)
    {
        
    ExecuteHamBHam_CS_RoundRespawnid )
        
    give_item(id"weapon_knife")
        
    CC_SendMessage(id"&x04[&x03Auto-Respawn&x04] &x04Respawnovao si se")
        return 
    PLUGIN_HANDLED


  2. #2
    Senior Member Array
    Join Date
    Aug 2010
    Location
    Nis, Cair, Jamajka
    Karma
    13

    Default

    opasan plagin, nema sta...koristicu ga zasigurno, hhvala care!

  3. #3
    Junior Member Array
    Join Date
    Mar 2016
    Karma
    0

    Default

    Nece se kompajluje izbacuje ovu gresku /tmp/textgPZyoA.sma(3) : fatal error 100: cannot read from file: "CromChat"
    Jel neko moze da ispravi?

  4. #4
    Senior Member Array
    Join Date
    Mar 2010
    Location
    Serbia
    Age
    22
    Karma
    21

    Default

    Quote Originally Posted by Kifla Cacak View Post
    Nece se kompajluje izbacuje ovu gresku /tmp/textgPZyoA.sma(3) : fatal error 100: cannot read from file: "CromChat"
    Jel neko moze da ispravi?
    Preuzmi CromChat.inc (https://github.com/OciXCrom/CromChat/archive/master.zip)

  5. #5
    Junior Member Array
    Join Date
    Mar 2016
    Karma
    0

    Default

    Izvini ali ja sam pokusao ovo online da kompajlujem i izaslo je ovo, ne znam ni kako se to ubacuje, ako mozes ti da mi posaljes amxx na pm

  6. #6
    Senior Member Array
    Join Date
    Jun 2013
    Location
    K und K monarhija
    Karma
    20

    Default

    1. Bespotrebno imas dve potpuno identicne funkcije.
    2. Problem sa '/respawn' komandom mozes resiti tako sto ces proveriti da li je cvar upaljen.
    3. Mislim da nema potrebe za ovim includeom, samo komplikujes, mada je to tvoja stvar kao autora plugina ali zbog toga ce neko morati da se bakce da kompajluje lokalno(a isti je rezultat).

    Predpostavljam da si totalni pocetnik ili te ovo uopste ni ne zanima, samo si sklepao nesto za sebe, uglavnom, malo optimizovanije:

    Code:
    #include <amxmodx> 
    #include <hamsandwich>
    #include <cstrike> 
    #include <fun> 
    
    new const PLUGIN[ ] = "Auto Respawn" 
    new const VERSION[ ] = "1.0" 
    new const AUTHOR[ ] = "Besir" 
    new cvar1; 
    new cvar2; 
    
    public plugin_init( )  
    { 
        register_plugin( PLUGIN, VERSION, AUTHOR ); 
         
        cvar1 = register_cvar( "autorespawn_ukljucen",     "0" ); 
        cvar2 = register_cvar( "respawn_sekunde",     "1.0" ); 
         
        register_clcmd("say /respawn", "respawn") 
        register_clcmd("say_team /respawn", "respawn") 
         
        RegisterHam(Ham_Killed, "player", "Ham_PlayerKilled", 1) 
    } 
    
    public Ham_PlayerKilled( victim, attacker ) 
    { 
        if( !is_user_connected( attacker ) || !get_pcvar_num( cvar1 ) ) 
            return; 
         
        set_task( get_pcvar_float( cvar2 ), "respawn", victim ); 
    } 
    
    public respawn( id ) {
        if(!get_pcvar_num(cvar1)) return 0;
        ExecuteHamB( Ham_CS_RoundRespawn, id ) 
        give_item(id, "weapon_knife") 
        client_print(id, print_chat, "[Auto-Respawn] Respawnovao si se") 
        return PLUGIN_HANDLED 
    }
    double penetration sadomazo satisfaction
    kao svedski akcioni kada kazu action

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •