Raised This Month: $12 Target: $400
 3% 

Surf Shop please.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
poliisi299
Senior Member
Join Date: May 2011
Old 03-30-2012 , 08:05   Surf Shop please.
Reply With Quote #1

Hi all i have surf server and i wan in my surf server shop

shop:

AWP: 5000$
Deagle: 2500
HE Grenade: 1500
Flash: 1000
Smoke: 1000

Please if you know how to make it, make it to me, Thank you

Sory my english

Last edited by poliisi299; 03-30-2012 at 08:19.
poliisi299 is offline
tuty
Veteran Member
Join Date: Jul 2008
Location: UK
Old 03-30-2012 , 08:58   Re: Surf Shop please.
Reply With Quote #2

Code:
#include < amxmodx > #include < fun > #include < cstrike > #include < hamsandwich > #pragma semicolon 1 #define MAX_PLAYERS  32 + 1 enum _: iShopItems {     ITEM_AWP,     ITEM_DEAGLE,     ITEM_HEGRENADE,     ITEM_FLASH,     ITEM_SMOKE }; new const gShopMenu[ iShopItems ][ ] = {     "Awp",     "Deagle",     "HE Grenade",     "Flash",     "Smoke" }; new const gShopPrices[ iShopItems ] = {     5_000,     2_500,     1_500,     1_000,     1_000 }; new bItemBought[ MAX_PLAYERS ][ iShopItems ]; public plugin_init( ) {     register_plugin( "Surf Shop", "1.0.1", "tuty" );         RegisterHam( Ham_Spawn, "player", "bacon_Spawned", 1 );         register_clcmd( "say /surfshop", "CommandShop" );     register_clcmd( "say_team /surfshop", "CommandShop" ); } public bacon_Spawned( id ) {     if( is_user_alive( id ) )     {         new i;         for( i = 0; i < iShopItems; i++ )         {             bItemBought[ id ][ i ] = 0;         }     } } public CommandShop( id ) {     if( !is_user_alive( id ) )     {         client_print( id, print_chat, "You must be alive to buy items!" );             return PLUGIN_HANDLED;     }         new iMenu = menu_create( "\rChoose Item!", "menu_ShopHandler" );         new szFormatMenu[ 400 ], idString[ 3 ], i;         for( i = 0; i < iShopItems; i++ )     {         formatex( szFormatMenu, charsmax( szFormatMenu ), "\w%s \R\y%d$", gShopMenu[ i ], gShopPrices[ i ] );         num_to_str( i, idString, charsmax( idString ) );                 menu_additem( iMenu, szFormatMenu, idString );     }         menu_display( id, iMenu );     return PLUGIN_CONTINUE; } public menu_ShopHandler( id, menu, item ) {     if( item >= 0 )     {         new access, callback, idString[ 3 ];                menu_item_getinfo( menu, item, access, idString, charsmax( idString ), _, _, callback );                    new iKey = str_to_num( idString );         new iMoney = cs_get_user_money( id );            switch( iKey )         {             case ITEM_AWP:             {                 if( iMoney < gShopPrices[ ITEM_AWP ] )                 {                     client_print( id, print_chat, "You don't have enoug money! You need %d$", gShopPrices[ ITEM_AWP ] );                                         return PLUGIN_HANDLED;                 }                                     if( bItemBought[ id ][ ITEM_AWP ] )                 {                     client_print( id, print_chat, "You already bought this item!" );                                         return PLUGIN_HANDLED;                 }                 give_item( id, "weapon_awp" );                 cs_set_user_bpammo( id, CSW_AWP, 80 );                 client_print( id, print_chat, "You have bought a AWP!" );                 cs_set_user_money( id, iMoney - gShopPrices[ ITEM_AWP ], 1 );                 bItemBought[ id ][ ITEM_AWP ] = 1;             }                         case ITEM_DEAGLE:             {                 if( iMoney < gShopPrices[ ITEM_DEAGLE ] )                 {                     client_print( id, print_chat, "You don't have enoug money! You need %d$", gShopPrices[ ITEM_DEAGLE ] );                                         return PLUGIN_HANDLED;                 }                                     if( bItemBought[ id ][ ITEM_DEAGLE ] )                 {                     client_print( id, print_chat, "You already bought this item!" );                                         return PLUGIN_HANDLED;                 }                 give_item( id, "weapon_deagle" );                 cs_set_user_bpammo( id, CSW_DEAGLE, 60 );                 client_print( id, print_chat, "You have bought a Deagle!" );                 cs_set_user_money( id, iMoney - gShopPrices[ ITEM_DEAGLE ], 1 );                 bItemBought[ id ][ ITEM_DEAGLE ] = 1;             }                         case ITEM_HEGRENADE:             {                 if( iMoney < gShopPrices[ ITEM_HEGRENADE ] )                 {                     client_print( id, print_chat, "You don't have enoug money! You need %d$", gShopPrices[ ITEM_HEGRENADE ] );                                         return PLUGIN_HANDLED;                 }                                     if( bItemBought[ id ][ ITEM_HEGRENADE ] )                 {                     client_print( id, print_chat, "You already bought this item!" );                                         return PLUGIN_HANDLED;                 }                 give_item( id, "weapon_hegrenade" );                 client_print( id, print_chat, "You have bought a HE Grenade!" );                 cs_set_user_money( id, iMoney - gShopPrices[ ITEM_HEGRENADE ], 1 );                 bItemBought[ id ][ ITEM_HEGRENADE ] = 1;             }                         case ITEM_FLASH:             {                 if( iMoney < gShopPrices[ ITEM_FLASH ] )                 {                     client_print( id, print_chat, "You don't have enoug money! You need %d$", gShopPrices[ ITEM_FLASH ] );                                         return PLUGIN_HANDLED;                 }                                     if( bItemBought[ id ][ ITEM_FLASH ] )                 {                     client_print( id, print_chat, "You already bought this item!" );                                         return PLUGIN_HANDLED;                 }                 give_item( id, "weapon_flashbang" );                 client_print( id, print_chat, "You have bought a Flash!" );                 cs_set_user_money( id, iMoney - gShopPrices[ ITEM_FLASH ], 1 );                 bItemBought[ id ][ ITEM_FLASH ] = 1;             }                         case ITEM_SMOKE:             {                 if( iMoney < gShopPrices[ ITEM_SMOKE ] )                 {                     client_print( id, print_chat, "You don't have enoug money! You need %d$", gShopPrices[ ITEM_SMOKE ] );                                         return PLUGIN_HANDLED;                 }                                     if( bItemBought[ id ][ ITEM_SMOKE ] )                 {                     client_print( id, print_chat, "You already bought this item!" );                                         return PLUGIN_HANDLED;                 }                 give_item( id, "weapon_smokegrenade" );                 client_print( id, print_chat, "You have bought a Smoke!" );                 cs_set_user_money( id, iMoney - gShopPrices[ ITEM_SMOKE ], 1 );                 bItemBought[ id ][ ITEM_SMOKE ] = 1;             }         }     }         menu_destroy( menu );         return PLUGIN_HANDLED; }
__________________

