Raised This Month: $ Target: $400
 0% 

Give user a NVG ??


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
5c0r-|3i0
Veteran Member
Join Date: Nov 2008
Location: Việt Nam
Old 01-01-2009 , 00:58   Give user a NVG ??
Reply With Quote #1

How to give player a NVG when player typin /????
Help me, Thanks a lot
5c0r-|3i0 is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 01-01-2009 , 01:39   Re: Give user a NVG ??
Reply With Quote #2

Use cs_set_user_nvg.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 01-03-2009 , 14:11   Re: Give user a NVG ??
Reply With Quote #3

Quote:
Originally Posted by 5c0r-|3i0 View Post
How to give player a NVG when player typin /????
Help me, Thanks a lot

What do you mean when typin?

as in

say : Hey *Nvg's On*
Doc-Holiday is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 01-03-2009 , 14:16   Re: Give user a NVG ??
Reply With Quote #4

Code:
#include <amxmodx> #include <cstrike>   #define PLUGIN "Give NVG" #define VERSION "1.0" #define AUTHOR "hleV"   public plugin_init() {         register_plugin(PLUGIN, VERSION, AUTHOR);           register_clcmd("say /????", "giveNVG"); }   public giveNVG(cl)         if (!cs_get_user_nvg(cl))                 cs_set_user_nvg(cl, 1);
__________________
hleV is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 01-03-2009 , 14:29   Re: Give user a NVG ??
Reply With Quote #5

@hleV
You shouldn't check before setting it.
If you just set it, it won't give it to the player if he/she already has it.

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>

public plugin_init()
{
    
register_plugin("Free NVG""0.1""Exolent");
    
    
register_clcmd("say /nvg""CmdNVG");
}

public 
CmdNVG(client)
{
    
cs_set_user_nvg(client1);
    
    return 
PLUGIN_HANDLED;

__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] 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 09:07.


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