AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   need help with hp, gravity and speed (https://forums.alliedmods.net/showthread.php?t=95524)

~Ice*shOt 06-24-2009 13:04

need help with hp, gravity and speed
 
i using thats codes:

PHP Code:

    cvar_health_hunter register_cvar("hunter_health""500")
    
cvar_gravity_hunter register_cvar("hunter_gravity""780")
    
cvar_speed_hunter register_cvar("hunter_speed""245"

PHP Code:

        new Float:healthFloat:gravityFloat:speed
        health 
get_pcvar_float(cvar_health_hunter)
        
gravity get_pcvar_float(cvar_gravity_hunter) / 800
        speed 
get_pcvar_num(cvar_speed_hunter)
        
        
set_pev(idpev_healthhealth)
        
set_pev(idpev_gravitygravity)
        
set_pev(idpev_speedspeed

but this work's not good

TitANious 06-24-2009 13:17

Re: need help with hp, gravity and speed
 
speed should be get_pcvar_float.

~Ice*shOt 06-24-2009 14:39

Re: need help with hp, gravity and speed
 
but on health and gravity ?

Xellath 06-24-2009 15:21

Re: need help with hp, gravity and speed
 
PHP Code:

set_pev(idpev_healthget_pcvar_float(cvar_health_hunter))
set_pev(idpev_gravityget_pcvar_float(cvar_gravity_hunter)) 
set_pev(idpev_speedget_pcvar_float(cvar_speed_hunter)) 


SnoW 06-24-2009 15:22

Re: need help with hp, gravity and speed
 
Guessing your purposes you should use pev_maxspeed instead of pev_speed.

Xellath 06-24-2009 15:24

Re: need help with hp, gravity and speed
 
Quote:

Originally Posted by SnoW (Post 856112)
Guessing your purposes you should use pev_maxspeed instead of pev_speed.

Oh, didn't even notice. pev_speed can not be used on players, you must use pev_maxspeed.

~Ice*shOt 06-24-2009 15:41

Re: need help with hp, gravity and speed
 
Not works

TitANious 06-24-2009 15:44

Re: need help with hp, gravity and speed
 
A way is to use fun

~Ice*shOt 06-24-2009 15:50

Re: need help with hp, gravity and speed
 
but I could in this way :(

xPaw 06-24-2009 17:17

Re: need help with hp, gravity and speed
 
PHP Code:

new Float:flSpeed get_pcvar_floatcvar_speed_hunter );

engfuncEngFunc_SetClientMaxspeedidflSpeed );
set_pevidpev_maxspeedflSpeed ); 



All times are GMT -4. The time now is 15:37.

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