Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- case '1': // Awp
- {
- new money = cs_get_user_money( id );
- new cost = get_pcvar_num( pCvar_AwpCost );
- if( money >= cost )
- {
- if( !g_Items[ id ][ Awp ] )
- {
- if( is_user_alive( id ) )
- {
- if( get_user_team( id ) == 1 )
- {
- cs_set_user_money( id, money - cost );
- give_item( id, "weapon_awp" );
- cs_set_weapon_ammo( find_ent_by_owner( 1, "weapon_awp", id ), 1 );
- g_Items[ id ][ Awp ] = true;
- new szName[ 32 ];
- get_user_name( id, szName, 31 );
- set_hudmessage( 255, 255, 0, -1.0, 0.35, 0, 0.0, 12.0, 0.1, 0.2, 4 );
- show_hudmessage( 0, "%s bought an AWP with 1 bullet! BEWARE CTS!!", szName );
- }
- else
- {
- client_print( id, print_chat, "%s You must be a terrorist to buy this item!", prefix );
- return PLUGIN_HANDLED;
- }
- }
- else if( !is_user_alive( id ) )
- {
- client_print( id, print_chat, "%s You must be alive to use the shop!", prefix );
- return PLUGIN_HANDLED;
- }
- }
- else if( g_Items[ id ][ Awp ] )
- {
- client_print( id, print_chat, "%s You already bought this item!", prefix );
- return PLUGIN_HANDLED;
- }
- }
- else if( money < cost )
- {
- client_print( id, print_chat, "%s You do not have enough money for this!", prefix );
- return PLUGIN_HANDLED;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement