Raised This Month: $ Target: $400
 0% 

NVG Color


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 03-01-2005 , 13:42   NVG Color
Reply With Quote #1

Hey, is there a way I can change the color of NVG (nightvision goggles) to say, red?

Code:
public setNvg(index) {     cs_set_user_nvg(index,1)     // Set nvg color ... }
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
Extremeone
Senior Member
Join Date: Jan 2005
Old 03-01-2005 , 14:11  
Reply With Quote #2

in the superhero forums the terminator hero has red NVG i think its somewhere in here:
Code:
public ToggleNVG(id) {    if (!gHasTermPower[id] || !shModActive() ) return PLUGIN_CONTINUE    if (NightVisionUse[id]) StopNVG(id)    else StartNVG(id)    return PLUGIN_HANDLED } //---------------------------------------------------------------------------------------------- public StartNVG(id) // NightVision code by Lazy (a little bit modified) {    if ( !gHasTermPower[id] || !shModActive() ) return PLUGIN_CONTINUE    new player[32]    get_user_name(id,player,32)    emit_sound(id,CHAN_ITEM,"items/nvg_on.wav",1.0,ATTN_NORM,0,PITCH_NORM)    set_task(0.1,"RunNVG",id+100,player,32,"b") // another task id for each player    set_task(0.1,"RunNVG2",id+200,player,32,"b")    NightVisionUse[id] = true    return PLUGIN_HANDLED } //---------------------------------------------------------------------------------------------- public StopNVG(id) {    emit_sound(id,CHAN_ITEM,"items/nvg_off.wav",1.0,ATTN_NORM,0,PITCH_NORM)    remove_task(id+100)    remove_task(id+200)    NightVisionUse[id] = false    return PLUGIN_HANDLED } //---------------------------------------------------------------------------------------------- public RunNVG(player[]) {    new id = get_user_index(player)    new origin[3]    get_user_origin(id,origin)    message_begin(MSG_ONE,SVC_TEMPENTITY,{0,0,0},id)    write_byte(27)    write_coord(origin[0])    write_coord(origin[1])    write_coord(origin[2])    write_byte(125)    write_byte(230)    write_byte(0)    write_byte(0)    write_byte(1)    write_byte(10)    message_end() } //---------------------------------------------------------------------------------------------- public RunNVG2(player[]) {    new id = get_user_index(player)    message_begin(MSG_ONE,gmsgFade,{0,0,0},id)    write_short(1000)    write_short(1000)    write_short(1<<12)    write_byte(230)    write_byte(0)    write_byte(0)    write_byte(150)    message_end() } //----------------------------------------------------------------------------------------------


you can dl the full source here:
http://shero.rocks-hideout.com/forum...load.php?id=34

edit

or here?
Code:
new bool:NightVisionUse[33]
Extremeone is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 03-01-2005 , 14:20  
Reply With Quote #3

NightVisionUse is set when it's in use, so you can't use it while your using it . Note the NightVisionUse[id] = true code.

I guess what I'm looking for is in all of that write crap that I don't understand .
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
knekter
Senior Member
Join Date: Mar 2004
Location: PA
Old 03-01-2005 , 17:18   simple
Reply With Quote #4

He isnt changing the color of the NVG, hes using a message:

Code:
message_begin(MSG_ONE, SVC_TEMPENTITY, {0, 0, 0}, id) write_byte(27) // TE_DLIGHT write_coord(origin[0]) // X coord write_coord(origin[1]) // Y coord write_coord(origin[2]) // Z coord write_coord(radius) // radius write_byte(250) // red write_byte(0) // green write_byte(0) // blue write_byte(250) // brightness write_byte(10) // life write_coord(0) // decay rate message_end()

TE_DLIGHT stands for Temporary Entity Dynamic Light
__________________
More updates for Matrix Mod!
knekter is offline
Send a message via AIM to knekter Send a message via MSN to knekter
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 03-01-2005 , 17:29  
Reply With Quote #5

So that is all I need?
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
Reply


Thread Tools
Display Modes

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 14:08.


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