AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   question about v_model position (https://forums.alliedmods.net/showthread.php?t=61580)

Voi 10-04-2007 06:22

question about v_model position
 
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

Orangutanz 10-04-2007 08:38

Re: question about v_model position
 
Quote:

Originally Posted by Voi (Post 538635)
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).

Voi 10-04-2007 10:46

Re: question about v_model position
 
yes, i would like to make something like aiming down the sight, need this for my realism mod :p

Wilson [29th ID] 10-10-2007 05:43

Re: question about v_model position
 
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.

Wilson [29th ID] 10-12-2007 15:30

Re: question about v_model position
 
Update. I made a discovery :P

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).

Voi 10-12-2007 15:32

Re: question about v_model position
 
wow ! nice

how did you find that ?:d

Wilson [29th ID] 10-12-2007 17:18

Re: question about v_model position
 
It came to me in a dream

Voi 10-13-2007 17:27

Re: question about v_model position
 
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 ?

Wilson [29th ID] 10-13-2007 17:52

Re: question about v_model position
 
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()

Arkshine 10-13-2007 18:04

Re: question about v_model position
 
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; }


All times are GMT -4. The time now is 16:05.

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