[Ayuda] BBpacks
#1
Hola quería saber si me pueden ayudar en 1 cosa, hice el tutorial de Geoslide
Tutorial : http://forums.alliedmods.net/showthread.php?t=193022
y cuando lo arme todo me tira 2 warning

Código PHP:
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c1997-2006 ITB CompuPhaseAMX Mod X Team

Warning
Loose indentation on line 1048
Warning
Loose indentation on line 1053
Header size
:           6108 bytes
Code size
:            90408 bytes
Data size
:            65136 bytes
Stack
/heap size:      16384 bytesmaxusage is unknowndue to recursion
Total requirements
:  178036 bytes

2 Warnings
.
Done


y también cuando compro vida cuando soy zombie, me quita toda la vida osea ponerle que el zombie tiene 3500 y cuando compras la vida te quita los 3500 y te pone los 150 nada mas osea tendría que tener 3650 pero en realidad tengo 150 ? como puedo arreglar eso.?

Código PHP:
case 1
        { 
            if(
g_bbpacks[id] >= 5)  
            { 
                
set_user_health(id150
                
print_color(id"%s Compraste 150 de^x04 HP"MODNAME
                
g_bbpacks[id] -= 
            

        } 

y también cuando mato a 1 zm o humano no sale el msj como tendría que salir
Código PHP:
public client_death(g_attackerg_victimwpnindexhitplaceTK)
{
    if (
cs_get_user_team(g_attacker) == CS_TEAM_CT// si el humano es el atacante 

    
g_bbpacks[g_attacker] += // acá quiere decir que le damos 3 bbpacks al humano cuando mata un zombie 
    
print_color(g_attacker"[Only - Gamer] %d BBPacks por matar a un^x04 zombie"// acá le mandamos un mensaje al ct cuando mata al zombie 

if (
g_isZombie[g_attacker]) // si el zombie es el atacante 

    
g_bbpacks[g_attacker] += // acá quiere decir que le damos 1 bbpack al zombie cuando mata a un humano 
    
print_color(g_attacker"[Only - Gamer] %d BBPacks por matar a un^x04 humano"// acá le mandamos un mensaje al zombie cuando mata al ct 

y también yo quiero que los humano también ganen bbpacks al matar 1 zombie, pero no lo gana el que gana al matar son los zombie

Me pueden ayudar por favor Gran sonrisa se lo agradecería mucho gracias.
Responder
#2
Código PHP:
case 1
        { 
            if(
g_bbpacks[id] >= 5)  
            { 
                
set_user_healthidget_user_healthid ) + 150
                
print_color(id"%s Compraste 150 de^x04 HP"MODNAME
                
g_bbpacks[id] -= 
            

        } 

Código PHP:
public client_death(g_attackerg_victimwpnindexhitplaceTK)
{
    if (
cs_get_user_team(g_attacker) == CS_TEAM_CT// si el humano es el atacante 

    
g_bbpacks[g_attacker] += // acá quiere decir que le damos 3 bbpacks al humano cuando mata un zombie 
    
print_color(g_attacker"[Only - Gamer] 3 BBPacks por matar a un^x04 zombie"// acá le mandamos un mensaje al ct cuando mata al zombie 

if (
g_isZombie[g_attacker]) // si el zombie es el atacante 

    
g_bbpacks[g_attacker] += // acá quiere decir que le damos 1 bbpack al zombie cuando mata a un humano 
    
print_color(g_attacker"[Only - Gamer] 1 BBPacks por matar a un^x04 humano"// acá le mandamos un mensaje al zombie cuando mata al ct 
Responder
#3
(05/12/2013, 07:43 PM)Frosst escribió:
Código PHP:
case 1
        { 
            if(
g_bbpacks[id] >= 5)  
            { 
                
set_user_healthidget_user_healthid ) + 150
                
print_color(id"%s Compraste 150 de^x04 HP"MODNAME
                
g_bbpacks[id] -= 
            

        } 

Código PHP:
public client_death(g_attackerg_victimwpnindexhitplaceTK)
{
    if (
cs_get_user_team(g_attacker) == CS_TEAM_CT// si el humano es el atacante 

    
g_bbpacks[g_attacker] += // acá quiere decir que le damos 3 bbpacks al humano cuando mata un zombie 
    
print_color(g_attacker"[Only - Gamer] 3 BBPacks por matar a un^x04 zombie"// acá le mandamos un mensaje al ct cuando mata al zombie 

if (
g_isZombie[g_attacker]) // si el zombie es el atacante 

    
g_bbpacks[g_attacker] += // acá quiere decir que le damos 1 bbpack al zombie cuando mata a un humano 
    
print_color(g_attacker"[Only - Gamer] 1 BBPacks por matar a un^x04 humano"// acá le mandamos un mensaje al zombie cuando mata al ct 

Gracias me sirvió también tengo 1 pregunta como puedo hacer que los ct y tt ganen bbpacks porque el tt osea el zombie solamente gana bbpacks?
Responder
#4
No entendí lo último. Querés hacer que el zombie nada más gane bbpacks? Porque en ese code están ganando los 2
Responder
#5
osea mira cuando hay 2 zombie el ct por fin puede ganar bbpacks pero cuando hay 1 zm el ct no gana ningun bbpacks

2- Tambien el zm cuando mata gana doble osea dice esto

[Only - Gamer]Has obtenido |3| BBPacks por haber matado a un --[ZOMBIE]--
[Only - Gamer]Has obtenido |4| BBPacks por haber matado a un --[HUMANO]--

Osea gano 4 bbpacks por matar a 1 humano esta bien pero me dice 3 bbpacks por haber matado a un zombie osea si yo soy zm como gano 3 bbpacks por haber matado a 1 zombie?

Esto me salta cuando soy zm y mato a un humano en say
[Imagen: wT2N2tW.png]
Responder
#6
para que en el futuro no posties debuelta un code solo por este tipo de errores, ese tipo de warning se genera por problemas de tabulacion, quiere decir que pones mal los espacios entre las lineas:
Ejemplo:
Código PHP:
public Funcion()
{
   if ( 
)
   {
               
FuncionDos()// Mal tabulado
        
FuncionTres()
        
FuncionCuatro()
   }

Responder


Salto de foro:


Usuarios navegando en este tema: 1 invitado(s)