Raised This Month: $ Target: $400
 0% 

question about v_model position


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Voi
Veteran Member
Join Date: Sep 2006
Location: Gdansk, Poland
Old 10-04-2007 , 06:22   question about v_model position
Reply With Quote #1

is it possible via amxmodx to change player view weapon position like in quake2 ? like gun_z, gun_y etc

edit:

MOD plz move to the "scripting help", ive mistaken sorry
__________________
Voi is offline
Orangutanz
Veteran Member
Join Date: Apr 2006
Old 10-04-2007 , 08:38   Re: question about v_model position
Reply With Quote #2

Quote:
Originally Posted by Voi View Post
is it possible via amxmodx to change player view weapon position like in quake2 ? like gun_z, gun_y etc

edit:

MOD plz move to the "scripting help", ive mistaken sorry
Moved...

To answer your question if I understand you correctly you'd like to for example move the gun position to the center of screen instead of it being at the left/right side of the screen?
If so then presently you cannot do this, however I do think it's possible but would require a module since you'd have to hook into the bone structure of the player and change the position of the arm(s).
__________________
|<-- Retired from everything Small/Pawn related -->|
You know when you've been Rango'd
Orangutanz is offline
Voi
Veteran Member
Join Date: Sep 2006
Location: Gdansk, Poland
Old 10-04-2007 , 10:46   Re: question about v_model position
Reply With Quote #3

yes, i would like to make something like aiming down the sight, need this for my realism mod :p
__________________
Voi is offline
Wilson [29th ID]
Veteran Member
Join Date: Nov 2005
Location: London
Old 10-10-2007 , 05:43   Re: question about v_model position
Reply With Quote #4

In day of defeat, a client entering in console: cl_bobcycle 0
Will achieve this, but it also slightly offsets the tracer to the left of the xhair, so your aim isn't perfect. I don't know if this works in other games.

As far as doing it from AMXX, it isn't possible. I have tried many many many methods to do this, because I also want it for my realism mod.

But I have created ironsights. You have to use separate models and switch em back and forth. Pain in the arse really.
__________________

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]
Wilson [29th ID]
Veteran Member
Join Date: Nov 2005
Location: London
Old 10-12-2007 , 15:30   Re: question about v_model position
Reply With Quote #5

Update. I made a discovery

Use EngFunc_CrosshairAngle to change the position of the v_ model. It is limited in how far you can move it up/down and left/right (pitch and yaw), but it is certainly an improvement.

You can mess with different angles dynamically, in game, by using FakeMeta Research (see my signature).
__________________

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]
Voi
Veteran Member
Join Date: Sep 2006
Location: Gdansk, Poland
Old 10-12-2007 , 15:32   Re: question about v_model position
Reply With Quote #6

wow ! nice

how did you find that ?:d
__________________
Voi is offline
Wilson [29th ID]
Veteran Member
Join Date: Nov 2005
Location: London
Old 10-12-2007 , 17:18   Re: question about v_model position
Reply With Quote #7

It came to me in a dream
__________________

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]
Voi
Veteran Member
Join Date: Sep 2006
Location: Gdansk, Poland
Old 10-13-2007 , 17:27   Re: question about v_model position
Reply With Quote #8

Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#define PLUGIN "v_model"
#define VERSION "1.0"
#define AUTHOR "voi"


public plugin_init() {
    register_plugin(PLUGIN, VERSION, AUTHOR)
    register_concmd("amx_vmodel","aim",ADMIN_VOTE,"kontroluje v model broni")
    // Add your code here...
}

public aim(id,pitch,yaw)
{
    new pitch = read_data(1)
    new yaw = read_data(2)
    
    engfunc(EngFunc_CrosshairAngle,id,float(pitch),float(yaw))
}
this one is for testing, and it propably works bad couse its rotating v_model randomly no matter what values i set

any help ?
__________________
Voi is offline
Wilson [29th ID]
Veteran Member
Join Date: Nov 2005
Location: London
Old 10-13-2007 , 17:52   Re: question about v_model position
Reply With Quote #9

First of all, you are creating pitch and yaw in the parameters of the function. It should just be (id)

Second of all, I've never used read_data() to get arguments of a client command...try usuing read_argv() and str_to_float()
__________________

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]
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 10-13-2007 , 18:04   Re: question about v_model position
Reply With Quote #10

Something like:

Code:
#include <amxmodx> #include <amxmisc> #include <fakemeta> public plugin_init() {     register_plugin( "v_model", "1.0", "voi" );     register_clcmd( "amx_vmodel", "aim", ADMIN_VOTE, "<pitch> <yaw> kontroluje v model broni" ); } public aim( id, level, cid ) {     if( !cmd_access( id, level, cid, 3 ) )         return PLUGIN_HANDLED;             new         pitch[32],         yaw[32];         read_argv( 1, pitch, sizeof pitch - 1 );     read_argv( 2, yaw  , sizeof yaw - 1   );         engfunc( EngFunc_CrosshairAngle, id, str_to_float( pitch ), str_to_float( yaw ) );         return PLUGIN_HANDLED; }
__________________
Arkshine 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 16:05.


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