Raised This Month: $ Target: $400
 0% 

Get weapon entity index when dropped


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Buckshot
Senior Member
Join Date: Mar 2014
Location: Sweden
Old 04-17-2014 , 18:38   Re: Get weapon entity index when dropped
Reply With Quote #3

Quote:
Originally Posted by ironskillz1 View Post
From my last request

Code:
register_forward( FM_SetModel, "SetModel", 1);

public SetModel( ent,const model[ ] )
{	
	if( !pev_valid( ent )) 
		return FMRES_IGNORED
	
	new id;
	id = pev( ent, pev_owner );
	
	if(is_user_alive(id))
	{
		if (id == g_iLastRequest[ LR_PRISONER ] || id == g_iLastRequest[ LR_GUARD ] ) 
		{
			static weapon
			weapon = get_user_weapon(id);
			if (weapon == CSW_DEAGLE)
			{	
				//Get Team color
				new r, b;
				switch(get_user_team(id)) {
					case 1: r = 255;
						default: b = 255;
				}
				
				//Glow teamcolor
				set_rendering(ent,kRenderFxGlowShell,r,0,b,kRenderNormal,16);
		}
	}
	
	return FMRES_SUPERCEDE
}
Thanks mate.
__________________
PM me for private work.


Buckshot is offline
Send a message via Skype™ to Buckshot
 



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:53.


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