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

CS Weapons MiniShop


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Admin Commands       
xDoctor
Member
Join Date: Jul 2013
Old 06-11-2014 , 14:57   CS Weapons MiniShop
Reply With Quote #1

The plugin verison is 1.0 it will be updated soon.

Includes:
PHP Code:
amxmodx
amxmisc
cstrike
fakemeta_util 
details about the plugin :

in this plugin you can purchase weapons. there are weapons that for vip thats free. ( Only vip ) !

enjoy guys.
Attached Files
File Type: sma Get Plugin or Get Source (CSShop2.sma - 688 views - 3.1 KB)

Last edited by xDoctor; 06-13-2014 at 00:31.
xDoctor is offline
Strick3n
Member
Join Date: Apr 2013
Old 06-11-2014 , 15:21   Re: CS Weapons MiniShop
Reply With Quote #2

Before you posting a new plugin, make sure it well coded.
Strick3n is offline
Decak
Senior Member
Join Date: Sep 2012
Old 06-11-2014 , 15:34   Re: CS Weapons MiniShop
Reply With Quote #3

This is useless plugin, there are a milion plugins like this.In classic shop ak47 is 2500$, in your ak is 5000$ o.O if you put some special effect, like a golden ak47, it would be okay, but this is useless...
Decak is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 06-11-2014 , 17:20   Re: CS Weapons MiniShop
Reply With Quote #4

Attach the plugin to the thread.

Don't use fakemeta_util.

How do you define VIP?
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
EthicalHacker007
Veteran Member
Join Date: May 2014
Old 06-12-2014 , 01:58   Re: CS Weapons MiniShop
Reply With Quote #5

He has used "ADMIN_KICK" for VIP, but I think you should use "ADMIN_LEVEL_H". Also a command/cvar to set VIP flag would be cool. Update your description too.
__________________
EthicalHacker007 is offline
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 06-12-2014 , 02:20   Re: CS Weapons MiniShop
Reply With Quote #6

Quote:
Originally Posted by EthicalHacker007 View Post
He has used "ADMIN_KICK" for VIP, but I think you should use "ADMIN_LEVEL_H".
It is completely irrelevant which flag you use.
__________________
Kia is offline
EthicalHacker007
Veteran Member
Join Date: May 2014
Old 06-12-2014 , 02:25   Re: CS Weapons MiniShop
Reply With Quote #7

I don't use any flags! I don't have a server. Most of the VIP plugins use "t" as VIP flag so I suggested him.
__________________
EthicalHacker007 is offline
xDoctor
Member
Join Date: Jul 2013
Old 06-12-2014 , 04:36   Re: CS Weapons MiniShop
Reply With Quote #8

Quote:
Originally Posted by Decak View Post
This is useless plugin, there are a milion plugins like this.In classic shop ak47 is 2500$, in your ak is 5000$ o.O if you put some special effect, like a golden ak47, it would be okay, but this is useless...
the ak47 is 50000$ because i built this for some one and that what he asked.

and i kno'w that mp5navy 1500$ and that awp its 4700$ or 4800$

Last edited by xDoctor; 06-12-2014 at 04:43.
xDoctor is offline
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 06-12-2014 , 04:54   Re: CS Weapons MiniShop
Reply With Quote #9

Made some suggestions in the code, you might want to check it out.
PHP Code:
/* Plugin generated by AMXX-Studio */

#include < amxmodx >
#include < amxmisc >
#include < cstrike >
#include < fakemeta_util >

// Indented Code

enum _iSettings
{
    
iWep32 ],
    
iWeapon32 ],
    
iPrice,
    
iAccess
}

new const 
szSettings [ ] [ iSettings ] = 
{
    { 
"AK47""weapon_ak47"5000ADMIN_ALL },
    { 
"Mp5Navy""weapon_mp5navy"1250ADMIN_ALL },
    { 
"Awp""weapon_awp"7500ADMIN_ALL },
    { 
"M3""weapon_m3"0ADMIN_KICK }
}

