Raised This Month: $ Target: $400
 0% 

knife mode doesnt work


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Crusher918
Senior Member
Join Date: Feb 2007
Location: New York
Old 02-21-2007 , 22:15   knife mode doesnt work
Reply With Quote #1

hi I just moved my thread because i think i posted in the wrong section but i'm having problem with the script

here's the old thread:

http://forums.alliedmods.net/showthread.php?t=51655
Crusher918 is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 02-21-2007 , 23:47   Re: knife mode doesnt work
Reply With Quote #2

Try this.

Code:
 #include <amxmod>  #include <amxmisc>  new bool:KnifeEnabled = false;  public amx_enableknife(id,level,cid)  {     if(!cmd_access(id,level,cid,2))         return PLUGIN_HANDLED;     new arg1[4];     read_argv(1,arg1,3);     if(equal(arg1,"1") || equali(arg1,"on"))         KnifeEnabled = true     else if(equal(arg1,"0") || equali(arg1,"off"))         KnifeEnabled = false     else     {         console_print(id,"Knives Only Mode is %s",KnifeEnabled ? "enabled" : "disabled");         return PLUGIN_HANDLED;     }     console_print(id,"Knives Only Mode %s",KnifeEnabled ? "enabled" : "disabled");     client_print(0,print_center,"Knives Only Mode Has Been %s!",KnifeEnabled ? "Enabled" : "Disabled");     engclient_cmd(0,"weapon_knife");     set_hudmessage(0, 100, 0, 0.05, 0.65, 2, 0.02, 10.0, 0.01, 0.1, 2);     show_hudmessage(0,KnifeEnabled ? "Seulement les coutos sont autorises !" : "Toutes les armes sont autorisees !");     return PLUGIN_HANDLED;  }  public switchweapon(id)  {     if(KnifeEnabled) engclient_cmd(id,"weapon_knife")  }  public plugin_init()  {     register_plugin("Knife Arena","0.9","tcquest78");     register_event("CurWeapon","switchweapon","be","1=1","2!29");     register_concmd("amx_knives","amx_enableknife",ADMIN_LEVEL_B,"<1|0> - knives only mode");  }
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX 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 00:37.


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