Raised This Month: $ Target: $400
 0% 

Modify a player's aim


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
potatis_invalido
BANNED
Join Date: Jul 2007
Location: 0 (world)
Old 08-12-2007 , 19:59   Modify a player's aim
Reply With Quote #1

I have been searching the forums and I didnt find anything that works.
When a player shoots I want to move that player's aim up a little. The same effect you get when you are firing a gun in DoD.

Last edited by potatis_invalido; 08-12-2007 at 20:06.
potatis_invalido is offline
Wilson [29th ID]
Veteran Member
Join Date: Nov 2005
Location: London
Old 08-12-2007 , 22:39   Re: Modify a player's aim
Reply With Quote #2

set_pev(id, pev_punchangle, Float:{0.0, 0.0, 0.0});

Replace the 0.0's with a random value
__________________

Day of Defeat AMXX Community

FakeMeta Research . Voice Proximity . Advanced Deploy . Technician
Wilson [29th ID] is offline
Send a message via ICQ to Wilson [29th ID] Send a message via AIM to Wilson [29th ID] Send a message via MSN to Wilson [29th ID] Send a message via Yahoo to Wilson [29th ID]
potatis_invalido
BANNED
Join Date: Jul 2007
Location: 0 (world)
Old 08-13-2007 , 10:45   Re: Modify a player's aim
Reply With Quote #3

No that just makes the aim go up and then down.
Thx anyway.

I really need this. Or else 2 hours of scripting would be wasted.

Last edited by potatis_invalido; 08-13-2007 at 12:25.
potatis_invalido is offline
Wilson [29th ID]
Veteran Member
Join Date: Nov 2005
Location: London
Old 08-13-2007 , 12:32   Re: Modify a player's aim
Reply With Quote #4

I know if you hook FM_CmdStart, you can get_uc(uc_handle, UC_ViewAngles, Float:angles[3]) to read the angles that the xhair is aiming.

Theoretically, you should be able to set_uc() the ViewAngles too.
__________________

Day of Defeat AMXX Community

FakeMeta Research . Voice Proximity . Advanced Deploy . Technician
Wilson [29th ID] is offline
Send a message via ICQ to Wilson [29th ID] Send a message via AIM to Wilson [29th ID] Send a message via MSN to Wilson [29th ID] Send a message via Yahoo to Wilson [29th ID]
potatis_invalido
BANNED
Join Date: Jul 2007
Location: 0 (world)
Old 08-13-2007 , 12:36   Re: Modify a player's aim
Reply With Quote #5

Holy banana! Thank you, I'll try it.
potatis_invalido is offline
potatis_invalido
BANNED
Join Date: Jul 2007
Location: 0 (world)
Old 08-13-2007 , 13:56   Re: Modify a player's aim
Reply With Quote #6

Didn't work
get_uc works but set_uc does nothing... it doesnt change my aim.

EDIT: I think I can get it to work now. I'll post the code when I'm finished.

EDIT2: Here's the code:

Code:
public recoil_dod_style(id, Float:recoil, no_punch)
{
 new Float:angles[3];
 pev(id, pev_v_angle, angles);
 angles[0] -= recoil;
 if(angles[0] > -88.994750 && angles[0] < 88.994750)
 {
  if(no_punch)
   set_pev(id, pev_punchangle, Float:{ 0.0, 0.0, 0.0 });
  set_pev(id, pev_angles, angles);
  set_pev(id, pev_fixangle, 1);
 }
}

Last edited by potatis_invalido; 08-17-2007 at 21:39.
potatis_invalido 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 17:09.


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