Raised This Month: $ Target: $400
 0% 

night vision for human


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
glitch
Junior Member
Join Date: Sep 2014
Old 09-01-2014 , 04:14   night vision for human
Reply With Quote #1

can anyone help me?
i want to set night vision for human by default like zombie.
zp 4.3
sorry for bad english
glitch is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 09-01-2014 , 04:18   Re: night vision for human
Reply With Quote #2

Just edit the .cfg file. Then, enable the night vision for human. ;)
zmd94 is offline
glitch
Junior Member
Join Date: Sep 2014
Old 09-01-2014 , 04:22   Re: night vision for human
Reply With Quote #3

i cant enable it for human
Code:
// Flashlight & Nightvision
// ------------------------
zp_nvg_give 1 // Give nightvision [0-disabled // 1-enabled // 2-enabled, but no auto turning on]
zp_nvg_custom 1 // Enable custom nightvision
zp_nvg_size 80 // Nightvision size (radius)
zp_nvg_color_R 0 // Zombie custom nightvision color (red)
zp_nvg_color_G 150 // Zombie custom nightvision color (green)
zp_nvg_color_B 0 // Zombie custom nightvision color (blue)
zp_nvg_hum_color_R 0 // Human/Spectator custom nightvision color (red)
zp_nvg_hum_color_G 150 // Human/Spectator custom nightvision color (green)
zp_nvg_hum_color_B 0 // Human/Spectator custom nightvision color (blue)
zp_nvg_nem_color_R 150 // Nemesis custom nightvision color (red)
zp_nvg_nem_color_G 0 // Nemesis custom nightvision color (green)
zp_nvg_nem_color_B 0 // Nemesis custom nightvision color (blue)
zp_flash_custom 0 // Enable custom flashlight
zp_flash_size 10 // Custom flashlight size (radius)
zp_flash_drain 1 // Custom flashlight drain rate [0-unlimited batteries]
zp_flash_charge 5 // Custom flashlight charge rate [0-non chargeable batteries]
zp_flash_distance 1000 // Custom flashlight max distance
zp_flash_color_R 100 // Custom flashlight color (red)
zp_flash_color_G 100 // Custom flashlight color (green)
zp_flash_color_B 100 // Custom flashlight color (blue)
zp_flash_show_all 1 // Let players see each other's flashlights
glitch is offline
glitch
Junior Member
Join Date: Sep 2014
Old 09-01-2014 , 04:54   Re: night vision for human
Reply With Quote #4

can you help me?
glitch is offline
bat
Veteran Member
Join Date: Jul 2012
Old 09-01-2014 , 05:10   Re: night vision for human
Reply With Quote #5

Code from biohazard.. Not Tested.
Code:
#include amxmodx
#include hamsandwich
#include fakemeta
#include zombieplague

#define HAS_NVG (1<<0)
#define OFFSET_NVG 129

public plugin_init()
{
     RegisterHam(Ham_Spawn, "player", "HAMHamrespawn", 1)
}

public HAMHamrespawn(id)
{

     if(is_user_alive(id) && !zp_get_user_zombie(id))
     {
           fm_set_user_nvg(id /*,1*/) // Just remove /* */ for autoset nvg for human :)
     }
}


stock fm_set_user_nvg(index, onoff = 1)
{
	static nvg
	nvg = get_pdata_int(index, OFFSET_NVG)
	
	set_pdata_int(index, OFFSET_NVG, onoff == 1 ? nvg | HAS_NVG : nvg & ~HAS_NVG)
	return 1
}
__________________
bat is offline
Send a message via Skype™ to bat
glitch
Junior Member
Join Date: Sep 2014
Old 09-01-2014 , 05:46   Re: night vision for human
Reply With Quote #6

Quote:
Originally Posted by bat View Post
Code from biohazard.. Not Tested.
Code:
#include amxmodx
#include hamsandwich
#include fakemeta
#include zombieplague

#define HAS_NVG (1<<0)
#define OFFSET_NVG 129

public plugin_init()
{
     RegisterHam(Ham_Spawn, "player", "HAMHamrespawn", 1)
}

public HAMHamrespawn(id)
{

     if(is_user_alive(id) && !zp_get_user_zombie(id))
     {
           fm_set_user_nvg(id /*,1*/) // Just remove /* */ for autoset nvg for human :)
     }
}


stock fm_set_user_nvg(index, onoff = 1)
{
    static nvg
    nvg = get_pdata_int(index, OFFSET_NVG)
    
    set_pdata_int(index, OFFSET_NVG, onoff == 1 ? nvg | HAS_NVG : nvg & ~HAS_NVG)
    return 1
}










how to use it?
glitch is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 09-01-2014 , 05:55   Re: night vision for human
Reply With Quote #7

Quote:
Originally Posted by Glitch
How to use it?
By pressing [N] button. ;)

Last edited by zmd94; 09-01-2014 at 05:56.
zmd94 is offline
cr0w
Senior Member
Join Date: Mar 2014
Location: middle east
Old 09-02-2014 , 05:33   Re: night vision for human
Reply With Quote #8

Quote:
Code from biohazard.. Not Tested.
you must enable biohazard compact in plugins.ini file !

Quote:
By pressing [N] button. ;)
lol .. +1

you must turn this codes to :

By Default you have 3 options to enable your Nvision : 0 - 1 - 2

by using 0 no one can use Nvision , By using 1 can give night vision and will be enable by using N On keyboard
by using 2 you can give Nvision and Automatic enable it

and here are colors of nvision :
Quote:
zp_nvg_hum_color_R 0 // Human/Spectator custom nightvision color (red)
zp_nvg_hum_color_G 150 // Human/Spectator custom nightvision color (green)
zp_nvg_hum_color_B 0 // Human/Spectator custom nightvision color (blue)
zp_nvg_nem_color_R 150 // Nemesis custom nightvision color (red)
take look at colors . ! by the way you can change number of colors in 0 to 150 or 100 or 10 or anything
__________________
the city is no fun
there is no sun
and its so dark

Last edited by cr0w; 09-02-2014 at 05:40.
cr0w is offline
Send a message via Yahoo to cr0w Send a message via Skype™ to cr0w
Brian_Chino77
Senior Member
Join Date: Mar 2014
Location: dunno
Old 09-02-2014 , 05:54   Re: night vision for human
Reply With Quote #9

But zp 4.3 don't have any 'Human Nightvision' it must be buyed (That's what i know)
Brian_Chino77 is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 09-02-2014 , 06:00   Re: night vision for human
Reply With Quote #10

Yes, thats right. Only new ZP5.0 has that features. Unless, that ZP4.3 version is the modified version. ;)
zmd94 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 10:22.


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