Raised This Month: $32 Target: $400
 8% 

Request : shop problem


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Ben9513
Member
Join Date: Nov 2010
Old 06-01-2014 , 11:37   Request : shop problem
Reply With Quote #1

PHP Code:
public WeaponsMenu_Handler(idkey)
{
    if(
get_user_team(id) !=1)
    {
    
ColorChat(id,RED"^x03[Boom` Shop]^x01 You must be^x04 Terror")
    return 
PLUGIN_HANDLED;
    }
    
        if(!
is_user_alive(id))
    {
                
ColorChat(idRED"^x03[Boom` Shop]^x01 You must be alive!");
                return 
PLUGIN_HANDLED;
        }
        new 
user_money cs_get_user_money_ul(id);
        switch(
key) {
                case 
0: {
                        if(
user_has_weapon(idCSW_AWP)){
                        
ColorChat(idRED"^x03[Boom` Shop]^x01 You already have ^x04 Awp^x01.");
                        return 
PLUGIN_HANDLED;
                        }
                        new 
cost 16000;
                        if(
user_money cost){
                                
ColorChat(idRED"^x03[Boom` Shop]^x01 You don't have enough money to buy^x04 Awp^x01.");
                                return 
PLUGIN_HANDLED;
                        } else
                        
cs_set_weapon_ammo(give_item(id"weapon_awp"), 1)
                        
cs_set_user_money_ul(iduser_money cost)
                        
ColorChat(idRED"^x03[Boom` Shop]^x01 You bought^x04 Awp^x01.")
                }
                case 
1: {
                        if(
user_has_weapon(idCSW_DEAGLE)){
                        
ColorChat(idRED"^x03[Boom` Shop]^x01 You already have ^x04 Deagle^x01.");
                        return 
PLUGIN_HANDLED;
                        }
                        new 
cost 14000;
                        if(
user_money cost){
                                
ColorChat(idRED"^x03[Boom` Shop]^x01 You don't have enough money to buy^x04 Deagle^x01.");
                                return 
PLUGIN_HANDLED;
                        }
                        
cs_set_weapon_ammo(give_item(id"weapon_deagle"), 1)
                        
cs_set_user_money_ul(iduser_money cost)
                        
ColorChat(idRED"^x03[Boom` Shop]^x01 You bought^x04 Deagle^x01.")
}
                case 
9show_MainMenu(id);
        }
        return 
PLUGIN_HANDLED;

can some1 please make in that code ,, only when 15 secs over after round started people could buy those ?
i mean , if round started .. and 15 secs doesnt over yet , no1 could buy AWP / DGL from that code ..

P.S ; IS NOT THE FULL CODE - HERE'S THE THING I WANT SO I DUN HAVE TO POST WHOLE CODE I GUESS .

thanks !

Last edited by Ben9513; 06-01-2014 at 11:38. Reason: P.S
Ben9513 is offline
joshknifer
Veteran Member
Join Date: Jun 2011
Location: Denver, CO
Old 06-02-2014 , 13:37   Re: Request : shop problem
Reply With Quote #2

Actually you probably would have to post the full code.
__________________
joshknifer is offline
Send a message via Skype™ to joshknifer
Ben9513
Member
Join Date: Nov 2010
Old 06-02-2014 , 13:40   Re: Request : shop problem
Reply With Quote #3

problem solved by Flick3R , thanks !
Ben9513 is offline
Reply



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 16:40.


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