Raised This Month: $ Target: $400
 0% 

[HELP] Pev_Punchangle


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Depresie
Veteran Member
Join Date: Nov 2013
Old 11-21-2015 , 17:20   [HELP] Pev_Punchangle
Reply With Quote #1

So im trying to create a custom made recoile in order to rebalance all the weapons in cs... so if anyone knows how i can generate random values for this, please help me

Code:
set_pev(owner,pev_punchangle,{ 0.0,0.0,0.0 });

Last edited by Depresie; 11-21-2015 at 17:21.
Depresie is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 11-21-2015 , 17:26   Re: [HELP] Pev_Punchangle
Reply With Quote #2

Have you tried using the random functions?

Hint: Look in amxmodx.inc
__________________

Last edited by fysiks; 11-21-2015 at 17:30.
fysiks is offline
Depresie
Veteran Member
Join Date: Nov 2013
Old 11-21-2015 , 18:07   Re: [HELP] Pev_Punchangle
Reply With Quote #3

i tried, kind of succeded, but it looks a little wierd...
also, what is the third value used for exactly?

im using this in primary attack post, and for some reason, the first shot always makes the crosshair go down, realy down...
PHP Code:
static Float:punchangle[3]
            
            
punchangle[0] += random_float(-0.30.3)
            
punchangle[1] += random_float(-0.30.3)
            
            
set_pev(owner,pev_punchanglepunchangle); 

Last edited by Depresie; 11-21-2015 at 18:13.
Depresie is offline
wickedd
Veteran Member
Join Date: Nov 2009
Old 11-21-2015 , 18:59   Re: [HELP] Pev_Punchangle
Reply With Quote #4

PHP Code:
punchangle[0] += random_float(-0.30.3


PHP Code:
punchangle[0] = random_float(-0.30.3
Try that

Quote:
Originally Posted by Depresie View Post
what is the third value used for exactly?
It's used for Roll. IIRC it's

PHP Code:
punchangle] = Pitch
punchangle
] = Yaw
punchangle
] = Roll 
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.
wickedd is offline
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 18:09.


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