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

I have a problem error 017: undefined symbol "thunderbolt"


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Gl0ri0s
New Member
Join Date: Nov 2019
Old 01-21-2020 , 13:25   I have a problem error 017: undefined symbol "thunderbolt"
Reply With Quote #1

Hello i hava a problem whit a plugin tipe /special (vmenu) whit cso gun
I try to modific weapons with other weapons (M4A1 Magnum With Thanatos9 - AK47 Magnum With ThunderBolt - Drill with GoldDeagle

PROBLEME : bb_special.sma(34) : error 017: undefined symbol "thunderbolt"
bb_special.sma(54) : error 017: undefined symbol "BuyThunderbolt"
bb_special.sma(54) : error 029: invalid expression, assumed zero
bb_special.sma(64) : error 017: undefined symbol "Buythunderbolt"
bb_special.sma(67) : error 017: undefined symbol "Buythunderbolt"
bb_special.sma(67) : warning 215: expression has no effect
bb_special.sma(67) : warning 215: expression has no effect
bb_special.sma(67) : error 001: expected token: ";", but found ")"
bb_special.sma(67) : error 029: invalid expression, assumed zero
bb_special.sma(67) : fatal error 107: too many error messages on one line

LINE CODE :
PHP Code:
#include <amxmodx>
#include <amxmisc>

#pragma tabsize 0

#define PLUGIN "Special Menu"
#define VERSION "1.0"
#define AUTHOR "eVo"


new Director [256], boolParolaSetata [33] = falseCumparat [33], Data [200], Secunde [33] = 0BuySlot [33], BuyThunderBolt [33], Buythanatos9 [33], BuyGoldDeagle [33], SlotThunderboltthanatos9GoldDeagleTimp;
new 
Tag[] = "!g[BB.InDungi.Ro] ";

native fcs_get_user_credits id );
native fcs_set_user_credits idcredits );

native give_thunderbolt(id)
native give_zp_extra_thanatos9(id)
native give_GoldDeagle(id)

native bb_is_build_phase()

public 
plugin_init() 
{

    
register_plugin(PLUGINVERSIONAUTHOR)   
    
    
register_clcmd "say /special""SpecialMenu" );
    
register_clcmd "say_team /special""SpecialMenu")
    
    
register_clcmd "Introdu_Parola""cmdPassword" );
    
    
Slot register_cvar "cvar_pret_slot""25000" );
    
Thunderbolt register_cvar "cvar_pret_thunderbolt""50000" );
    
thanatos9 register_cvar "cvar_pret_thanatos9""50000" );
    
GoldDeagle register_cvar "cvar_pret_GoldDeagle""50000" );
    
Timp register_cvar "cvar_timp_parola""15" );
        
}
public 
client_putinserver id )
{
    
Secunde [id] = 0;
    
    
ParolaSetata [id] = false;
}

public 
client_disconnect id ParolaSetata [id] = false;
public 
SpecialMenu(id)
{
    new 
Menu menu_create "[BB.InDungi.Ro] Special Menu""SpecialGiver" );
    new 
Credite fcs_get_user_credits id );
    
    
formatex BuySlotcharsmax BuySlot ), "Cumpara SLOT \r[%d Euro]"get_pcvar_num Slot ) )
    
formatex BuyThunderBoltcharsmax BuyThunderbolt ), "ThunderBolt \rCSO \r[%d Euro]"get_pcvar_num ThunderBolt ) )
    
formatex Buythanatos9charsmax Buythanatos9 ), "thanatos9 \rCSO \r[%d Euro]"get_pcvar_num thanatos9 ) )
    
formatex BuyGoldDeaglecharsmax BuyGoldDeagle ), "Gold \rDeagle\r[%d Euro]"get_pcvar_num GoldDeagle ) )
    
    if ( 
Credite get_pcvar_num Slot ) || get_user_flags id ) & read_flags "b" ) )
        
menu_additem Menu"\dCumpara SLOT \r[Indisponibil]""1");
    else
        
menu_additem MenuBuySlot"1");
        
        
    if ( 
Credite get_pcvar_num Buythunderbolt ) || get_user_team(id) == || bb_is_build_phase() )
        
