Raised This Month: $ Target: $400
 0% 

Bug con synapsis


  
 
 
Thread Tools Display Modes
Author Message
KillLikoe
BANNED
Join Date: Nov 2010
Location: Paraguay
Old 12-01-2011 , 21:05   Bug con synapsis
#1

bueno lo que pasa es que una vez por mapa nomas puedo mandar synapsis, al intentar tirar por segunda vez se bugea y nadie se convierte en nemesis o survivor todos se quedan humanos
PHP Code:
 else if ((mode == MODE_NONE && (!preventconsecutive || g_lastmode != MODE_SYNAPSIS) && random_num(1get_pcvar_num(cvar_synapsischance)) == get_pcvar_num(cvar_synapsis) && floatround((iPlayersnum-2)*get_pcvar_float(cvar_synapsisratio), floatround_ceil) >= && iPlayersnum >= get_pcvar_num(cvar_synapsisminplayers)) || mode == MODE_SYNAPSIS)
    {    
        static 
iNemesisiSurvivoriMaxNemesisiMaxSurvivor
        iMaxNemesis 
7
        iMaxSurvivor 
3
        
        g_synapsisround 
true
        g_plagueround 
true
        g_lastmode 
MODE_SYNAPSIS
        
        
while (iSurvivor iMaxSurvivor)
        {
            
// Keep looping through all players
            
if (++id g_maxplayersid 1
            
            
// Choose random guy
            
id fnGetRandomAlive(random_num(1iPlayersnum))
            
            
// Continue
            
if (g_survivor[id] || g_nemesis[id])
                continue;
            
            
// Not alive
            
if (!is_user_alive(id))
                continue;
            
            
humanme(id1)
            
            
fm_set_user_health(id2500)
            
iSurvivor++
        }
        
        while (
iNemesis iMaxNemesis)
        {
            
// Keep looping through all players
            
if (++id g_maxplayersid 1
            
            
// Choose random guy
            
id fnGetRandomAlive(random_num(1iPlayersnum))
            
            
// Continue
            
if (g_survivor[id] || g_nemesis[id])
                continue;
            
            
// Not alive
            
if (!is_user_alive(id))
                continue;
            
            
zombieme(id010)
            
            
fm_set_user_health(id75000)
            
iNemesis++
        }    
       
        
// Finish
        
for (id 1id <= g_maxplayersid++)
        {
            
// Only those of them who arent zombies or survivor
            
if (!is_user_alive(id) || g_nemesis[id] )
                continue
                
            
// Remove previous tasks
            
remove_task(id+TASK_TEAM)            
            
fm_set_user_team(idCS_TEAM_CT)
            
set_task(0.1+g_teams_i"fm_set_user_team_msg"id+TASK_TEAM)
            
g_teams_i += 0.1// increase teams task counter
        
}
            
        
// Play plague sound
        
set_hudmessage(00255HUD_EVENT_XHUD_EVENT_Y10.05.01.01.0, -1)
        
ShowSyncHudMsg(0g_MsgSync"...Modo Synapsis...")
        
iSurvivor 0
        iNemesis 
0
              
        
// Round start forward
        
ExecuteForward(g_fwRoundStartg_fwDummyResultMODE_SYNAPSIS0);
    } 
code arreglado

Last edited by KillLikoe; 12-02-2011 at 00:32.
KillLikoe is offline
rak
Veteran Member
Join Date: Oct 2011
Location: banned country
Old 12-01-2011 , 23:11   Re: Bug con synapsis
#2

no tengo ni idea sigo fijandome.. ahh te olvidaste de poner g_lastmode = MODE_SYNAPSIS
__________________

www.amxmodx-es.com

Steam: Luchokoldo
rak is offline
Send a message via MSN to rak Send a message via Skype™ to rak
KillLikoe
BANNED
Join Date: Nov 2010
Location: Paraguay
Old 12-01-2011 , 23:13   Re: Bug con synapsis
#3

ahh cierto me olvide, aunque no uso el lastmode, igual voy a agregar, gracias

Last edited by KillLikoe; 12-01-2011 at 23:14.
KillLikoe is offline
rak
Veteran Member
Join Date: Oct 2011
Location: banned country
Old 12-01-2011 , 23:17   Re: Bug con synapsis
#4

PHP Code:
// Keep looping through all players
            
if (++id g_maxplayersid 
eso no esta de mas?
__________________

www.amxmodx-es.com

Steam: Luchokoldo
rak is offline
Send a message via MSN to rak Send a message via Skype™ to rak
KillLikoe
BANNED
Join Date: Nov 2010
Location: Paraguay
Old 12-01-2011 , 23:18   Re: Bug con synapsis
#5

no, eso hace que busque jugadores constantemente antes de llegar a 7 iMaxNemesis
KillLikoe is offline
rak
Veteran Member
Join Date: Oct 2011
Location: banned country
Old 12-02-2011 , 00:13   Re: Bug con synapsis
#6

estoy segurisimo que era por q no limpiaste los valores iSurvivor y iNemesis D:
__________________

www.amxmodx-es.com

Steam: Luchokoldo
rak is offline
Send a message via MSN to rak Send a message via Skype™ to rak
KillLikoe
BANNED
Join Date: Nov 2010
Location: Paraguay
Old 12-02-2011 , 00:28   Re: Bug con synapsis
#7

si, gracias rak
KillLikoe 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 21:49.


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