Blocks don't save in BCM.
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(client, xp);
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(client, xp) { return hnsxp_set_user_xp(client, hnsxp_get_user_xp(client) + xp); }
PHP Code:
public fwd_Touch(ent, id, OverrideTimer) { if ( id > 0 && id <= gMaxPlayers ) { if ( gbAlive[id] ) { if ( is_Block(ent) ) { static szProperty4[33]; Get_BlockProperty(ent, 4, szProperty4); if ( szProperty4[0] == '0' ) { new blockType = pev(ent, pev_body); switch ( blockType ) { case FSCM_BUNNYHOP, FSCM_NOSLOWDOWN_BHOP: action_Bhop(ent); case FSCM_DAMAGE: action_Damage(id, ent); case FSCM_HEALER: action_Heal(id, ent); case FSCM_TRAMPOLINE: action_Trampoline(id, ent); case FSCM_SPEEDBOOST: action_SpeedBoost(id, ent); case FSCM_DEATH: fakedamage(id, "The Block of Death", 10000.0, DMG_GENERIC); case FSCM_LOWGRAVITY: action_LowGravity(id, ent); case FSCM_HONEY: action_Honey(id, ent); case FSCM_BARRIER_CT: action_BarrierCT(id, ent); case FSCM_BARRIER_T: action_BarrierT(id, ent); case FSCM_DELAYED_BHOP: action_DelayedBhop(ent); case FSCM_STEALTH: action_Stealth(id, ent); case FSCM_INVINCIBILITY: action_Invincible(id, ent); case FSCM_BOOTSOFSPEED: action_BootsOfSpeed(id, ent); case FSCM_AWP: action_Awp(id, OverrideTimer); case FSCM_HE: action_He(id, OverrideTimer); case FSCM_SMOKE: action_Smoke(id, OverrideTimer); case FSCM_DEAGLE: action_Deagle(id, OverrideTimer); case FSCM_FLASH: action_Flash(id, OverrideTimer); case FSCM_XPBLOCK: action_XPBLOCK(id, OverrideTimer); } } } } } return PLUGIN_CONTINUE; }
PHP Code:
action_XPBLOCK(id, OverrideTimer) { new Float:fTime = halflife_time(); if (fTime >= gfXPNextUse[id] || OverrideTimer) { if(cs_get_user_team(id) == CS_TEAM_T) { hnsxp_add_user_xp(id, 40); gfXPNextUse[id] = fTime + 170; set_hudmessage(gHudRed, gHudGreen, gHudBlue, gfTextX, gfTextY, gHudEffects, gfHudFxTime, gfHudHoldTime, gfHudFadeInTime, gfHudFadeOutTime, gHudChannel); 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?
|