Raised This Month: $ Target: $400
 0% 

command for purchase only adm


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Liverwiz
Veteran Member
Join Date: Feb 2010
Location: Maryland
Old 06-19-2012 , 11:52   Re: command for purchase only adm
Reply With Quote #7

Code:
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <amxmisc> #define PLUGIN "Crappy Plugin" #define VERSION "1.0" #define AUTHOR "CrapperCoder420" public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)         register_concmd("buy", "CrappyBuyFunction", ADMIN_BAN, "buy [item] [ammount]") } public CrappybuyFunction(id, level, cid) {     // This checks to see if the person who executed the command     // is in fact an admin, and passed 3 arguments into console     // 0 = command; 1 = item; 2 = ammount     // if not it simply returns out of the plugin and goes on with tis day     if(!cmd_access(id, level, cid, 3)         return PLUGIN_HANDLED             // This grabs the first argument from the command passed     // and saves it to the defined sz_item     new sz_item[32]; read_argv(1, sz_item, charsmax(sz_item) )     // This grabs the second argument from the command line     // and saves it to the defined sz_ammount string     new sz_ammount[32]; read_argv(2, sz_ammount, charsmax(sz_ammount) )     // I ignore the item because i odn't know really what you want to do     // I set sz_ammount to the ammount variable     // this is saved as an int/number/decimal using str_to_num     // which takes a string, parses it into a number, and returns it     new ammount = str_to_num(sz_ammount)     // I then return the ammount; Just to show it did something.     return ammount }
__________________
What an elegant solution to a problem that doesn't need solving....
Liverwiz 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 06:06.


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