Raised This Month: $ Target: $400
 0% 

buy an m4


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
{PHILMAGROIN}
Senior Member
Join Date: Aug 2007
Location: In the middle of the des
Old 07-26-2008 , 04:36   buy an m4
Reply With Quote #1

This is my first plugin ever made without any help other than looking at other code. Im posting it for people to tell me what i did wrong, what i can do better,to critisize me, or use? probably another plugin out there like this but whatever. So here it is
Code:
#include <amxmodx> #include <amxmisc> #include <cstrike> #include <fun> #define PLUGIN "Buy_m4" #define VERSION "1.0" #define AUTHOR "{PHILMAGROIN}" new m4_cost public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)         register_concmd("say /m4", "buym4")     m4_cost = register_cvar("m4_price", "800") } public buym4(id) {     if(!is_user_alive(id))         return PLUGIN_HANDLED                 new money = cs_get_user_money(id);         new cost;                 cost = get_pcvar_num(m4_cost)                 if(money < cost)         {             client_print(id, print_chat,"[AMXX] You dont't have enough money for an m4.")         }         else {             cs_set_user_money(id, cs_get_user_money(id) - cost);             {                 client_print(id, print_chat,"[AMXX] Kill Em with your new m4.")                 give_item(id, "weapon_m4a1");             }         return 1;     } }
__________________
[B]

Last edited by {PHILMAGROIN}; 07-26-2008 at 04:38.
{PHILMAGROIN} 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 05:38.


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