Last edited by tuty; 03-30-2012 at 09:00.
tuty is offline
Send a message via ICQ to tuty Send a message via AIM to tuty
poliisi299
Senior Member
Join Date: May 2011
Old 03-30-2012 , 14:28   Re: Surf Shop please.
Reply With Quote #3

Thank you so much i really like you )))))
Next time i send you a message if i need you help thank bro ))))

Last edited by poliisi299; 03-30-2012 at 15:48.
poliisi299 is offline
tuty
Veteran Member
Join Date: Jul 2008
Location: UK
Old 03-30-2012 , 15:39   Re: Surf Shop please.
Reply With Quote #4

1. edit your damn thread looks like crap
2. dont write with bold tags
3. youre welcome
__________________
tuty is offline
Send a message via ICQ to tuty Send a message via AIM to tuty
poliisi299
Senior Member
Join Date: May 2011
Old 03-30-2012 , 17:25   Re: Surf Shop please.
Reply With Quote #5

Quote:
Originally Posted by tuty View Post
1. edit your damn thread looks like crap
2. dont write with bold tags
3. youre welcome
But can you edit it ??

in server i can buy max 1 nade, and when i drop the nade i cant buy other so if you can edit it sry my eng
poliisi299 is offline
Reply


Thread Tools
Display Modes

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 10:59.


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