Raised This Month: $ Target: $400
 0% 

Hp doesn't work like supost too


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DoviuX
Senior Member
Join Date: Jun 2009
Location: Lithuania
Old 03-13-2010 , 14:25   Hp doesn't work like supost too
Reply With Quote #1

I got a problem i made class on zs but i get random hp from Class1 hp to Class2.

PHP Code:
    PlayerClass[id] = random_num(03)
    {
            switch (
random_num(03))
            {
                    case 
0
                    {
                        
copy(player_model[id], charsmaxplayer_model[] ), ZOMBIE_MODEL1)
                        
set_pev(idpev_healthzombie_hp1)
                        
set_pev(idpev_gravityzombie_gravity1)
                    }
                    case 
1
                    {
                        
copy(player_model[id], charsmaxplayer_model[] ), ZOMBIE_MODEL2)
                        
set_pev(idpev_healthzombie_hp2)
                        
set_pev(idpev_gravityzombie_gravity2)
                    }
                    case 
2:
                    {
                        
copy(player_model[id], charsmaxplayer_model[] ), ZOMBIE_MODEL3)
                        
set_pev(idpev_healthzombie_hp3)
                        
set_pev(idpev_gravityzombie_gravity3)
                    }
                    case 
3:
                    {
                        
copy(player_model[id], charsmaxplayer_model[] ), ZOMBIE_MODEL4)
                        
set_pev(idpev_healthzombie_hp4)
                        
set_pev(idpev_gravityzombie_gravity4)
                    }
            }
    } 
DoviuX is offline
Send a message via Skype™ to DoviuX
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 03-13-2010 , 15:22   Re: Hp doesn't work like supost too
Reply With Quote #2

Show where zombie_hp1 zombie_hp2 zombie_hp3 zombie_hp4 are declared/assigned values.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
DoviuX
Senior Member
Join Date: Jun 2009
Location: Lithuania
Old 03-13-2010 , 15:23   Re: Hp doesn't work like supost too
Reply With Quote #3

This ?
PHP Code:
    cvar_zombie_hp1        =    register_cvar("zswarm_zahealth""750")
    
cvar_zombie_gravity1    =    register_cvar("zswarm_zagravity""800")
    
cvar_zombie_speed1    =    register_cvar("zswarm_zaspeed",    "250")

    
cvar_zombie_hp2        =    register_cvar("zswarm_zmhealth""900")
    
cvar_zombie_gravity2    =    register_cvar("zswarm_zmgravity""800")
    
cvar_zombie_speed2    =    register_cvar("zswarm_zmspeed",    "250")

    
cvar_zombie_hp3        =    register_cvar("zswarm_zhealth",    "1000")
    
cvar_zombie_gravity3    =    register_cvar("zswarm_zgravity""800")
    
cvar_zombie_speed3    =    register_cvar("zswarm_zspeed",    "255")

    
cvar_zombie_hp4        =    register_cvar("zswarm_ahealth",    "1200")
    
cvar_zombie_gravity4    =    register_cvar("zswarm_agravity""800")
    
cvar_zombie_speed4    =    register_cvar("zswarm_aspeed",    "265"
DoviuX is offline
Send a message via Skype™ to DoviuX
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 03-13-2010 , 15:28   Re: Hp doesn't work like supost too
Reply With Quote #4

Try again.

Quote:
Originally Posted by Exolent[jNr] View Post
Show where zombie_hp1 zombie_hp2 zombie_hp3 zombie_hp4 are declared/assigned values.
Or are you trying to retrieve the cvar value of cvar_zombie_hp1??
__________________
fysiks is offline
DoviuX
Senior Member
Join Date: Jun 2009
Location: Lithuania
Old 03-13-2010 , 15:30   Re: Hp doesn't work like supost too
Reply With Quote #5

I want that the class1 had 800Hp class2 had 900Hp class3 had 1000Hp and class4 had 1200Hp but when spawn they mixing and like class3 has 1200Hp or next spawn class3 has 800.

And you mean these ?

PHP Code:
        new Float:zombie_hp1Float:zombie_gravity1
        zombie_hp1 
=    get_pcvar_float(cvar_zombie_hp1)
        
zombie_gravity1 =    get_pcvar_float(cvar_zombie_gravity1) / 800

        
new Float:zombie_hp2Float:zombie_gravity2
        zombie_hp2    
=    get_pcvar_float(cvar_zombie_hp2)
        
zombie_gravity2    =    get_pcvar_float(cvar_zombie_gravity2) / 800

        
new Float:zombie_hp3Float:zombie_gravity3
        zombie_hp3    
=    get_pcvar_float(cvar_zombie_hp3)
        
zombie_gravity3    =    get_pcvar_float(cvar_zombie_gravity3) / 800

        
new Float:zombie_hp4Float:zombie_gravity4
        zombie_hp4    
=    get_pcvar_float(cvar_zombie_hp4)
        
zombie_gravity4    =    get_pcvar_float(cvar_zombie_gravity4) / 800 
DoviuX is offline
Send a message via Skype™ to DoviuX
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 03-13-2010 , 18:19   Re: Hp doesn't work like supost too
Reply With Quote #6

Code is ok, the problem is that you can't see HPs above 255, means that if you have 300HPs you will see 300-256, also if you have 256, 512, 768 etc.. you will see 0 and you gonna have a annoying movement bug.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
DoviuX
Senior Member
Join Date: Jun 2009
Location: Lithuania
Old 03-14-2010 , 00:12   Re: Hp doesn't work like supost too
Reply With Quote #7

Hp's are showing by the hud message, how can i explain... Class1: 600Hp on spawn Class2: 600Hp (but suppost to be 750).
DoviuX is offline
Send a message via Skype™ to DoviuX
Old 03-14-2010, 08:10
DoviuX
This message has been deleted by Exolent[jNr]. Reason: Don't bump until 2 weeks have passed since last post.
Old 03-14-2010, 08:15
ConnorMcLeod
This message has been deleted by Exolent[jNr]. Reason: Don't bump until 2 weeks have passed since last post.
Old 03-14-2010, 12:01
DoviuX
This message has been deleted by Exolent[jNr]. Reason: Don't bump until 2 weeks have passed since last post.
Reply



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 08:45.


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