public 
plugin_init()
{
    
register_plugin"CS Shop""1.0""Xdoctor" );
    
    
register_clcmd"say /shop""ClcmdShop" );
}

public 
ClcmdShopclient )
{
    if(!
is_user_aliveclient ) ) // Removed is_user_connected check, since is_user_alive does that already
        
return ColorChatclient"^4%s^1 You need to be^4 alive ^1to use this shop^3!"GetUserNameclient ) );
    
    new 
szText128 ];
    
formatexszTextcharsmaxszText ), "\d[ \yAMXX\d ] \yCS Weapons Menu \d( \yBy Xdoctor\d )" )
    
    new 
Menu menu_createszText"CmdShopHandler" );
    for( new 
0sizeofszSettings ); i++ )
    {
        
formatexszTextcharsmaxszText ), "\rWeapon\w: \y%s \d[ \y%d Money \d ] %s"szSettings][ iAccess ] == ADMIN_KICK "Only Vip" "" );
        
menu_additemMenuszText_get_user_flags(client) & szSettings[i][iAccess] ? 1<<31 ); // Blocking the Menu Item already here when he has not the required flag
    
}
    
    
menu_displayclientMenu);
    return 
PLUGIN_HANDLED// Replaced 1 with PLUGIN_HANDLED, use such consts when we have them
}

public 
CmdShopHandlerclientMenuItem )
{
    if( 
Item == MENU_EXIT )
    {
        
menu_destroyMenu );
        
        return 
1;
    }
    
    
// Removed Flag Check
    
    
new iMoney cs_get_user_money(client// Saving the money here so we save some calls
    
    
if( iMoney szSettingsItem ][ iPrice ] )
        return 
ColorChatclient"^4%s^1 Your money ^4amount^1 isn't^4 enough^1 to purchase^4 %s^3!"GetUserNameclient ), szSettingsItem ][ iWep ] );
    
    else if( 
iMoney >= szSettingsItem ][ iPrice ] )
    {
        
cs_set_user_moneyclientiMoney szSettingsItem ][ iPrice ] );
        
        
fm_give_itemclientszSettingsItem ][ iWeapon ] );
        
        
ColorChat0"^4%s^1 just bought ^3the^1 weapon ^4%s^3!"GetUserNameclient ), szSettingsItem ][ iWep ] );
        
    }
    
    return 
PLUGIN_HANDLED// Replaced 1 with PLUGIN_HANDLED, use such consts when we have them
}

stock GetUserName( const Index )
{
    new 
szName32 ];
    
    
get_user_nameIndexszNamecharsmaxszName ) );
    
    return 
szName;
}

stock ColorChat(const client, const string[], {FloatSqlResul,_}:...)
{
    new 
msg191 ], players32 ], count 1;
    
    static 
lenlen formatexmsgcharsmax(msg), "^3[^1 AMXX ^3]^1 " );
    
vformatmsglen ], charsmaxmsg ) - lenstring);
    
    if( 
client )  players] = client;
    else    
get_playersplayers,count"ch" );
    
    for( new 
0counti++ )
    {
        if( 
is_user_connectedplayers] ) )
        {
            
message_beginMSG_ONE_UNRELIABLEget_user_msgid"SayText" ),_players] );
            
write_byteplayers] );
            
write_stringmsg );
            
message_end();
        }
    }
    
    return 
1;


__________________
Kia is offline
xDoctor
Member
Join Date: Jul 2013
Old 06-12-2014 , 05:51   Re: CS Weapons MiniShop
Reply With Quote #10

Quote:
Originally Posted by Kia View Post
Made some suggestions in the code, you might want to check it out.
PHP Code:
/* Plugin generated by AMXX-Studio */

#include < amxmodx >
#include < amxmisc >
#include < cstrike >
#include < fakemeta_util >

// Indented Code

enum _iSettings
{
    
iWep32 ],
    
iWeapon32 ],
    
iPrice,
    
iAccess
}

