AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Set nightvision color and block for using flashlight. (https://forums.alliedmods.net/showthread.php?t=82606)

xbatista 12-26-2008 13:09

Set nightvision color and block for using flashlight.
 
1.How to set nightvision color? :oops:
2. How to block to use flashlight.

xbatista 12-26-2008 13:29

Re: Set nightvision color and block for using flashlight.
 
Quote:

// 100percents i'm sure it will not work :D
YES...

IneedHelp 12-26-2008 13:54

Re: Set nightvision color and block for using flashlight.
 
1. See custom NVG Color by SAMURAI
2. FM_CmdStart forward, check if the impulse is 100 and then block it ?

xbatista 12-26-2008 14:00

Re: Set nightvision color and block for using flashlight.
 
Quote:

1. See custom NVG Color by SAMURAI
Complicated code :/
I need simple set nvg color decay and other.
Without any stop nvg and other....

Quote:

2. FM_CmdStart forward, check if the impulse is 100 and then block it ?
I don't know.Ehhm somehow but block use flashlight.I solved the problem with icon now need to block it somehow :/

xPaw 12-26-2008 14:07

Re: Set nightvision color and block for using flashlight.
 
2.
Code:
#include <amxmodx> #include <fakemeta> public plugin_init( ) {     register_plugin( "Flashlight Blocker", "1.0", "xPaw" );     register_forward( FM_CmdStart, "fwCmdStart" ); } public fwCmdStart( id, uc_handle, seed ) {     if( get_uc( uc_handle, UC_Impulse ) == 100 ) {         if( get_user_team(id) == 1 ) {             set_uc( uc_handle, UC_Impulse, 0 );             return FMRES_HANDLED;         }     }     return FMRES_IGNORED; }

xbatista 12-26-2008 14:09

Re: Set nightvision color and block for using flashlight.
 
ok will test:mrgreen:
EDIT: tested,not blocks. :/

xPaw 12-26-2008 14:16

Re: Set nightvision color and block for using flashlight.
 
i'm failed with impusle number i set 101 but should be 100 ;D

xbatista 12-26-2008 14:17

Re: Set nightvision color and block for using flashlight.
 
WoW.
if( get_uc( uc_handle, UC_Impulse ) == 101 ) {
must be if( get_uc( uc_handle, UC_Impulse ) == 100) {

EDIT:YEP.
HOW ABOUT 1.? :)))

xPaw 12-26-2008 14:21

Re: Set nightvision color and block for using flashlight.
 
See custom NVG Color by SAMURAI like IneedHelp sayd, its pretty good code.

xbatista 12-26-2008 14:22

Re: Set nightvision color and block for using flashlight.
 
OK :/
Спасибо за flashlight xD .


All times are GMT -4. The time now is 09:08.

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