Raised This Month: $ Target: $400
 0% 

set_user_**


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
~Ice*shOt
Veteran Member
Join Date: Mar 2009
Location: Lithuania
Old 06-26-2009 , 11:22   set_user_**
Reply With Quote #1

Hi, i using this codes:

this in spawn:
PHP Code:
set_user_health(id,(get_pcvar_num(cvar_health_mob)))
set_user_gravity(id,(get_pcvar_float(cvar_gravity_mob)))
set_user_maxspeed(id,(get_pcvar_float(cvar_speed_mob))) 
and this in plugin_init:
PHP Code:
cvar_health_mob register_cvar("mob_health""500")
cvar_gravity_mob register_cvar("mob_gravity""750")
cvar_speed_mob register_cvar("mob_speed""250"
but this are works bad whats can help me ? please!!
~Ice*shOt is offline
Send a message via Skype™ to ~Ice*shOt
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 06-26-2009 , 11:43   Re: set_user_**
Reply With Quote #2

"Works bad" doesn't help at all. Be more specific.

All is right except for gravity you have to divide by sv_gravity to get the right value, which is 800 by default.
__________________
Arkshine is offline
znovit
Member
Join Date: Mar 2009
Location: Behind you :=
Old 06-26-2009 , 11:49   Re: set_user_**
Reply With Quote #3

You cant set_user_gravity(id, 750);

You have to set_user_gravity(id, 0.75);
__________________
znovit is offline
zacky
Senior Member
Join Date: Mar 2008
Location: Sweden
Old 06-26-2009 , 11:54   Re: set_user_**
Reply With Quote #4

Quote:
Originally Posted by znovit View Post
You cant set_user_gravity(id, 750);

You have to set_user_gravity(id, 0.75);
No, he has to do this with gravity:
PHP Code:
set_user_gravity(idget_pcvar_float(cvar_gravity_mob) / 800
I don't know if it should be 800 or 800.0.
zacky is offline
Send a message via Skype™ to zacky
BOYSplayCS
BANNED
Join Date: Apr 2008
Location: Gainesville, FL
Old 06-26-2009 , 12:27   Re: set_user_**
Reply With Quote #5

To avoid errors, it should be 800.0
BOYSplayCS is offline
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 06-26-2009 , 12:28   Re: set_user_**
Reply With Quote #6

POST THE WHOLE SCRIPT

800 or 800.0 won't make a differance since the number divided is a float.
[ --<-@ ] Black Rose is offline
Dr.G
Senior Member
Join Date: Nov 2008
Old 06-26-2009 , 14:25   Re: set_user_**
Reply With Quote #7

Quote:
Originally Posted by Superiority View Post
POST THE WHOLE SCRIPT
belive me, you dont wanna see it!
__________________
Dr.G is offline
DA
Veteran Member
Join Date: Nov 2005
Location: Germany/Münster
Old 06-26-2009 , 14:43   Re: set_user_**
Reply With Quote #8

Maxspeed have to executed on every weaponchange and on every spawn.
__________________
DA 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 15:33.


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