Raised This Month: $ Target: $400
 0% 

Help me please


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Leonardo451
Junior Member
Join Date: Jan 2014
Location: Portugal
Old 08-09-2015 , 00:33   Help me please
Reply With Quote #1

Hi guys , can help me with this plugin , can not compile the plugin error of me , someone who understands this to help me

PHP Code:
#include < amxmodx >
#include < cstrike >
#include < fun >

#define VERSION "0.1"

public plugin_init( )
{
    
register_plugin"Shop Menu 2"VERSION"azipei" )

    
register_clcmd"say /shop","surfmenu" );
    

public 
surfmenuid )
{
    new 
menu menu_create"\r[ PFA ] \ySurf Shop.""menu_handler" );
    
    
menu_additemmenu"\wAK47 \y( \r$5000 \y)""1");
    
menu_additemmenu"\wM4A1 \y( \r$5000 \y)""2");
    
menu_additemmenu"\wDEAGLE \y( \r$3000 \y)""3");
    
menu_additemmenu"\wM3 \y( \r$3500 \y)""4");
    
menu_additemmenu"\wAWP \y( \r$7500 \y)""5");
    
menu_additemmenu"\wHE GRENADE \y( \r$1500 \y)""6");

    
    
menu_setpropmenuMPROP_EXITMEXIT_ALL );
    
menu_displayidmenu);
     
}
 
public 
menu_handleridmenuitem )
 {
    
    if( 
item == MENU_EXIT )
    {
        
menu_destroymenu );
        return 
PLUGIN_HANDLED;
    }

    new 
data], szName64 ];
    new 
accesscallback;
    
menu_item_getinfomenuitemaccessdata,charsmaxdata ), szName,charsmaxszName ), callback );

    new 
key str_to_numdata );
    
    new 
money cs_get_user_moneyid )
    
    new 
ak47 5000
    
new m4a1 5000
    
new deagle 3000
    
new awp 7500
    
new he 1500
   
    
switch( key )
    {
        case 
1:
        {
            if( 
money ak47 )
            {
                
ChatColor(id"^4[ ^3pFa. INFO ^4] ^1- Nao tens Dinheiro Suficiente para comprar AK47." )
            }
            else
            {
                
cs_set_user_moneyidmoney ak47 )                 
                
give_itemid,"weapon_ak47" )
                
cs_set_user_bpammoidCSW_AK4790 )
            }   
        }
        case 
2:
        {
            if( 
money m4a1 )
            {
                
ChatColor(id"^4[ ^3pFa. INFO ^4] ^1- Nao tens Dinheiro Suficiente para comprar M4A1." )
            }
            else
            {
                
cs_set_user_moneyidmoney m4a1 )  
                
give_itemid,"weapon_m4a1" )
                
cs_set_user_bpammoidCSW_M4A190 )        
            }
        }
        case 
3
        { 
            if( 
money deagle )
            {
                
ChatColor(id"^4[ ^3pFa. INFO ^4] ^1- Nao tens Dinheiro Suficiente para comprar Deagle." )
            }
            else
            {
                
cs_set_user_moneyidmoney deagle )  
                
give_itemid,"weapon_deagle" )
                
cs_set_user_bpammoidCSW_DEAGLE35 )
            }
        }
        case 
4
        { 
            if( 
money m3 )
            {
                
ChatColor(id"^4[ ^3pFa. INFO ^4] ^1- Nao tens Dinheiro Suficiente para comprar M3." )
            }
            else
            {
                
cs_set_user_moneyidmoney m3 )  
                
give_itemid,"weapon_m3" )
                
cs_set_user_bpammoidCSW_M332 )
            }
        }
    case 
5
        {
            if( 
money awp )
            {
                
ChatColor(id"^4[ ^3pFa. INFO ^4] ^1- Nao tens Dinheiro Suficiente para comprar AWP." )
            }
            else
            {
                
cs_set_user_moneyidmoney awp )  
                
give_itemid,"weapon_awp" )
                
cs_set_user_bpammoidCSW_AWP30 )
            }
        }
        case 
6
        {
            if( 
money he )
            {
                
ChatColor(id"^4[ ^3pFa. INFO ^4] ^1- Nao tens Dinheiro Suficiente para comprar HE GRENADE." )
            }
            else
            {
                
cs_set_user_moneyidmoney he )  
                
give_itemid,"weapon_hegrenade" )    
            }
        }
    }
    
menu_destroymenu );
    return 
PLUGIN_HANDLED;
 }
public 
client_authorized(id)
{
 
set_task(30.0"PrintText" ,id)
}
public 
PrintText(id)
{
 
ChatColor(id"^4[ Portugal Fuzileiros ] ^1- Escreve ^3/shop ^1para comprares armas.")
}
stock ChatColor(const id, const input[], any:...)
{
        new 
count 1players[32]
        static 
msg[191]
        
vformat(msg190input3)

        
replace_all(msg190"!g""^4"// verde
        
replace_all(msg190"!y""^1"// Default
        
replace_all(msg190"!team""^3"// Team
        
replace_all(msg190"!team2""^0"// Team2

        
if (idplayers[0] = id; else get_players(playerscount"ch")
        {
                for (new 
0counti++)
                {
                        if (
is_user_connected(players[i]))
                        {
                                
message_begin(MSG_ONE_UNRELIABLEget_user_msgid("SayText"), _players[i])
                                
write_byte(players[i]);
                                
write_string(msg);
                                
message_end();
                        }
                }
        }


Last edited by Leonardo451; 08-09-2015 at 00:37.
Leonardo451 is offline
indraraj striker
Veteran Member
Join Date: Mar 2014
Location: Under the water
Old 08-09-2015 , 04:46   Re: Help me please
Reply With Quote #2

Here you go :
Attached Files
File Type: sma Get Plugin or Get Source (new.sma - 538 views - 4.9 KB)
indraraj striker 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 01:26.


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