CSPLague
Otomatik respawn (Belirli modlarda) - Printable Version

+- CSPLague (https://www.csplague.com)
+-- Forum: CS 1.6 Plugin (Eklenti) Bölümü (https://www.csplague.com/forumdisplay.php?fid=6)
+--- Forum: [İSTEK] Cs 1.6 Plugin İstek Bölümü (https://www.csplague.com/forumdisplay.php?fid=80)
+---- Forum: Çözülmüş İstekler (https://www.csplague.com/forumdisplay.php?fid=87)
+---- Thread: Otomatik respawn (Belirli modlarda) (/showthread.php?tid=9505)

Pages: 1 2


Otomatik respawn (Belirli modlarda) - wienli - 01-02-14

Arkadaslar oyuncu sunucuya girdiginde otomatik olarak respawn olmasini istiyorum. Fakat sadece multi infection modu, swarm ve normal infection modunda respawn olmasi lazim. Survivor armageddon veya nemesis gibi modlarda respawn olmasini istemiyorum. Ve respawn olan oyuncu human olarak yani insan olarak respawn olmasi lazim.
Yardimci olacak arkadaslara tesekkürler.


Cevap: Otomatik respawn (Belirli modlarda) - JDM - 01-02-14

Emin değilim ama...


PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <zombieplague>
#include <hamsandwich>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "JDM"

new g_maxplayers
public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
g_maxplayers get_maxplayers();
}
public 
zp_round_started(gamemodeid) {
    if(
gamemode == MODE_MULTI) {
        for(new 
id 1;id<=g_maxplayers;id++) {
            if(!
is_user_alive(id)) {
                
ExecuteHamB(Ham_CS_RoundRespawn,id)
            }
        }
        } else if(
gamemode == MODE_SWARM) {
        for(new 
id 1;id<=g_maxplayers;id++) {
            if(!
is_user_alive(id)) {
                
ExecuteHamB(Ham_CS_RoundRespawn,id)
            }
        }
        } else if(
gamemode == MODE_INFECTION) {
        for(new 
id 1;id<=g_maxplayers;id++) {
            if(!
is_user_alive(id)) {
                
ExecuteHamB(Ham_CS_RoundRespawn,id)
            }
        }
    }




Cevap: Otomatik respawn (Belirli modlarda) - wienli - 03-02-14

tsk kardes bi deniyorum hemen olursa düzeltip cvp vereegim.

Edit:

Hata veriyor



L 02/02/2014 - 23:26:51: [HAMSANDWICH] Entity has null private data (11)
L 02/02/2014 - 23:26:51: [AMXX] Displaying debug trace (plugin "respawn.amxx")
L 02/02/2014 - 23:26:51: [AMXX] Run time error 10: native error (native "ExecuteHamB")
L 02/02/2014 - 23:26:51: [AMXX] [0] respawn.sma::client_putinserver (line 19)
L 02/02/2014 - 23:26:52: [HAMSANDWICH] Entity has null private data (12)
L 02/02/2014 - 23:26:52: [AMXX] Displaying debug trace (plugin "respawn.amxx")
L 02/02/2014 - 23:26:52: [AMXX] Run time error 10: native error (native "ExecuteHamB")
L 02/02/2014 - 23:26:52: [AMXX] [0] respawn.sma::client_putinserver (line 19)


Cevap: Otomatik respawn (Belirli modlarda) - JDM - 03-02-14

Tekrar deneyin...


Cevap: Otomatik respawn (Belirli modlarda) - wienli - 12-02-14

malesef yine olmadi

L 02/12/2014 - 17:54:22: Start of error session.
L 02/12/2014 - 17:54:22: Info (map "zm_five") (file "addons/amxmodx/logs/error_20140212.log")
L 02/12/2014 - 17:54:22: [HAMSANDWICH] Entity has null private data (1)
L 02/12/2014 - 17:54:22: [AMXX] Displaying debug trace (plugin "respawn.amxx")
L 02/12/2014 - 17:54:22: [AMXX] Run time error 10: native error (native "ExecuteHamB")
L 02/12/2014 - 17:54:22: [AMXX] [0] respawn.sma::zp_round_started (line 33)


Edit: Konu neden cözülmüs isteklere tasindi? Sorunum devam ediyor malesef.


Cevap: Otomatik respawn (Belirli modlarda) - JDM - 15-02-14

Aradan 9 gün geçtiği için konu otomatik çözüldü kabul edilip çözülmüş isteklere taşınıyor aksi takdirde 7 günü geçen konular güncelliğini kaybettiği için çöpe taşınıyor bende konu ziyan olmasın diye çözülmüşlere taşıdım.


Cevap: Otomatik respawn (Belirli modlarda) - wienli - 16-02-14

Baska bir forumda istegimi belirttim ve saolsun plugini verdiler. Ihtiyaci olan varsa kodlar asagida. Yardimin icin tesekkürler

Code:
#include <amxmodx>  
#include <hamsandwich>  
#include <zp50_core>  
#include <zp50_gamemodes>  

#define _PLUGIN   "[ZP50] Respawn System"  
#define _AUTHOR        "H.RED.ZONE"  
#define _VERSION           "1.0"  

#define TASK_AUTORESPAWN  100  
#define ID_AUTORESPAWN (taskid - TASK_AUTORESPAWN)  

const Float:AUTORESPAWN_DELAY = 5.0  

new _gGameModeNemesisID, _gGameModeSurvivorID, _gGameModeMultiID, _gGameModeInfectionID,  _gGameModeSwarmID  
    
new _pCvarDeathMatch
new _gMaxPlayers  

public plugin_init()
{  
    register_plugin(_PLUGIN, _VERSION, _AUTHOR)  
      
    register_clcmd("joinclass","cmd_joinclass")  
      
    register_menucmd(register_menuid("Terrorist_Select",1),511,"cmd_joinclass")  
    register_menucmd(register_menuid("CT_Select",1),511,"cmd_joinclass")  
          
    _gMaxPlayers = get_maxplayers()  
}  

public plugin_cfg()  
{  
    _gGameModeNemesisID = zp_gamemodes_get_id("Nemesis Mode")  
    _gGameModeSurvivorID = zp_gamemodes_get_id("Survivor Mode")  
    _gGameModeMultiID = zp_gamemodes_get_id("Multiple Infection Mode")
    _gGameModeInfectionID = zp_gamemodes_get_id("Infection Mode")
    _pCvarDeathMatch = get_cvar_pointer("zp_deathmatch")
    _gGameModeSwarmID = zp_gamemodes_get_id("Swarm Mode")
}  

public cmd_joinclass(id)  
{  
    if (!get_pcvar_num(_pCvarDeathMatch))  
        return;  
    

         if(zp_gamemodes_get_current() == _gGameModeInfectionID || zp_gamemodes_get_current() == _gGameModeMultiID || zp_gamemodes_get_current() == _gGameModeSwarmID) {
                  set_task(AUTORESPAWN_DELAY, "auto_respawn_player", id+TASK_AUTORESPAWN)  
    }
}  

public auto_respawn_player(taskid)  
{  
    if (is_user_alive(ID_AUTORESPAWN))  
        return;  
      
    if( zp_gamemodes_get_current() == _gGameModeSurvivorID )  
    {  
        zp_core_respawn_as_zombie(ID_AUTORESPAWN, true)  
        
    }  
    
    else if( zp_gamemodes_get_current() == _gGameModeNemesisID )  
    {  
        zp_core_respawn_as_zombie(ID_AUTORESPAWN, false)  
    }  
    
    else if (!is_user_alive(ID_AUTORESPAWN) || get_pcvar_num(_pCvarDeathMatch) == 2 || (get_pcvar_num(_pCvarDeathMatch) == 3 && random_num(0, 1)) || (get_pcvar_num(_pCvarDeathMatch) == 4 && zp_core_get_zombie_count() < fnGetAlive()/2))  
    {  
                zp_core_respawn_as_zombie(ID_AUTORESPAWN, true)  
    }  
    
    else  
    
    {  
        zp_core_respawn_as_zombie(ID_AUTORESPAWN, false)  
    }  
    
    ExecuteHamB(Ham_CS_RoundRespawn, ID_AUTORESPAWN)  
}  

fnGetAlive()
{  
    new iAlive, id  
      
    for (id = 1; id <= _gMaxPlayers; id++)
    {  
        if (is_user_alive(id))  
            iAlive++  
    }  
    return iAlive;  
}



Cevap: Otomatik respawn (Belirli modlarda) - JDM - 16-02-14

zp5.0 için ama bu?


Cevap: Otomatik respawn (Belirli modlarda) - wienli - 16-02-14

evet dogru


Cevap: Otomatik respawn (Belirli modlarda) - JDM - 16-02-14

Baştan söylemedin... neyse konu çözülmüş isteklere taşındı.