Raised This Month: $ Target: $400
 0% 

the first death


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Stop95
New Member
Join Date: Dec 2012
Old 10-13-2014 , 03:40   the first death
Reply With Quote #1

How to create a gravitation will remain until the first death?



Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>

#define PLUGIN "shop tut"
#define VERSION "1.0"
#define AUTHOR "Blizzard"

new cash[33];

public plugin_init() {
    register_plugin(PLUGIN, VERSION, AUTHOR)
    
    register_clcmd("say /shop", "cmdShop", 0);
    
}


public cmdShop(id)
{

    new menu = menu_create("\rShop Menu:", "cmdShop_handler");
    
    menu_additem(menu, "\wGravity", "1", 0);
    
    menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);

    menu_display(id, menu, 0);

}

public cmdShop_handler(id, menu, item)
{

    if( item == MENU_EXIT )
    {
        menu_destroy(menu);
        return PLUGIN_HANDLED;
    }


    new data[6], szName[64];
    new access, callback;

    menu_item_getinfo(menu, item, access, data,charsmax(data), szName,charsmax(szName), callback);

    cash[id] = cs_get_user_money(id);
    
    new key = str_to_num(data);

    switch(key)
    {    
        case 1:
        {
            if(cash[id] > 100)
            {
                client_print(id, print_chat, "You Have Bought Gravity");
                cs_set_user_money(id, cash[id] - 100);
                set_user_gravity(id, 0.25);
            }
            else {
                client_print(id, print_chat, "You Dont Have Enough Money");
            }            
        }
    }


    menu_destroy(menu);
    return PLUGIN_HANDLED;
}
Stop95 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 17:41.


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