Raised This Month: $ Target: $400
 0% 

Give nightvision for spects


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
CAMEL
BANNED
Join Date: Dec 2007
Location: ANEAXSLAND
Old 12-14-2007 , 16:31   Give nightvision for spects
Reply With Quote #1

Give nightvision for spects :$.. I can't make it.. :$.. if someone help me or throw me a bit of information :$
CAMEL is offline
Old 12-16-2007, 07:09
IneedHelp
This message has been deleted by IneedHelp. Reason: dios.
_Master_
Senior Member
Join Date: Dec 2006
Old 12-16-2007 , 09:37   Re: Give nightvision for spects
Reply With Quote #2

[OFF-TOPIC]
IneedHelp stop posting random code. You have no ideea how many things are wrong in there. Thank you.
[/OFF-TOPIC]
_Master_ is offline
CAMEL
BANNED
Join Date: Dec 2007
Location: ANEAXSLAND
Old 12-16-2007 , 15:07   Re: Give nightvision for spects
Reply With Quote #3

someone can help? =S... I have a little code, but isn't working..
CAMEL is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 12-17-2007 , 03:12   Re: Give nightvision for spects
Reply With Quote #4

Try this .

EDIT: I'm not sure to understand well. Do you want to get nvg after / death / choosing spectator / both ? This code below is both.

Code:
    #include <amxmodx>     #include <fakemeta>     new g_iMsg_NvgToggle;         #define HAS_NVGOGGLES ( 1 << 0 )         #define OFFSET_NVGOGGLES  129     #define LINUX_EXTRAOFFSET 5         public plugin_init()     {         register_plugin( "Give spectator NVG", "1.0", "Arkshine" );                 register_event( "DeathMsg", "eDeathMsg", "a" );         register_event( "TeamInfo", "eTeamInfo", "a", "2=SPECTATOR" );                 g_iMsg_NvgToggle = get_user_msgid( "NVGToggle" );     }         public eDeathMsg()         set_task( 1.0, "set_user_nvg", read_data( 2 ) );             public eTeamInfo()         set_task( 1.0, "set_user_nvg", read_data( 1 ) );     public set_user_nvg( id )     {         static iDefusekit;         iDefusekit = get_user_nvg( id );                 if( !( iDefusekit & HAS_NVGOGGLES ) )         {             iDefusekit |= HAS_NVGOGGLES;             set_pdata_int( id, OFFSET_NVGOGGLES, iDefusekit, LINUX_EXTRAOFFSET );         }                 Active_nvg( id );     }         get_user_nvg( id )         return ( get_pdata_int( id, OFFSET_NVGOGGLES, LINUX_EXTRAOFFSET ) & HAS_NVGOGGLES ) ? 1 : 0;         Active_nvg( id )     {         static const sNvg_sound[] = "items/nvg_on.wav";         client_cmd( id, "spk %s", sNvg_sound );                 message_begin( MSG_ONE, g_iMsg_NvgToggle, _, id );         write_byte( 1 );         message_end();     }
__________________

Last edited by Arkshine; 12-17-2007 at 03:28.
Arkshine is offline
Lisa
Senior Member
Join Date: Jan 2007
Old 12-17-2007 , 18:42   Re: Give nightvision for spects
Reply With Quote #5

I just tried this plugin (you helped me with the other night vision plugin just now) I was going to use both. But after I loaded this one I get:

( 16) Load fails: Plugin file open error (plugin "givespec_nvg.amxx")

It compiled fine for me but has that error when I try to run it.
Lisa is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 12-17-2007 , 18:44   Re: Give nightvision for spects
Reply With Quote #6

Quote:
Plugin file open error
Be sure that the plugin is named exactly "givespec_nvg.amxx" in your plugins/ directory.
__________________
Arkshine is offline
Lisa
Senior Member
Join Date: Jan 2007
Old 12-17-2007 , 18:48   Re: Give nightvision for spects
Reply With Quote #7

Ohh I'm sorry you're right. When I uploaded to my ftp it added '.txt' to the end of the plugin name. I should have noticed.

It works completely fine now thank you for the help!
Lisa is offline
Old 05-13-2009, 13:27
r2r
This message has been deleted by Exolent[jNr]. Reason: Don't revive old dead topics.
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 11:13.


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