AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   how to get p model's entity id (https://forums.alliedmods.net/showthread.php?t=221665)

1023168216 07-24-2013 23:24

how to get p model's entity id
 
how to get p models' entity index? such as p_*.mdl.
i want to use "fm_set_rendering" to make p_*.mdl glow (when i use that weapon). so i need the index of p_*.mdl. help me please,please.~

Bos93 07-25-2013 04:54

Re: how to get p model's entity id
 
This is not possible.

1023168216 07-27-2013 02:53

Re: how to get p model's entity id
 
then is it possible to get the muzzle's origin? i want to make a muzzleflash effect by plugin(not by spr)i need the origin~~
Quote:

Originally Posted by Bos93 (Post 1998279)
This is not possible.


Black Rose 07-27-2013 10:31

Re: how to get p model's entity id
 
Quote:

Originally Posted by 1023168216 (Post 1999677)
then is it possible to get the muzzle's origin? i want to make a muzzleflash effect by plugin(not by spr)i need the origin~~

You could get the players origin, which angle the player is aiming and read what weapon is used to calculate where the muzzleflash should be.

I'm not sure if the calculations can keep up with the rate of fire. I guess you have to try.
I can try this out later if someone else doesn't.

1023168216 07-28-2013 06:18

Re: how to get p model's entity id
 
it seems to be a difficult way.i really dont know how to do it. o(︶︿︶)o
Quote:

Originally Posted by Black Rose (Post 1999877)
You could get the players origin, which angle the player is aiming and read what weapon is used to calculate where the muzzleflash should be.

I'm not sure if the calculations can keep up with the rate of fire. I guess you have to try.
I can try this out later if someone else doesn't.


Black Rose 07-28-2013 08:30

Re: how to get p model's entity id
 
Quote:

Originally Posted by 1023168216 (Post 2000470)
it seems to be a difficult way.i really dont know how to do it. o(︶︿︶)o

I'll check into it later. This will be kind of hard for me as well.

1023168216 08-01-2013 01:54

Re: how to get p model's entity id
 
OK o(∩_∩)o
Quote:

Originally Posted by Black Rose (Post 2000526)
I'll check into it later. This will be kind of hard for me as well.


Black Rose 08-03-2013 17:35

Re: how to get p model's entity id
 
I've checked into it. It's basically impossible.

The p_ model movement stops when the Z-rotation reaches a certain point even though the v_ model is still moving, that can be calculated of course. The problem with this is that 2 entitys are needed to separate the 2 different locations. I'm not very up to date on AMXx and I don't know if you can make one of them invisible for some players and the other one invisible for the others.

The player is constantly moving. This probably can not be calculated since it's only the model animation, not the actual angles of the crosshair that is moving. You will get offsets that looks like shit.

Someone has to find out all the lenghts of weapons. Possible but time consuming.

The calculations needed for a full server where people are spraying is a lot. The server could choke and players would suffer lag spikes if that happened. There's also a chance to hit the roof of maximum number of entities.

So, what exactly do you need and for what reason? Can we solve this in a different way?

1023168216 08-05-2013 02:43

Re: how to get p model's entity id
 
in fact,i want to change the p_**.mdl model when player use the gun.but i dont want to use pev_weaponmodel, because i need to set pev_body(i have combined many p_**.mdl into one model),then i need the p_**.mdl 's index to set pev_body
Quote:

Originally Posted by Black Rose (Post 2005031)
I've checked into it. It's basically impossible.

The p_ model movement stops when the Z-rotation reaches a certain point even though the v_ model is still moving, that can be calculated of course. The problem with this is that 2 entitys are needed to separate the 2 different locations. I'm not very up to date on AMXx and I don't know if you can make one of them invisible for some players and the other one invisible for the others.

The player is constantly moving. This probably can not be calculated since it's only the model animation, not the actual angles of the crosshair that is moving. You will get offsets that looks like shit.

Someone has to find out all the lenghts of weapons. Possible but time consuming.

The calculations needed for a full server where people are spraying is a lot. The server could choke and players would suffer lag spikes if that happened. There's also a chance to hit the roof of maximum number of entities.

So, what exactly do you need and for what reason? Can we solve this in a different way?


Bos93 08-05-2013 08:00

Re: how to get p model's entity id
 
Ok. Set null string for pev_weaponmodel ( remove P_model ) and create info_target with your model.

Deploy - create
Holster - remove.


All times are GMT -4. The time now is 06:23.

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