Raised This Month: $ Target: $400
 0% 

finding an entity's index and execute a command on it


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
haimmaik
Senior Member
Join Date: Jul 2005
Old 11-09-2005 , 06:43   finding an entity's index and execute a command on it
Reply With Quote #1

how do i find the index of the entity - "EV_SZ_viewmodel" of player "id" and execute - set_rendering(index,....) on it? :\
can u write an example here?
haimmaik is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 11-09-2005 , 06:49  
Reply With Quote #2

Code:
#define model "YOUR MODEL GOES HERE" new ent; while((ent = find_ent_by_model(ent,"player",model)) != 0) {     set_rendering( //... }

I guess...?
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
jtp10181
Veteran Member
Join Date: May 2004
Location: Madison, WI
Old 11-09-2005 , 06:52  
Reply With Quote #3

the index of the entity is the "id" and you don't need to do anything goofy with engine to change rendering on a payer.

http://www.amxmodx.org/funcwiki.php?go=func&id=119

if you use "kRenderTransAlpha" for the mode, the last number sets the alpha blend (transparency)
__________________
jtp10181 is offline
Send a message via ICQ to jtp10181 Send a message via AIM to jtp10181 Send a message via MSN to jtp10181 Send a message via Yahoo to jtp10181
haimmaik
Senior Member
Join Date: Jul 2005
Old 11-09-2005 , 07:22  
Reply With Quote #4

i need to find the EV_SZ_viewmodel model.. not my player model...

EV_SZ_viewmodel is the model of my hands holding the weapon (client side) the other players cannot see that.

the model - "models/v_knife.mdl" actually i only need the class of this
v_ models... (its not "player")
Attached Thumbnails
Click image for larger version

Name:	weapon.jpg
Views:	141
Size:	38.5 KB
ID:	4517  
haimmaik is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 11-09-2005 , 13:54  
Reply With Quote #5

News flash: you can't!
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
jtp10181
Veteran Member
Join Date: May 2004
Location: Madison, WI
Old 11-09-2005 , 20:08  
Reply With Quote #6

it doesn't have an entity id, its a setting of the player entity. You can change that model for a certian player, possibly making it blank would make it go away.
__________________
jtp10181 is offline
Send a message via ICQ to jtp10181 Send a message via AIM to jtp10181 Send a message via MSN to jtp10181 Send a message via Yahoo to jtp10181
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 23:35.


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