Raised This Month: $ Target: $400
 0% 

Restrict buying NVGs


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
xmdxtremekiller
Member
Join Date: Mar 2004
Old 12-05-2004 , 14:30   Restrict buying NVGs
Reply With Quote #1

I tried my best to find a script to do that, i checked restmenu.sma but it was too complicated. If someone can help me to do this ide be greatful. And for the people asking why dont you use restmenu to restrict it, Its cuz i need this section to be a part of my plugin.
xmdxtremekiller is offline
Ronkkrop
Member
Join Date: May 2004
Old 12-05-2004 , 21:00  
Reply With Quote #2

Code:
#include <amxmodx> public nvg_restrict( ) {      if ( get_cvar_num("amx_restrictnvgs") == 0 )           return PLUGIN_CONTINUE;            return PLUGIN_HANDLED; } public plugin_init( ) {      register_plugin("NVG Restrict","0.1","Cr!Z");      register_cvar("amx_restrictnvgs", "1");      //make it run my function when they try to buy nvgs      register_clcmd("nvgs", "nvg_restrict") }

Well that should work...simple little plugin, just compile it and it should work.
__________________
"I refuse to join any club that would have me as a member."
--Groucho Marx
Ronkkrop is offline
Send a message via ICQ to Ronkkrop Send a message via AIM to Ronkkrop Send a message via MSN to Ronkkrop Send a message via Yahoo to Ronkkrop
xmdxtremekiller
Member
Join Date: Mar 2004
Old 12-06-2004 , 00:59  
Reply With Quote #3

thx alot thats what i needed
xmdxtremekiller is offline
xmdxtremekiller
Member
Join Date: Mar 2004
Old 12-06-2004 , 19:01  
Reply With Quote #4

I had another question what about changing the price value of nvgs to 16000.
xmdxtremekiller is offline
Ronkkrop
Member
Join Date: May 2004
Old 12-06-2004 , 20:13  
Reply With Quote #5

Quote:
Originally Posted by xmdxtremekiller
I had another question what about changing the price value of nvgs to 16000.
Funny you should say that. A module was just released by DamagedSoul that will do just that.

http://forums.alliedmods.net/showthread.php?t=8230

Code:
cs_set_item_cost(CsItems:CSI_NIGHTVISION, 16000);

of course that is what the code will look like when you add the CsHack module to your amxx.
__________________
"I refuse to join any club that would have me as a member."
--Groucho Marx
Ronkkrop is offline
Send a message via ICQ to Ronkkrop Send a message via AIM to Ronkkrop Send a message via MSN to Ronkkrop Send a message via Yahoo to Ronkkrop
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 17:20.


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