Raised This Month: $ Target: $400
 0% 

Blocks don't save in BCM.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
NiQu
Veteran Member
Join Date: Nov 2009
Old 11-29-2009 , 04:11   Blocks don't save in BCM.
Reply With Quote #1

Hi, im adding new blocks into BCM.. The first block was an XP block that works together with an xp mod plugin. It works fine.

But when i saved the blocks and restart the server or simply reloaded teh blocks the xp block doesnt load :S I think the xp block doesnt even save :/.

Im using BCM 5 by Fatalis(im not switching to blockmaker).

PHP Code:
native hnsxp_get_user_xp(client); 
native hnsxp_set_user_xp(clientxp); 
PHP Code:
new bool:usedXPBLOCK[33]; 
PHP Code:
new const gszBlockModelXP[] = "models/Pwnography_blocks/Normal/moneygiver.mdl"
PHP Code:
new Float:gfXPNextUse[33]; 
PHP Code:
enum
{
    
FSCM_PLATFORM,
    
FSCM_BUNNYHOP,
    
FSCM_DAMAGE,
    
FSCM_HEALER,
    
FSCM_NOFALLDAMAGE,
    
FSCM_ICE,
    
FSCM_TRAMPOLINE,
    
FSCM_SPEEDBOOST,
    
FSCM_DEATH,
    
FSCM_LOWGRAVITY,
    
FSCM_SLAP,
    
FSCM_HONEY,
    
FSCM_BARRIER_CT,
    
FSCM_BARRIER_T,
    
FSCM_GLASS,
    
FSCM_NOSLOWDOWN_BHOP,
    
FSCM_DELAYED_BHOP,
    
FSCM_INVINCIBILITY,
    
FSCM_STEALTH,
    
FSCM_BOOTSOFSPEED,
    
FSCM_AWP,
    
FSCM_HE,
    
FSCM_SMOKE,
    
FSCM_DEAGLE,
    
FSCM_FLASH
    
FSCM_XPBLOCK
}; 
PHP Code:
new const gszBlockNames[gBlockMax][32] =
{
    
"Platform",
    
"Bunnyhop",
    
"Damage",
    
"Healer",
    
"No Fall Damage",
    
"Ice",
    
"Trampoline",
    
"Speed Boost",
    
"Death",
    
"Low Gravity",
    
"Slap",
    
"Honey",
    
"CT Barrier",
    
"T Barrier",
    
"Glass",
    
"No Slow Down Bhop",
    
"Delayed Bhop",
    
"Invincibility",
    
"Stealth",
    
"Boots Of Speed",
    
"Awp",
    
"He",
    
"Smoke",
    
"Deagle",
    
"Flash",
    
"XP Block"
};

new const 
gszProperty1Name[gBlockMax][] =
{
    
"",
    
"No Fall Damage",
    
"Damage Per Interval",
    
"Health Per Interval",
    
"",
    
"",
    
"Upward Speed",
    
"Forward Speed",
    
"",
    
"Gravity",
    
"",
    
"Speed In Honey",
    
"",
    
"",
    
"",
    
"No Fall Damage",
    
" Before Dissapear",
    
"Invincibility Time",
    
"Stealth Time",
    
"Boots Of Speed Time",
    
"",
    
"",
    
"",
    
"",
    
"",
    
""
};

new const 
gszProperty1Default[gBlockMax][] =
{
    
"",
    
"0",
    
"5",
    
"1",
    
"",
    
"",
    
"500",
    
"1000",
    
"",
    
"200",
    
"",
    
"50",
    
"",
    
"",
    
"",
    
"0",
    
"1",
    
"10",
    
"10",
    
"10",
    
"",
    
"",
    
"",
    
"",
    
"",
    
""
};

new const 
gszProperty2Name[gBlockMax][] =
{
    
"",
    
"",
    
"Interval Between Damage",
    
"Interval Between Heals",
    
"",
    
"",
    
"",
    
"Upward Speed",
    
"",
    
"",
    
"",
    
"",
    
"",
    
"",
    
"",
    
"",
    
"",
    
"Delay After Usage",
    
"Delay After Usage",
    
"Delay After Usage",
    
"",
    
"",
    
"",
    
"",
    
"",
    
""
};

new const 
gszProperty2Default[gBlockMax][] =
{
    
"",
    
"",
    
"0.1",
    
"0.1",
    
"",
    
"",
    
"",
    
"200",
    
"",
    
"",
    
"",
    
"",
    
"",
    
"",
    
"",
    
"",
    
"",
    
"60",
    
"60",
    
"60",
    
"",
    
"",
    
"",
    
"",
    
"",
    
""
};

new const 
gszProperty3Name[gBlockMax][] =
{
    
"Transparency",
    
"Transparency",
    
"Transparency",
    
"Transparency",
    
"Transparency",
    
"Transparency",
    
"Transparency",
    
"Transparency",
    
"Transparency",
    
"Transparency",
    
"Transparency",
    
"Transparency",
    
"Transparency",
    
"Transparency",
    
"",
    
"Transparency",
    
"Transparency",
    
"",
    
"",
    
"Speed",
    
"",
    
"",
    
"",
    
"",
    
"",
    
""
};