new const 
szSettings [ ] [ iSettings ] = 
{
    { 
"AK47""weapon_ak47"5000ADMIN_ALL },
    { 
"Mp5Navy""weapon_mp5navy"1250ADMIN_ALL },
    { 
"Awp""weapon_awp"7500ADMIN_ALL },
    { 
"M3""weapon_m3"0ADMIN_KICK }
}

public 
plugin_init()
{
    
register_plugin"CS Shop""1.0""Xdoctor" );
    
    
register_clcmd"say /shop""ClcmdShop" );
}

public 
ClcmdShopclient )
{
    if(!
is_user_aliveclient ) ) // Removed is_user_connected check, since is_user_alive does that already
        
return ColorChatclient"^4%s^1 You need to be^4 alive ^1to use this shop^3!"GetUserNameclient ) );
    
    new 
szText128 ];
    
formatexszTextcharsmaxszText ), "\d[ \yAMXX\d ] \yCS Weapons Menu \d( \yBy Xdoctor\d )" )
    
    new 
Menu menu_createszText"CmdShopHandler" );
    for( new 
0sizeofszSettings ); i++ )
    {
        
formatexszTextcharsmaxszText ), "\rWeapon\w: \y%s \d[ \y%d Money \d ] %s"szSettings][ iAccess ] == ADMIN_KICK "Only Vip" "" );
        
menu_additemMenuszText_get_user_flags(client) & szSettings[i][iAccess] ? 1<<31 ); // Blocking the Menu Item already here when he has not the required flag
    
}
    
    
menu_displayclientMenu);
    return 
PLUGIN_HANDLED// Replaced 1 with PLUGIN_HANDLED, use such consts when we have them
}

public 
CmdShopHandlerclientMenuItem )
{
    if( 
Item == MENU_EXIT )
    {
        
menu_destroyMenu );
        
        return 
1;
    }
    
    
// Removed Flag Check
    
    
new iMoney cs_get_user_money(client// Saving the money here so we save some calls
    
    
if( iMoney szSettingsItem ][ iPrice ] )
        return 
ColorChatclient"^4%s^1 Your money ^4amount^1 isn't^4 enough^1 to purchase^4 %s^3!"GetUserNameclient ), szSettingsItem ][ iWep ] );
    
    else if( 
iMoney >= szSettingsItem ][ iPrice ] )
    {
        
cs_set_user_moneyclientiMoney szSettingsItem ][ iPrice ] );
        
        
fm_give_itemclientszSettingsItem ][ iWeapon ] );
        
        
ColorChat0"^4%s^1 just bought ^3the^1 weapon ^4%s^3!"GetUserNameclient ), szSettingsItem ][ iWep ] );
        
    }
    
    return 
PLUGIN_HANDLED// Replaced 1 with PLUGIN_HANDLED, use such consts when we have them
}

stock GetUserName( const Index )
{
    new 
szName32 ];
    
    
get_user_nameIndexszNamecharsmaxszName ) );
    
    return 
szName;
}

stock ColorChat(const client, const string[], {FloatSqlResul,_}:...)
{
    new 
msg191 ], players32 ], count 1;
    
    static 
lenlen formatexmsgcharsmax(msg), "^3[^1 AMXX ^3]^1 " );
    
vformatmsglen ], charsmaxmsg ) - lenstring);
    
    if( 
client )  players] = client;
    else    
get_playersplayers,count"ch" );
    
    for( new 
0counti++ )
    {
        if( 
is_user_connectedplayers] ) )
        {
            
message_beginMSG_ONE_UNRELIABLEget_user_msgid"SayText" ),_players] );
            
write_byteplayers] );
            
write_stringmsg );
            
message_end();
        }
    }
    
    return 
1;


thanks for the help

but the Flag check is nevermind even if you ADMIN_CHAT

its just to make that there wont be any error.

i can make numbers.

1 = everyone

2 = vip

its not matter.

+ why deleting the flag check ?
xDoctor 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 11:11.


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