AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   set_user_maxspeed, entity_set_vector (https://forums.alliedmods.net/showthread.php?t=163254)

eNeMy` 07-28-2011 08:33

set_user_maxspeed, entity_set_vector
 
How to set_user_maxspeed that it would be only with knife for this
Code:

new Float:speed = get_user_maxspeed(id) + get_cvar_num("amx_vip_speed")
set_user_maxspeed(id , speed)

How to do that with this(when i start shooting, it starts shaking the view) to stop shaking?
Code:

if(get_user_button(id) & IN_ATTACK)
entity_set_vector(id, EV_VEC_punchangle, Float:{0.0, 0.0, 0.0})


SnoW 07-28-2011 09:15

Re: set_user_maxspeed, entity_set_vector
 
Quote:

Originally Posted by eNeMy` (Post 1520300)
How to set_user_maxspeed that it would be only with knife for this
Code:

new Float:speed = get_user_maxspeed(id) + get_cvar_num("amx_vip_speed")
set_user_maxspeed(id , speed)


Either use the newest hamsandwich module and Ham_CS_Player_ResetMaxSpeed or this. You obviously need to set the speed only if the player has a knife ( search for this ), duh.
Quote:

Originally Posted by eNeMy` (Post 1520300)
How to do that with this(when i start shooting, it starts shaking the view) to stop shaking?
Code:

if(get_user_button(id) & IN_ATTACK)
entity_set_vector(id, EV_VEC_punchangle, Float:{0.0, 0.0, 0.0})


So you want to stop player's view shaking by punching him in the face? I bet that does not work. Isn't it more like the view shakes if you punch him in the face?

-> Could you explain what you want to do, remove recoil?

eNeMy` 07-28-2011 09:54

Re: set_user_maxspeed, entity_set_vector
 
I mean when i use
Code:

if(get_user_button(id) & IN_ATTACK)
entity_set_vector(id, EV_VEC_punchangle, Float:{0.0, 0.0, 0.0})

and only when i shoot the counter-strike screen starts going up and down.

SnoW 07-28-2011 10:03

Re: set_user_maxspeed, entity_set_vector
 
Quote:

Originally Posted by eNeMy` (Post 1520347)
I mean when i use
Code:

if(get_user_button(id) & IN_ATTACK)
entity_set_vector(id, EV_VEC_punchangle, Float:{0.0, 0.0, 0.0})

and only when i shoot the counter-strike screen starts going up and down.

So you use that, shoot and the view shakes, I understand. This was really important information but could you still explain what was the thing you wanted?

eNeMy` 07-28-2011 10:18

Re: set_user_maxspeed, entity_set_vector
 
To stop it from shaking.

SnoW 07-28-2011 10:47

Re: set_user_maxspeed, entity_set_vector
 
Quote:

Originally Posted by eNeMy` (Post 1520372)
To stop it from shaking.

Could you specify if the view shakes if you do not use that code? Is this shaking recoil? You can use dictionary.

eNeMy` 07-28-2011 10:56

Re: set_user_maxspeed, entity_set_vector
 
I use this in vipmenu, when I aren't selected the fuction with this code everything is fine, but when I use it starts shaking. Ok, maybe u could give me some other code with no recoil?

SnoW 07-28-2011 11:13

Re: set_user_maxspeed, entity_set_vector
 
So there is a no recoil feature in your vip menu? That is how probably the correct native call, it just matters when you do the call.

eNeMy` 07-28-2011 11:16

Re: set_user_maxspeed, entity_set_vector
 
So what to do? Btw it isn't shaking with "weapon_glock18".

SnoW 07-28-2011 11:21

Re: set_user_maxspeed, entity_set_vector
 
Quote:

Originally Posted by eNeMy` (Post 1520435)
So what to do? Btw it isn't shaking with "weapon_glock18".

Glock does not have recoil at all. You just have to investigate if there is a method for perfect no recoil. Search, or I might as well.

Edit: Search done. If your vip plugin uses the same method that this it is probably the best you can make.


All times are GMT -4. The time now is 00:55.

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