menu_additem Menu"\d \rthunderbolt \rCSO""2");
    else
        
menu_additem MenuBuythunderbolt"2");
        
        
    if ( 
Credite get_pcvar_num thanatos9) || get_user_team(id) == || bb_is_build_phase() )
        
menu_additem Menu"\dthanatos9 \rcso \rknife""3");
    else
        
menu_additem MenuBuythanatos9"3");

    if ( 
Credite get_pcvar_num Drill ) || get_user_team(id) == || bb_is_build_phase() )
        
menu_additem Menu"\dGold \rDeagle\", "4", 0 );
    else
        menu_additem ( Menu, BuyGoldDeagle, "
4", 0 );

        
    menu_setprop ( Menu, MPROP_EXIT, MEXIT_ALL );
    menu_display ( id, Menu, 0 );
    return PLUGIN_HANDLED;

}
public SpecialGiver ( id, Menu, item )
{
    if ( !is_user_connected ( id ) ) return PLUGIN_HANDLED;
    
    if ( item == MENU_EXIT )
    {
        menu_destroy ( Menu );
        return PLUGIN_HANDLED;
    }
    new iData [6], iName [64];
    new access, callback;
    
    menu_item_getinfo ( Menu, item, access, iData,5, iName, 63, callback );
    
    new Key = str_to_num ( iData );
    
    new Credite = fcs_get_user_credits ( id );
    
    switch( Key )
    {
        case 1:
        {
        if ( get_user_flags ( id ) & read_flags ( "b" ) )
            {
                ChatColor ( id, "
%s!team Ai deja !gSLOT!team!", Tag );
                
                SpecialMenu ( id );
                
                return PLUGIN_HANDLED
            }
            
            if ( Credite < get_pcvar_num ( Slot ) )
            {
                ChatColor ( id, "
%s!team Nu ai destui !gEuro!team pentru a cumpara acest item!", Tag );
                
                SpecialMenu ( id );
                
                return PLUGIN_HANDLED;
            }
            else
            {
                client_cmd ( id, "
messagemode Introdu_Parola" );
                
                Secunde [id] = get_pcvar_num ( Timp );
                
                Cumparat [id] = 1;
                
                Cautare ( id );
                
                ParolaSetata [id] = true;
                
            }
            return PLUGIN_HANDLED;
        }
        case 2:
        {
            if ( Credite < get_pcvar_num ( ThunderBolt ) )
            {
                ChatColor ( id, "
%s!team Nu ai destui !gEuro!team pentru a cumpara acest item!", Tag );
                
                SpecialMenu ( id );
                
                return PLUGIN_HANDLED;
            }
            if( get_user_team(id) == 1 )
            {
                ChatColor ( id, "
%s!team Doar pentru !gBuilders!team au acces la acest item!", Tag );
                
                SpecialMenu ( id );
                
                return PLUGIN_HANDLED;
            }
            if ( bb_is_build_phase() )
            {
                ChatColor ( id, "
%s!team Puteti cumpara acest item doar in !gTimpul de Pregatire!team sau dupa acesta!", Tag );
                
                SpecialMenu ( id );
                
                return PLUGIN_HANDLED;
            }
            else
            {
            give_thunderbolt(id);
            fcs_set_user_credits ( id, fcs_get_user_credits ( id ) - get_pcvar_num ( ThunderBolt )) 
            ChatColor ( id, "
%s!team SuccesAi cumparat !gThunderBolt Sniper!team!", Tag );
            return 1;
            }
        
        }
        case 3:
        {
            if ( Credite < get_pcvar_num ( thanatos9 ) )
            {
                ChatColor ( id, "
%s!team Nu ai destui !gEuro!team pentru a cumpara acest item!", Tag );

                SpecialMenu ( id );
                
                return PLUGIN_HANDLED;
            }
            if( get_user_team(id) == 1 )
            {
                ChatColor ( id, "
%s!team Doar pentru !gBuilders!team au acces la acest item!", Tag );
                
                SpecialMenu ( id );
                
                return PLUGIN_HANDLED;
            }
            if ( bb_is_build_phase() )
            {
                ChatColor ( id, "
%s!team Puteti cumpara acest item doar in !gTimpul de Pregatire!team sau dupa acesta!", Tag );
                
                SpecialMenu ( id );
                
                return PLUGIN_HANDLED;
            }
            else
            {
            give_zp_extra_thanatos9(id);
            
            fcs_set_user_credits ( id, fcs_get_user_credits ( id ) - get_pcvar_num ( Ak )) 
            
            ChatColor ( id, "
%s!team SuccesAi cumparat !gM4a1 Magnum!team!", Tag );
            
            return 1;
            }
        }
        case 4:
        {
            if ( Credite < get_pcvar_num ( Ak ) )
            {
                ChatColor ( id, "
%s!team Nu ai destui !gEuro!team pentru a cumpara acest item!", Tag );
                
                SpecialMenu ( id );
                
                return PLUGIN_HANDLED;
            }
            if( get_user_team(id) == 1 )
            {
                ChatColor ( id, "
%s!team Doar pentru !gBuilders!team au acces la acest item!", Tag );
                
                SpecialMenu ( id );
                
                return PLUGIN_HANDLED;
            }
            if ( bb_is_build_phase() )
            {
                ChatColor ( id, "
%s!team Puteti cumpara acest item doar in !gTimpul de Pregatire!team sau dupa acesta!", Tag );
                
                SpecialMenu ( id );
                
                return PLUGIN_HANDLED;
            }
            else
            {
            give_GoldDeagle(id);
            fcs_set_user_credits ( id, fcs_get_user_credits ( id ) - get_pcvar_num ( GoldDeagle )) 
            ChatColor ( id, "
%s!team SuccesAi cumparat !gGoldDeagle wow!team!", Tag );
            return 1;
            }
        
        }
    
    }
    return PLUGIN_HANDLED;
}
public Cautare ( id )
{
    if ( !is_user_connected ( id ) )
        Secunde [id] = 0;
    if ( Secunde [id] > 1 )
    {
        Secunde [id] --;
        set_hudmessage ( 0, 255, 0, 0.05, 0.25, 0, 6.0, 1.0 )
        show_hudmessage ( id, "
Ai la dispozite %i secunde sa introduci parola !", Secunde [id] );

        set_task ( 1.0, "
Cautare", id );
    }
    else if ( Secunde [id] <= 1 )
    {
        ParolaSetata [id] = false;
        ChatColor ( id, "
%s!team A expirat timpulInregistrarea a esuatNu ti-au fost retrasi Euro!", Tag );
        Secunde [id] = 0;
    }    
}
public cmdPassword ( id )
{
    new Password [32]; read_argv ( 1, Password, charsmax ( Password ) );
    
    static Name [32]; get_user_name ( id, Name, charsmax ( Name ) );
    
    get_configsdir ( Director, charsmax ( Director ) );
    
    formatex ( Director, charsmax ( Director ), "
%s/users.ini", Director );
    
    if ( Cumparat [id] == 1 )
    {
        formatex ( Data, charsmax ( Data ), "
^"%s^" ^"%s^" ^"b^" ^"a^" Acces Cumparat Din Special Menu", Name, Password );
    }

    
    if ( ParolaSetata [id] )
    {
        if ( Password [0] )
        {
            ParolaSetata [id] = false;
            
            remove_task ( id );
            
            CautareUser ( id );
            
            write_file ( Director, Data );
            
            set_user_info ( id, "
_eVo", Password );
            
            set_task ( 2.0, "
ReloadAdmins" );
            
            if ( Cumparat [id] == 1 )
            {
                fcs_set_user_credits ( id, fcs_get_user_credits ( id ) - get_pcvar_num ( Slot )) 
                ChatColor ( id, "
%s!team Ai cumparat !gSLOT!team cu succesNume:!g%s!teamParola:!g%s!team ", Tag, Name, Password );
            }
        }
        else
        {
            ChatColor ( id, "
%s!team Parola introdusa este invalidaTe rugam incearca din nou!", Tag );
            client_cmd ( id, "
messagemode register" );
            
            return PLUGIN_HANDLED;
        }
    }
    else
    {
        ChatColor ( id, "
%s!team A expirat timpul dejaTe rugam sa incerci din nou!", Tag );
        
        return PLUGIN_HANDLED;
    }
    return PLUGIN_HANDLED;
}
public ReloadAdmins (  ) server_cmd ( "
amx_reloadadmins" );
public CautareUser ( id )
{
    new FileName [64]; get_configsdir ( FileName, charsmax ( FileName ) );
    
    add ( FileName, charsmax ( FileName ), "
/users.ini" );
    
    new File, Line;
    
    new Name [32]; get_user_name ( id, Name, charsmax ( Name ) );
    
    ReadFile:
    
    File = fopen ( FileName , "
rt" );
    
    Line = -1;
    
    if ( File )
    {
        new Format [256], i, Key [32];
        while ( !feof ( File ) )
        {
            Line ++;
            
            fgets ( File, Format, charsmax ( Format ) );
            
            trim ( Format );
            
            i = Format [0];
            
            if ( i && i != '#' && i != ';' && !( i == '/' && Format [1] == '/' ) )
            {
                parse ( Format, Key, charsmax ( Key ) );
                
                if ( equal ( Key, Name ) )
                {
                    fclose ( File );
                    
                    File = 0;
                    
                    write_file ( FileName, "", Line );
                    
                    goto ReadFile;
                }
            }
        }
        
        fclose ( File );
        
        File = 0;
    }
}
//********************STOCK-URI******************** 
stock ChatColor(const id, const input[], any:...) 

new count = 1, players[32] 
static msg[191] 
vformat(msg, 190, input, 3) 

replace_all(msg, 190, "
!g", "^4") 
replace_all(msg, 190, "
!y", "^1") 
replace_all(msg, 190, "
!team", "^3") 

if (id) players[0] = id; else get_players(players, count, "
ch") 

for (new i = 0; i < count; i++) 

if (is_user_connected(players[i])) 

message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("
SayText"), _, players[i]); 
write_byte(players[i]); 
write_string(msg); 
message_end(); 





Last edited by Gl0ri0s; 01-21-2020 at 14:22.
Gl0ri0s is offline
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 01-21-2020 , 14:08   Re: I have a problem error 017: undefined symbol "thunderbolt"
Reply With Quote #2

thunderbolt = register_cvar ( "cvar_pret_thunderbolt", "50000" );

should be

Thunderbolt = register_cvar ( "cvar_pret_thunderbolt", "50000" );

Ps. Use code or PHP tags to post code in fórum at next time.
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
Gl0ri0s
New Member
Join Date: Nov 2019
Old 01-21-2020 , 14:19   Re: I have a problem error 017: undefined symbol "thunderbolt"
Reply With Quote #3

It`s not work

PHP Code:
b6a92a3cb604c2208650bbbb372760c8.sma(54) : error 072"sizeof" operator is invalid on "function" symbols
b6a92a3cb604c2208650bbbb372760c8
.sma(64) : error 017undefined symbol "BuyThunderbolt"
b6a92a3cb604c2208650bbbb372760c8.sma(67) : error 017undefined symbol "BuyThunderbolt"
b6a92a3cb604c2208650bbbb372760c8.sma(67) : warning 215expression has no effect
b6a92a3cb604c2208650bbbb372760c8
.sma(67) : warning 215expression has no effect
b6a92a3cb604c2208650bbbb372760c8
.sma(67) : error 001expected token";"but found ")"
b6a92a3cb604c2208650bbbb372760c8.sma(67) : error 029invalid expressionassumed zero
b6a92a3cb604c2208650bbbb372760c8
.sma(67) : fatal error 107too many error messages on one line 

Last edited by Gl0ri0s; 01-21-2020 at 14:21.
Gl0ri0s is offline
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 01-21-2020 , 14:54   Re: I have a problem error 017: undefined symbol "thunderbolt"
Reply With Quote #4

PHP Code:
#include <amxmodx>
#include <amxmisc>

#pragma tabsize 0

#define PLUGIN "Special Menu"
#define VERSION "1.0"
#define AUTHOR "eVo"


new Director[256], boolParolaSetata[33] = falseCumparat[33], Data[200], Secunde[33] = 0BuySlot[33], BuythunderBolt[33], Buythanatos9[33], BuyGoldDeagle[33], SlotThunderBoltthanatos9GoldDeagleTimp;
new 
Tag[] = "!g[BB.InDungi.Ro] ";

native fcs_get_user_credits id );
native fcs_set_user_credits idcredits );

native give_thunderbolt(id)
native give_zp_extra_thanatos9(id)
native give_GoldDeagle(id)

native bb_is_build_phase()

public 
plugin_init() 
{

    
register_plugin(PLUGINVERSIONAUTHOR)   
    
    
register_clcmd "say /special""SpecialMenu" );
    
register_clcmd "say_team /special""SpecialMenu")
    
    
register_clcmd "Introdu_Parola""cmdPassword" );
    
    
Slot register_cvar "cvar_pret_slot""25000" );
    
ThunderBolt register_cvar "cvar_pret_thunderbolt""50000" );
    
thanatos9 register_cvar "cvar_pret_thanatos9""50000" );
    
GoldDeagle register_cvar "cvar_pret_GoldDeagle""50000" );
    
Timp register_cvar "cvar_timp_parola""15" );
        
}
public 
client_putinserver id )
{
    
Secunde [id] = 0;
    
    
ParolaSetata [id] = false;
}

public 
client_disconnect id ParolaSetata [id] = false;
public 
SpecialMenu(id)
{
    new 
Menu menu_create "[BB.InDungi.Ro] Special Menu""SpecialGiver" );
    new 
Credite fcs_get_user_credits id );
    
    
formatex BuySlotcharsmax BuySlot ), "Cumpara SLOT r[%d Euro]"get_pcvar_num Slot ) )
    
formatex BuythunderBoltcharsmax BuythunderBolt ), "ThunderBolt rCSO r[%d Euro]"get_pcvar_num ThunderBolt ) )
    
formatex Buythanatos9charsmax Buythanatos9 ), "thanatos9 rCSO r[%d Euro]"get_pcvar_num thanatos9 ) )
    
formatex BuyGoldDeaglecharsmax BuyGoldDeagle ), "Gold rDeagler[%d Euro]"get_pcvar_num GoldDeagle ) )
    
    if ( 
Credite get_pcvar_num Slot ) || get_user_flags id ) & read_flags "b" ) )
        
menu_additem Menu"dCumpara SLOT r[Indisponibil]""1");
    else
        
menu_additem MenuBuySlot"1");
        
        
    if ( 
Credite get_pcvar_num ThunderBolt ) || get_user_team(id) == || bb_is_build_phase() )
        
menu_additem Menu"d rthunderbolt rCSO""2");
    else
        
menu_additem MenuBuythunderBolt"2");
        
        
    if ( 
Credite get_pcvar_num thanatos9) || get_user_team(id) == || bb_is_build_phase() )
        
menu_additem Menu"dthanatos9 rcso rknife""3");
    else
        
menu_additem MenuBuythanatos9"3");

    if ( 
Credite get_pcvar_num GoldDeagle ) || get_user_team(id) == || bb_is_build_phase() )
        
menu_additem Menu"dGold rDeagle""4");
    else
        
menu_additem MenuBuyGoldDeagle"4");

        
    
menu_setprop MenuMPROP_EXITMEXIT_ALL );
    
menu_display idMenu);
    return 
PLUGIN_HANDLED;

}
public 
SpecialGiver idMenuitem )
{
    if ( !
is_user_connected id ) ) return PLUGIN_HANDLED;
    
    if ( 
item == MENU_EXIT )
    {
        
menu_destroy Menu );
        return 
PLUGIN_HANDLED;
    }
    new 
iData [6], iName [64];
    new 
accesscallback;
    
    
menu_item_getinfo MenuitemaccessiData,5iName63callback );
    
    new 
Key str_to_num iData );
    
    new 
Credite fcs_get_user_credits id );
    
    switch( 
Key )
    {
        case 
1:
        {
        if ( 
get_user_flags id ) & read_flags "b" ) )
            {
                
ChatColor id"%s!team Ai deja !gSLOT!team!"Tag );
                
                
SpecialMenu id );
                
                return 
PLUGIN_HANDLED
            
}
            
            if ( 
Credite get_pcvar_num Slot ) )
            {
                
ChatColor id"%s!team Nu ai destui !gEuro!team pentru a cumpara acest item!"Tag );
                
                
SpecialMenu id );
                
                return 
PLUGIN_HANDLED;
            }
            else
            {
                
client_cmd id"messagemode Introdu_Parola" );
                
                
Secunde [id] = get_pcvar_num Timp );
                
                
Cumparat [id] = 1;
                
                
Cautare id );
                
                
ParolaSetata [id] = true;
                
            }
            return 
PLUGIN_HANDLED;
        }
        case 
2:
        {
            if ( 
Credite get_pcvar_num ThunderBolt ) )
            {
                
ChatColor id"%s!team Nu ai destui !gEuro!team pentru a cumpara acest item!"Tag );
                
                
SpecialMenu id );
                
                return 
PLUGIN_HANDLED;
            }
            if( 
get_user_team(id) == )
            {
                
ChatColor id"%s!team Doar pentru !gBuilders!team au acces la acest item!"Tag );
                
                
SpecialMenu id );
                
                return 
PLUGIN_HANDLED;
            }
            if ( 
bb_is_build_phase() )
            {
                
ChatColor id"%s!team Puteti cumpara acest item doar in !gTimpul de Pregatire!team sau dupa acesta!"Tag );
                
                
SpecialMenu id );
                
                return 
PLUGIN_HANDLED;
            }
            else
            {
            
give_thunderbolt(id);
            
fcs_set_user_credits idfcs_get_user_credits id ) - get_pcvar_num ThunderBolt )) 
            
ChatColor id"%s!team Succes! Ai cumparat !gThunderBolt Sniper!team!"Tag );
            return 
1;
            }
        
        }
        case 
3:
        {
            if ( 
Credite get_pcvar_num thanatos9 ) )
            {
                
ChatColor id"%s!team Nu ai destui !gEuro!team pentru a cumpara acest item!"Tag );

                
SpecialMenu id );
                
                return 
PLUGIN_HANDLED;
            }
            if( 
get_user_team(id) == )
            {
                
ChatColor id"%s!team Doar pentru !gBuilders!team au acces la acest item!"Tag );
                
                
SpecialMenu id );
                
                return 
PLUGIN_HANDLED;
            }
            if ( 
bb_is_build_phase() )
            {
                
ChatColor id"%s!team Puteti cumpara acest item doar in !gTimpul de Pregatire!team sau dupa acesta!"Tag );
                
                
SpecialMenu id );
                
                return 
PLUGIN_HANDLED;
            }
            else
            {
            
give_zp_extra_thanatos9(id);
            
            
fcs_set_user_credits idfcs_get_user_credits id ) - get_pcvar_num ThunderBolt )) 
            
            
ChatColor id"%s!team Succes! Ai cumparat !gM4a1 Magnum!team!"Tag );
            
            return 
1;
            }
        }
        case 
4:
        {
            if ( 
Credite get_pcvar_num ThunderBolt ) )
            {
                
ChatColor id"%s!team Nu ai destui !gEuro!team pentru a cumpara acest item!"Tag );
                
                
SpecialMenu id );
                
                return 
PLUGIN_HANDLED;
            }
            if( 
get_user_team(id) == )
            {
                
ChatColor id"%s!team Doar pentru !gBuilders!team au acces la acest item!"Tag );
                
                
SpecialMenu id );
                
                return 
PLUGIN_HANDLED;
            }
            if ( 
bb_is_build_phase() )
            {
                
ChatColor id"%s!team Puteti cumpara acest item doar in !gTimpul de Pregatire!team sau dupa acesta!"Tag );
                
                
SpecialMenu id );
                
                return 
PLUGIN_HANDLED;
            }
            else
            {
            
give_GoldDeagle(id);
            
fcs_set_user_credits idfcs_get_user_credits id ) - get_pcvar_num GoldDeagle )) 
            
ChatColor id"%s!team Succes! Ai cumparat !gGoldDeagle wow!team!"Tag );
            return 
1;
            }
        
        }
    
    }
    return 
PLUGIN_HANDLED;
}
public 
Cautare id )
{
    if ( !
is_user_connected id ) )
        
Secunde [id] = 0;
    if ( 
Secunde [id] > )
    {
        
Secunde [id] --;
        
set_hudmessage 025500.050.2506.01.0 )
        
show_hudmessage id"Ai la dispozite %i secunde sa introduci parola !"Secunde [id] );

        
set_task 1.0"Cautare"id );
    }
    else if ( 
Secunde [id] <= )
    {
        
ParolaSetata [id] = false;
        
ChatColor id"%s!team A expirat timpul! Inregistrarea a esuat! Nu ti-au fost retrasi Euro!"Tag );
        
Secunde [id] = 0;
    }    
}
public 
cmdPassword id )
{
    new 
Password [32]; read_argv 1Passwordcharsmax Password ) );
    
    static 
Name [32]; get_user_name idNamecharsmax Name ) );
    
    
get_configsdir Directorcharsmax Director ) );
    
    
formatex Directorcharsmax Director ), "%s/users.ini"Director );
    
    if ( 
Cumparat [id] == )
    {
        
formatex Datacharsmax Data ), "^"%s^" ^"%s^" ^"b^" ^"a^" ; Acces Cumparat Din Special Menu"NamePassword );
    }

    
    if ( 
ParolaSetata [id] )
    {
        if ( 
Password [0] )
        {
            
ParolaSetata [id] = false;
            
            
remove_task id );
            
            
CautareUser id );
            
            
write_file DirectorData );
            
            
set_user_info id"_eVo"Password );
            
            
set_task 2.0"ReloadAdmins" );
            
            if ( 
Cumparat [id] == )
            {
                
fcs_set_user_credits idfcs_get_user_credits id ) - get_pcvar_num Slot )) 
                
ChatColor id"%s!team Ai cumparat !gSLOT!team cu succes! Nume:!g%s!team, Parola:!g%s!team ! "TagNamePassword );
            }
        }
        else
        {
            
ChatColor id"%s!team Parola introdusa este invalida! Te rugam incearca din nou!"Tag );
            
client_cmd id"messagemode register" );
            
            return 
PLUGIN_HANDLED;
        }
    }
    else
    {
        
ChatColor id"%s!team A expirat timpul deja! Te rugam sa incerci din nou!"Tag );
        
        return 
PLUGIN_HANDLED;
    }
    return 
PLUGIN_HANDLED;
}
public 
ReloadAdmins (  ) server_cmd "amx_reloadadmins" );
public 
CautareUser id )
{
    new 
FileName [64]; get_configsdir FileNamecharsmax FileName ) );
    
    
add FileNamecharsmax FileName ), "/users.ini" );
    
    new 
FileLine;
    
    new 
Name [32]; get_user_name idNamecharsmax Name ) );
    
    
ReadFile:
    
    
File fopen FileName "rt" );
    
    
Line = -1;
    
    if ( 
File )
    {
        new 
Format [256], iKey [32];
        while ( !
feof File ) )
        {
            
Line ++;
            
            
fgets FileFormatcharsmax Format ) );
            
            
trim Format );
            
            
Format [0];
            
            if ( 
&& != '#' && != ';' && !( == '/' && Format [1] == '/' ) )
            {
                
parse FormatKeycharsmax Key ) );
                
                if ( 
equal KeyName ) )
                {
                    
fclose File );
                    
                    
File 0;
                    
                    
write_file FileName""Line );
                    
                    goto 
ReadFile;
                }
            }
        }
        
        
fclose File );
        
        
File 0;
    }
}
//********************STOCK-URI******************** 
stock ChatColor(const id, const input[], any:...) 

new 
count 1players[32
static 
msg[191
vformat(msg190input3

replace_all(msg190"!g""^4"
replace_all(msg190"!y""^1"
replace_all(msg190"!team""^3"

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(); 




I replaced some variables with new ones, check if plugin works
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
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 17:54.


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