Raised This Month: $ Target: $400
 0% 

night vision customized


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
alan_el_more
Veteran Member
Join Date: Jul 2008
Location: amxmodx-es.com
Old 03-29-2009 , 12:07   night vision customized
Reply With Quote #1

how can I give a nightvision customized to a player?
customized i refer to set the color (R G B)
__________________
alan_el_more is offline
ot_207
Veteran Member
Join Date: Jan 2008
Location: Romania The Love Country
Old 03-29-2009 , 12:11   Re: night vision customized
Reply With Quote #2

PHP Code:
dynamic_light_on_player(id,Float:origin[3], red 255green 255blue 255)
{
    
message_begin(MSG_ONE,SVC_TEMPENTITY,_,id)
    
write_byte(TE_DLIGHT// The light effect
    
engfunc(EngFunc_WriteCoord,origin[0]) // x
    
engfunc(EngFunc_WriteCoord,origin[1]) // y
    
engfunc(EngFunc_WriteCoord,origin[2]) // z
    
write_byte(75// radius
    
write_byte(red// r
    
write_byte(green// g
    
write_byte(blue// b
    
write_byte(4// life
    
write_byte(120// decay rate
    
message_end()

You need to refresh the message, the light is a temp entity!
__________________
My approved plug-ins | Good for newbies! | Problems?

Back, will come around when I have time.
ot_207 is offline
alan_el_more
Veteran Member
Join Date: Jul 2008
Location: amxmodx-es.com
Old 03-29-2009 , 12:23   Re: night vision customized
Reply With Quote #3

Quote:
Originally Posted by ot_207 View Post
PHP Code:
dynamic_light_on_player(id,Float:origin[3], red 255green 255blue 255)
{
    
message_begin(MSG_ONE,SVC_TEMPENTITY,_,id)
    
write_byte(TE_DLIGHT// The light effect
    
engfunc(EngFunc_WriteCoord,origin[0]) // x
    
engfunc(EngFunc_WriteCoord,origin[1]) // y
    
engfunc(EngFunc_WriteCoord,origin[2]) // z
    
write_byte(75// radius
    
write_byte(red// r
    
write_byte(green// g
    
write_byte(blue// b
    
write_byte(4// life
    
write_byte(120// decay rate
    
message_end()

You need to refresh the message, the light is a temp entity!
thanks
always helping
__________________
alan_el_more is offline
alan_el_more
Veteran Member
Join Date: Jul 2008
Location: amxmodx-es.com
Old 03-29-2009 , 12:49   Re: night vision customized
Reply With Quote #4

first, sorry for the double post
second, how do i run the dynamic_light_on_player?
dynamic_light_on_player(id, ???, 255, 0, 0)
__________________
alan_el_more is offline
ot_207
Veteran Member
Join Date: Jan 2008
Location: Romania The Love Country
Old 03-29-2009 , 12:52   Re: night vision customized
Reply With Quote #5

origin is the player origin . get his origin and place it in here.
__________________
My approved plug-ins | Good for newbies! | Problems?

Back, will come around when I have time.
ot_207 is offline
alan_el_more
Veteran Member
Join Date: Jul 2008
Location: amxmodx-es.com
Old 03-29-2009 , 13:02   Re: night vision customized
Reply With Quote #6

But How would it be?
__________________
alan_el_more is offline
ot_207
Veteran Member
Join Date: Jan 2008
Location: Romania The Love Country
Old 03-29-2009 , 13:18   Re: night vision customized
Reply With Quote #7

PHP Code:
new Float:origin[3]
// engine
entity_get_vec(id,EV_VEC_origin,origin)
// fakemeta
pev(id,pev_origin,origin
__________________
My approved plug-ins | Good for newbies! | Problems?

Back, will come around when I have time.
ot_207 is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 03-29-2009 , 13:19   Re: night vision customized
Reply With Quote #8

SchlumPF found a good way to make a custom nvg, let him provide or not his code.
Code uses ScreenFade thought, so you would have to implement flash in it.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
BOYSplayCS
BANNED
Join Date: Apr 2008
Location: Gainesville, FL
Old 03-29-2009 , 13:20   Re: night vision customized
Reply With Quote #9

Fakemeta would be more efficient in this case.
BOYSplayCS is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 03-29-2009 , 13:25   Re: night vision customized
Reply With Quote #10

Quote:
Originally Posted by BOYSplayCS View Post
Fakemeta would be more efficient in this case.
Why ?


My guess is get_user_origin + write_coord would be more efficient.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod 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 08:58.


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