Raised This Month: $12 Target: $400
 3% 

[ES] - [EN] Class Zombie Evolution Cs1.6 Help.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
szA
Junior Member
Join Date: Nov 2023
Old 11-30-2023 , 14:41   [ES] - [EN] Class Zombie Evolution Cs1.6 Help.
Reply With Quote #1

ZP5.0
PHP Code:
#include < amxmodx > 
#include < fun > 
#include < hamsandwich > 
#include < colorchat > 
#include < zp50_core > 
#include < zp50_class_zombie > 
#include < zp50_class_nemesis > 
#include < cs_maxspeed_api >  

#define _MarkPlayerIsEvolution(%0)      _bitPlayerIsEvolution |= (1 << (%0 & 31)) 
#define _ClearPlayerIsEvolution(%0)     _bitPlayerIsEvolution &= ~(1 << (%0 & 31)) 
#define _IsPlayerIsEvolution(%0)        _bitPlayerIsEvolution & (1 << (%0 & 31)) 

new _bitPlayerIsEvolution 

new g_ZombieClassID 

new evolution_level[33

new const 
zombieclass1_name[] = "Evo Zombie" 
new const zombieclass1_info[] = "Spawn Evolution" 
new const zombieclass1_models[][] = { "zombie_source" }  
new const 
zombieclass1_clawmodels[][] = { "models/zombie_plague/v_knife_zombie.mdl" 
const 
zombieclass1_health 1500 
const Float:zombieclass1_speed 0.48 
const Float:zombieclass1_gravity 1.00 
const Float:zombieclass1_knockback 1.0  

public plugin_init() 

    
register_plugin("[ZP] Class: Zombie: Evolution Zombie""1.0""H.RED.ZONE"
     
    
RegisterHam(Ham_Killed"player""fw_PlayerKilled"


public 
plugin_precache() 

    new 
index 
     
    g_ZombieClassID 
zp_class_zombie_register(zombieclass1_namezombieclass1_infozombieclass1_healthzombieclass1_speedzombieclass1_gravity
    
zp_class_zombie_register_kb(g_ZombieClassIDzombieclass1_knockback
     
    for(
index 0index sizeof zombieclass1_modelsindex++) 
        
zp_class_zombie_register_model(g_ZombieClassIDzombieclass1_models[index]) 
         
    for(
index 0index sizeof zombieclass1_clawmodelsindex++) 
        
zp_class_zombie_register_claw(g_ZombieClassIDzombieclass1_clawmodels[index]) 


public 
fw_PlayerKillediVictimiKilleriShouldGib 

    if(
is_user_alive(iKiller) && is_user_connected(iVictim)) 
    { 
        if(
_IsPlayerIsEvolution(iVictim)) 
        { 
             
            if(
evolution_level[iVictim] < 5
            {             
                
evolution_level[iVictim]++ 
                
ColorChat(iVictimTEAM_COLOR"^4[ZP]^1 Tu Nivel de Evolución es %d"evolution_level
            } 

            else 

            { 
                
ColorChat(iVictimTEAM_COLOR"^4[ZP]^1 Llegaste al maximo de Evolucion"evolution_level
            }             
        } 
    } 


public 
zp_fw_core_infect(idattacker)

    if(
zp_class_zombie_get_current(id) == g_ZombieClassID
    { 
        
_MarkPlayerIsEvolution(id
        
ColorChat(idTEAM_COLOR"^4[ZP]^1 Llevas la Evolucion en la sangre."evolution_level
    } 


public 
zp_fw_core_cure_pre(idattacker

    if(
is_user_alive(id) && _IsPlayerIsEvolution(id)) 
    { 
        
_ClearPlayerIsEvolution(id
        
evolution_level[id] = 
    



public 
zp_fw_core_spawn_post(id

    if(
is_user_alive(id) && _IsPlayerIsEvolution(id)) 
    { 
         
        new 
_EvolutionHealthFloat:_EvolutionSpeedFloat:_EvolutionGravity 
         
        
switch(evolution_level[id]) 
        { 
            case 
1
            { 
                
_EvolutionHealth 300 
                _EvolutionSpeed 
0.58 
                _EvolutionGravity 
0.88 
            


            case 
2
            { 
                
_EvolutionHealth 600 
                _EvolutionSpeed 
0.68 
                _EvolutionGravity 
0.78 
            


            case 
3
            { 
                
_EvolutionHealth 900 
                _EvolutionSpeed 
0.78 
                _EvolutionGravity 
0.68 
            


            case 
4
            { 
                
_EvolutionHealth 1200 
                _EvolutionSpeed 
0.88 
                _EvolutionGravity 
0.58 
            


            case 
5
            { 
                
_EvolutionHealth 1500 
                _EvolutionSpeed 
0.98 
                _EvolutionGravity 
0.48 
            

        }     

        if(
evolution_level[id] < || evolution_level[id] != 0
        { 
            
cs_set_player_maxspeed(id_EvolutionSpeed
            
set_user_health(idget_user_health(id) + _EvolutionHealth
            
set_user_gravity(id_EvolutionGravity
            
ColorChat(idTEAM_COLOR"^4[ZP]^1 Cada vez mas fuerte!!!"evolution_level
        }  
    } 

[EN]
Bien, este es mi problema
1- Quiero saber si puedo mejorar este código para que funcione.
2- Los errores que me da con este es que cuando el zombie muere no aparece con las evoluciones, sigue con 0.
Alguna ayuda o algo?.

Tengo entendido que cada vez que muera este Zombie aparece con más Velocidad, Gravedad, y Vida

[EN]
Well, here is my problem.
1- I want to know if I can improve this code to make it work.
2- The errors that I get with this one is that when the zombie dies it doesn't appear with the evolutions, it continues with 0.
Any help or something?.

I understand that every time I die this Zombie appears with more Speed, Gravity, and Life.

Last edited by szA; 11-30-2023 at 14:43.
szA is offline
bigdaddy424
Senior Member
Join Date: Oct 2021
Location: Jupiter
Old 11-30-2023 , 23:11   Re: [ES] - [EN] Class Zombie Evolution Cs1.6 Help.
Reply With Quote #2

try this
PHP Code:
#include < amxmodx > 
#include < fun > 
#include < hamsandwich > 
#include < colorchat > 
#include < zp50_core > 
#include < zp50_class_zombie > 
#include < zp50_class_nemesis > 
#include < cs_maxspeed_api >  

#define _MarkPlayerIsEvolution(%0)        _bitPlayerIsEvolution |= (1 << (%0 & 31)) 
#define _ClearPlayerIsEvolution(%0)        _bitPlayerIsEvolution &= ~(1 << (%0 & 31)) 
#define _IsPlayerIsEvolution(%0)        _bitPlayerIsEvolution & (1 << (%0 & 31)) 

new _bitPlayerIsEvolution 

new g_ZombieClassID 

new evolution_level[33

new const 
zombieclass1_name[] = "Evo Zombie" 
new const zombieclass1_info[] = "Spawn Evolution" 
new const zombieclass1_models[][] = { "zombie_source" }  
new const 
zombieclass1_clawmodels[][] = { "models/zombie_plague/v_knife_zombie.mdl" 
const 
zombieclass1_health 1500 
const Float:zombieclass1_speed 0.48 
const Float:zombieclass1_gravity 1.00 
const Float:zombieclass1_knockback 1.0  

enum _
:evTable
{
    
health,
    
floatspeed,
    
floatgravity
}

new const 
evolutions[][evTable] = 
{
    { 
00.00.0 }, // nul
    
3000.580.88 }, // 1
    
6000.680.78 }, // 2
    
9000.780.68 }, // 3
    
12000.880.58 }, // 4
    
15000.980.48 // 5
}

public 
plugin_init() 

    
register_plugin("[ZP] Class: Zombie: Evolution Zombie""1.0""H.RED.ZONE"
     
    
RegisterHam(Ham_Killed"player""fw_PlayerKilled"


public 
plugin_precache() 

    new 
index 
     
    g_ZombieClassID 
zp_class_zombie_register(zombieclass1_namezombieclass1_infozombieclass1_healthzombieclass1_speedzombieclass1_gravity
    
zp_class_zombie_register_kb(g_ZombieClassIDzombieclass1_knockback
     
    for(
index 0index sizeof zombieclass1_modelsindex++) 
        
zp_class_zombie_register_model(g_ZombieClassIDzombieclass1_models[index]) 
         
    for(
index 0index sizeof zombieclass1_clawmodelsindex++) 
        
zp_class_zombie_register_claw(g_ZombieClassIDzombieclass1_clawmodels[index]) 


public 
client_authorized(id)
{
    
evolution_level[id] = 0
    _ClearPlayerIsEvolution
(id)
}

public 
fw_PlayerKillediVictimiKilleriShouldGib 

    if(
is_user_alive(iKiller) && is_user_connected(iVictim)) 
    { 
        if(
_IsPlayerIsEvolution(iVictim)) 
        { 
             
            if(
evolution_level[iVictim] < sizeof(evolutions)) 
            {             
                
evolution_level[iVictim]++ 
                
ColorChat(iVictimTEAM_COLOR"^4[ZP]^1 Tu Nivel de Evolución es %d"evolution_level[iVictim]) 
            } 

            else 

            { 
                
ColorChat(iVictimTEAM_COLOR"^4[ZP]^1 Llegaste al maximo de Evolucion"evolution_level[iVictim]) 
            }             
        } 
    } 


public 
zp_fw_core_infect(idattacker)

    if(
zp_class_zombie_get_current(id) == g_ZombieClassID
    { 
        
_MarkPlayerIsEvolution(id
        
ColorChat(idTEAM_COLOR"^4[ZP]^1 Llevas la Evolucion en la sangre."evolution_level[iVictim]) 
    } 


public 
zp_fw_core_cure_pre(idattacker

    if(
is_user_alive(id) && _IsPlayerIsEvolution(id)) 
    { 
        
_ClearPlayerIsEvolution(id
        
evolution_level[id] = 
    



public 
zp_fw_core_spawn_post(id

    if(
is_user_alive(id) && _IsPlayerIsEvolution(id) && evolution_level[id]) 
    {  
        new 
_EvolutionHealthFloat:_EvolutionSpeedFloat:_EvolutionGravity
        _EvolutionHealth 
evolutions[evolution_level[id]][health]
        
_EvolutionSpeed evolutions[evolution_level[id]][speed]
        
_EvolutionGravity evolutions[evolution_level[id]][gravity]

        
cs_set_player_maxspeed(id_EvolutionSpeed
        
set_user_health(idget_user_health(id) + _EvolutionHealth
        
set_user_gravity(id_EvolutionGravity
        
ColorChat(idTEAM_COLOR"^4[ZP]^1 Cada vez mas fuerte!!!"evolution_level[id])  
    } 

__________________

Last edited by bigdaddy424; 12-06-2023 at 18:30.
bigdaddy424 is offline
szA
Junior Member
Join Date: Nov 2023
Old 12-01-2023 , 16:57   Re: [ES] - [EN] Class Zombie Evolution Cs1.6 Help.
Reply With Quote #3

i get several errors and warnings when i compile, as:
PHP Code:
(38) : warning 213tag mismatch
(38) : warning 213tag mismatch
(39) : warning 213tag mismatch
(39) : warning 213tag mismatch
(40) : warning 213tag mismatch
(40) : warning 213tag mismatch
(41) : warning 213tag mismatch
(41) : warning 213tag mismatch
(42) : warning 213tag mismatch
(42) : warning 213tag mismatch
(43) : warning 213tag mismatch
(43) : warning 213tag mismatch
(115) : error 033: array must be indexed (variable "evolutions")
(
119 -- 120) : warning 213tag mismatch
(120 -- 122) : warning 213tag mismatch 
szA is offline
georgik57
Veteran Member
Join Date: Oct 2008
Location: 🎧Music World
Old 12-05-2023 , 06:54   Re: [ES] - [EN] Class Zombie Evolution Cs1.6 Help.
Reply With Quote #4

it actually increases, but you're printing it wrong.
PHP Code:
            if(evolution_level[iVictim] < 5
            {             
                
evolution_level[iVictim]++ 
                
ColorChat(iVictimTEAM_COLOR"^4[ZP]^1 Tu Nivel de Evolución es %d"evolution_level
            } 

            else 

            { 
                
ColorChat(iVictimTEAM_COLOR"^4[ZP]^1 Llegaste al maximo de Evolucion"evolution_level
            } 
->
PHP Code:
            if(evolution_level[iVictim] < 5
            {             
                
evolution_level[iVictim]++ 
                
ColorChat(iVictimTEAM_COLOR"^4[ZP]^1 Tu Nivel de Evolución es %d"evolution_level[iVictim]) 
            } 

            else 

            { 
                
ColorChat(iVictimTEAM_COLOR"^4[ZP]^1 Llegaste al maximo de Evolucion"
            } 
__________________
georgik57 is offline
Send a message via MSN to georgik57 Send a message via Yahoo to georgik57 Send a message via Skype™ to georgik57
szA
Junior Member
Join Date: Nov 2023
Old 12-06-2023 , 17:02   Re: [ES] - [EN] Class Zombie Evolution Cs1.6 Help.
Reply With Quote #5

Actually it doesn't increase anything although I'm printing it wrong in the chat, it doesn't increase life, speed and gravity, everything remains the same.
szA is offline
bigdaddy424
Senior Member
Join Date: Oct 2021
Location: Jupiter
Old 12-06-2023 , 18:31   Re: [ES] - [EN] Class Zombie Evolution Cs1.6 Help.
Reply With Quote #6

ive updated my code
__________________
bigdaddy424 is offline
Reply


Thread Tools
Display Modes

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 02:01.


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