AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [HELP] Pev_Punchangle (https://forums.alliedmods.net/showthread.php?t=275087)

Depresie 11-21-2015 17:20

[HELP] Pev_Punchangle
 
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 });

fysiks 11-21-2015 17:26

Re: [HELP] Pev_Punchangle
 
Have you tried using the random functions?

Hint: Look in amxmodx.inc

Depresie 11-21-2015 18:07

Re: [HELP] Pev_Punchangle
 
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); 


wickedd 11-21-2015 18:59

Re: [HELP] Pev_Punchangle
 
PHP Code:

punchangle[0] += random_float(-0.30.3

:arrow:

PHP Code:

punchangle[0] = random_float(-0.30.3

Try that

Quote:

Originally Posted by Depresie (Post 2365251)
what is the third value used for exactly?

It's used for Roll. IIRC it's

PHP Code:

punchangle] = Pitch
punchangle
] = Yaw
punchangle
] = Roll 



All times are GMT -4. The time now is 18:09.

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