AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Hp problem (https://forums.alliedmods.net/showthread.php?t=110097)

DoviuX 11-25-2009 05:24

Hp problem
 
On zombie swarm for classes i made hp when first round start it will be like set
but when next round starts or die hp will set to 100 help please.

PHP Code:

cvar_ZombieAhealthcvar_ZombieAgravitycvar_ZombieAspeed 

PHP Code:

cvar_ZombieManHealthcvar_ZombieManGravitycvar_ZombieManSpeed 

PHP Code:

    cvar_ZombieAhealth    =    register_cvar("zswarm_zahealth",    "800")
    
cvar_ZombieAgravity    =    register_cvar("zswarm_zagravity",    "700")
    
cvar_ZombieAspeed    =    register_cvar("zswarm_zaspeed",    "250")

    
cvar_ZombieManHealth    =    register_cvar("zswarm_zmhealth",    "700")
    
cvar_ZombieManGravity    =    register_cvar("zswarm_zmgravity",    "800")
    
cvar_ZombieManSpeed    =    register_cvar("zswarm_zmspeed",        "270"

PHP Code:

            new Float:zmhealthFloat:zmgravity
            zmhealth    
=    get_pcvar_float(cvar_ZombieManHealth)
            
zmgravity    =    get_pcvar_float(cvar_ZombieManGravity)
            static 
Float:zmspeedzmspeed get_pcvar_float(cvar_ZombieManSpeed)
            
set_pev(idpev_maxspeedzmspeed)

            
set_pev(idpev_healthzmhealth)
            
set_pev(idpev_gravityzmgravity

PHP Code:

new Float:zahealthFloat:zagravity
            zahealth    
=    get_pcvar_float(cvar_ZombieAhealth)
            
zagravity    =    get_pcvar_float(cvar_ZombieAgravity)
            static 
Float:zaspeedzaspeed get_pcvar_float(cvar_ZombieAspeed)
            
set_pev(idpev_maxspeedzaspeed)

            
set_pev(idpev_healthzahealth)
            
set_pev(idpev_gravityzagravity


ehha 11-25-2009 05:46

Re: Hp problem
 
Why use floats for health& gravity? Try with integers.


All times are GMT -4. The time now is 13:38.

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