Raised This Month: $ Target: $400
 0% 

Voting/Weapon drop help


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 11-01-2005 , 21:53  
Reply With Quote #8

Slightly optimized

Code:
//This makes it so you can use the core AMX Mod X functions //It "includes" the native definitions from includes\amxmodx.inc #include <amxmodx> #include <amxmisc> #include <fun> //Declare three string variables new PLUGIN[]="Knife Match" new AUTHOR[]="semaja2" new VERSION[]="0.01" //This is a public function. //It is necessary to initialize your script under AMX Mod X. //It takes no parameters, and is called right after map load. public plugin_init() {     //This is a function that takes three strings.     //It registers your function in AMX Mod X, and assigns some basic information.     register_plugin(PLUGIN, VERSION, AUTHOR)     //Sets cvars     register_concmd("amx_knifematch", "amx_knifematch", ADMIN_SLAY, "NO DESCRIPTION") } public amx_knifematch(id, level, cid) {     if(cmd_access(id,level,cid,1))         return 0         new num = get_maxplayers(), i         //This function will fill the players[32] variable     // with valid player ids.  num will contain the number     // of players that are valid.     for (i = 0; i <= num; i++)     {         strip_user_weapons(i)     }         return PLUGIN_HANDLED }

EDIT: If you want to see a complete knife plugin, although I'm not sure if it works, you can go here:

http://forums.alliedmods.net/showthread.php?t=20059
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
 



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 23:42.


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