Raised This Month: $ Target: $400
 0% 

100% newb here


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Zenith77
Veteran Member
Join Date: Aug 2005
Old 05-22-2007 , 18:40   Re: 100% newb here
Reply With Quote #8

For your say problem:

Code:
// put this in plugin_init(); register_clcmd("say", "CMDHook_Say"); // capture all say commands :) // put this some where else in the code... public CMDHook_Say(id) {      if (!is_user_alive(id))           return PLUGIN_CONTINUE; // show chat as normal      new args[32];      read_args(args, sizeof(args)-1);      new command[32], weapon[32];      parse(args, command, sizeof(command)-1, weapon, sizeof(weapon)-1);      if (equal(command, "/give"))      {           if (equal(weapon, "m4a1")                // do w/e you need to           return PLUGIN_HANDLED; // Don't show chat      }      return PLUGIN_CONTINUE; // appease the compiler. }

I kind of made the code generic, could be optimized (implement better methods) a lot more.
Anywho, this will allow you to do "/give m4a1", "/give ak47", etc instead of re-creating basically the same command over and over again.
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred

Last edited by Zenith77; 05-22-2007 at 19:14.
Zenith77 is offline
 



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 10:32.


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