new const 
gszProperty3Default[gBlockMax][] =
{
    
"",
    
"0",
    
"0",
    
"0",
    
"0",
    
"0",
    
"0",
    
"0",
    
"0",
    
"0",
    
"0",
    
"0",
    
"0",
    
"0",
    
"",
    
"0",
    
"0",
    
"",
    
"",
    
"400",
    
"0",
    
"0",
    
"0",
    
"0",
    
"",
    
""
};

new const 
gszProperty4Name[gBlockMax][] =
{
    
"",
    
"On Top Only",
    
"On Top Only",
    
"On Top Only",
    
"",
    
"",
    
"On Top Only",
    
"On Top Only",
    
"On Top Only",
    
"On Top Only",
    
"",
    
"On Top Only",
    
"On Top Only",
    
"On Top Only",
    
"",
    
"On Top Only",
    
"On Top Only",
    
"On Top Only",
    
"On Top Only",
    
"On Top Only",
    
"",
    
"",
    
"",
    
"",
    
"",
    
""
};

new const 
gszProperty4Default[gBlockMax][] =
{
    
"",
    
"0",
    
"1",
    
"1",
    
"",
    
"",
    
"0",
    
"0",
    
"1",
    
"0",
    
"",
    
"0",
    
"0",
    
"0",
    
"",
    
"0",
    
"0",
    
"1",
    
"1",
    
"1",
    
"",
    
"",
    
"",
    
"",
    
"",
    
""
};

new const 
gBlockSaveIds[gBlockMax] =
{
    
'A',
    
'B',
    
'C',
    
'D',
    
'E',
    
'F',
    
'G',
    
'H',
    
'I',
    
'J',
    
'K',
    
'L',
    
'M',
    
'N',
    
'O',
    
'P',
    
'Q',
    
'R',
    
'S',
    
'T',
    
'U',
    
'V',
    
'W',
    
'X',
    
'Z'
}; 
PHP Code:
gszBlockModels[FSCM_XPBLOCK] = gszBlockModelXP
PHP Code:
stock hnsxp_add_user_xp(clientxp)
{
    return 
hnsxp_set_user_xp(clienthnsxp_get_user_xp(client) + xp);

PHP Code:
public fwd_Touch(entidOverrideTimer)
{
    if ( 
id && id <= gMaxPlayers )
    {
        if ( 
gbAlive[id] )
        {
            if ( 
is_Block(ent) )
            {
                static 
szProperty4[33];
                
Get_BlockProperty(ent4szProperty4);
                
                if ( 
szProperty4[0] == '0' )
                {
                    new 
blockType pev(entpev_body);
                    switch ( 
blockType )
                    {
                        case 
FSCM_BUNNYHOPFSCM_NOSLOWDOWN_BHOPaction_Bhop(ent);
                        case 
FSCM_DAMAGEaction_Damage(ident);
                        case 
FSCM_HEALERaction_Heal(ident);
                        case 
FSCM_TRAMPOLINEaction_Trampoline(ident);
                        case 
FSCM_SPEEDBOOSTaction_SpeedBoost(ident);
                        case 
FSCM_DEATHfakedamage(id"The Block of Death"10000.0DMG_GENERIC);
                        case 
FSCM_LOWGRAVITYaction_LowGravity(ident);
                        case 
FSCM_HONEYaction_Honey(ident);
                        case 
FSCM_BARRIER_CTaction_BarrierCT(ident);
                        case 
FSCM_BARRIER_Taction_BarrierT(ident);
                        case 
FSCM_DELAYED_BHOPaction_DelayedBhop(ent);
                        case 
FSCM_STEALTHaction_Stealth(ident);
                        case 
FSCM_INVINCIBILITYaction_Invincible(ident);
                        case 
FSCM_BOOTSOFSPEEDaction_BootsOfSpeed(ident);
                        case 
FSCM_AWPaction_Awp(idOverrideTimer);
                        case 
FSCM_HEaction_He(idOverrideTimer);
                        case 
FSCM_SMOKEaction_Smoke(idOverrideTimer);
                        case 
FSCM_DEAGLEaction_Deagle(idOverrideTimer);
                        case 
FSCM_FLASHaction_Flash(idOverrideTimer);
                        case 
FSCM_XPBLOCKaction_XPBLOCK(idOverrideTimer);
                    }
                }
            }
        }
    }
    
    return 
PLUGIN_CONTINUE;

PHP Code:
action_XPBLOCK(idOverrideTimer)
{
    new 
Float:fTime halflife_time();
    if (
fTime >= gfXPNextUse[id] || OverrideTimer)
    {
        if(
cs_get_user_team(id) == CS_TEAM_T)
        {
            
hnsxp_add_user_xp(id40);
            
gfXPNextUse[id] = fTime 170;
            
set_hudmessage(gHudRedgHudGreengHudBluegfTextXgfTextYgHudEffectsgfHudFxTimegfHudHoldTimegfHudFadeInTimegfHudFadeOutTimegHudChannel);
            
show_hudmessage(id"YOU EARNED 40 XP!"gfHeNextUse[id] - fTime);
        }
    }

I belive this is all the code i added.

What is wrong? did i forget to add something?
NiQu is offline
 



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 13:41.


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