AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Give user a NVG ?? (https://forums.alliedmods.net/showthread.php?t=82905)

5c0r-|3i0 01-01-2009 00:58

Give user a NVG ??
 
How to give player a NVG when player typin /????
Help me, Thanks a lot :D

XxAvalanchexX 01-01-2009 01:39

Re: Give user a NVG ??
 
Use cs_set_user_nvg.

Doc-Holiday 01-03-2009 14:11

Re: Give user a NVG ??
 
Quote:

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


What do you mean when typin?

as in

say : Hey *Nvg's On*

hleV 01-03-2009 14:16

Re: Give user a NVG ??
 
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);

Exolent[jNr] 01-03-2009 14:29

Re: Give user a NVG ??
 
@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;




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

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