Raised This Month: $ Target: $400
 0% 

Problems at Compiling


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Ray
Junior Member
Join Date: Oct 2009
Location: Germany
Old 10-14-2009 , 16:47   Re: Problems at Compiling
Reply With Quote #1

Okay, and how can i define it? I tried all day .. or what do i have to ?

Last edited by Ray; 10-14-2009 at 17:14.
Ray is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 10-14-2009 , 17:19   Re: Problems at Compiling
Reply With Quote #2

I don't know if just defining it will work but it might. You define it like all the other ones:

PHP Code:
// global floats
new Float:gfSnappingGap[33];
new 
Float:gfOldMaxSpeed[33];
new 
Float:gfGrablength[33];
new 
Float:gfNextHealTime[33];
new 
Float:gfNextDamageTime[33];
new 
Float:gfInvincibleNextUse[33];
new 
Float:gfInvincibleTimeOut[33];
new 
Float:gfStealthNextUse[33];
new 
Float:gfStealthTimeOut[33];
new 
Float:gfTrampolineTimeout[33];
new 
Float:gfSpeedBoostTimeOut[33];
new 
Float:gfNukeNextUse[33];
new 
Float:gfCamouflageNextUse[33];
new 
Float:gfCamouflageTimeOut[33];
new 
Float:gfRandomNextUse[33];
new 
Float:gfBootsOfSpeedTimeOut[33];
new 
Float:gfBootsOfSpeedNextUse[33];
new 
Float:gfAutoBhopTimeOut[33];
new 
Float:gfAutoBhopNextUse[33]; 
__________________
fysiks is offline
Ray
Junior Member
Join Date: Oct 2009
Location: Germany
Old 10-14-2009 , 17:33   Re: Problems at Compiling
Reply With Quote #3

I defined gfDeagleNextUse and gfHENextuse but now this comes when i want to compile it..

/home/groups/amxmodx/compiler3/core(0) : error 075: input line too long (after substitutions)
/home/groups/amxmodx/compiler3/core(5) : error 075: input line too long (after substitutions)
/home/groups/amxmodx/compiler3/core(6) : error 075: input line too long (after substitutions)
/home/groups/amxmodx/compiler3/core(7) : error 075: input line too long (after substitutions)
/home/groups/amxmodx/compiler3/core( : error 075: input line too long (after substitutions)
/home/groups/amxmodx/compiler3/core(9) : error 075: input line too long (after substitutions)
/home/groups/amxmodx/compiler3/core(10) : error 075: input line too long (after substitutions)
/home/groups/amxmodx/compiler3/core(11) : error 075: input line too long (after substitutions)
/home/groups/amxmodx/compiler3/core(12) : error 075: input line too long (after substitutions)
/home/groups/amxmodx/compiler3/core(13) : error 075: input line too long (after substitutions)
/home/groups/amxmodx/compiler3/core(14) : error 075: input line too long (after substitutions)
/home/groups/amxmodx/compiler3/core(15) : error 075: input line too long (after substitutions)
/home/groups/amxmodx/compiler3/core(17) : error 075: input line too long (after substitutions)
/home/groups/amxmodx/compiler3/core(1 : error 075: input line too long (after substitutions)
/home/groups/amxmodx/compiler3/core(19) : error 075: input line too long (after substitutions)
/home/groups/amxmodx/compiler3/core(20) : error 075: input line too long (after substitutions)
/home/groups/amxmodx/compiler3/core(21) : error 075: input line too long (after substitutions)
/home/groups/amxmodx/compiler3/core(22) : error 075: input line too long (after substitutions)
/home/groups/amxmodx/compiler3/core(23) : error 075: input line too long (after substitutions)
/home/groups/amxmodx/compiler3/core(24) : error 075: input line too long (after substitutions)
/home/groups/amxmodx/compiler3/core(25) : error 075: input line too long (after substitutions)
/home/groups/amxmodx/compiler3/core(26) : error 075: input line too long (after substitutions)
/home/groups/amxmodx/compiler3/core(27) : error 075: input line too long (after substitutions)
/home/groups/amxmodx/compiler3/core(2 : error 075: input line too long (after substitutions)
/home/groups/amxmodx/compiler3/core(29) : error 075: input line too long (after substitutions)
/home/groups/amxmodx/compiler3/core(30) : error 075: input line too long (after substitutions)


?????

I am really desperate..
Ray is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 10-14-2009 , 17:59   Re: Problems at Compiling
Reply With Quote #4

Show the code that you added. (not the whole plugin)

Edit: Jesus Christ, how many things did you add?

EDIT2:

Wow, that was a nightmare. I don't think you knew what in the world you were doing. I got it to compile but I can't say that it would work. It looks like you edited the switch statement in loadBlocks() and that really screwed things up and makes things not go together correctly (the letter codes).
Attached Files
File Type: sma Get Plugin or Get Source (compile.sma - 338 views - 178.1 KB)
__________________

Last edited by fysiks; 10-14-2009 at 18:19.
fysiks is offline
Ray
Junior Member
Join Date: Oct 2009
Location: Germany
Old 10-14-2009 , 18:24   Re: Problems at Compiling
Reply With Quote #5

Okay this is i think all i added..

PHP Code:
 // block models
new const gszBlockModelDefault[] = "models/blockmaker/bm_block_default.mdl";
new const 
gszBlockModelPlatform[] = "models/blockmaker/bm_block_platform.mdl";
new const 
gszBlockModelBhop[] = "models/blockmaker/bm_block_bhop.mdl";
new const 
gszBlockModelDamage[] = "models/blockmaker/bm_block_damage.mdl";
new const 
gszBlockModelHealer[] = "models/blockmaker/bm_block_healer.mdl";
new const 
gszBlockModelInvincibility[] = "models/blockmaker/bm_block_invincibility.mdl";
new const 
gszBlockModelStealth[] = "models/blockmaker/bm_block_stealth.mdl";
new const 
gszBlockModelSpeedBoost[] = "models/blockmaker/bm_block_speedboost.mdl";
new const 
gszBlockModelNoFallDamage[] = "models/blockmaker/bm_block_nofalldamage.mdl";
new const 
gszBlockModelIce[] = "models/blockmaker/bm_block_ice.mdl";
new const 
gszBlockModelDeath[] = "models/blockmaker/bm_block_death.mdl";
new const 
gszBlockModelCamouflage[] = "models/blockmaker/bm_block_camouflage.mdl";
new const 
gszBlockModelLowGravity[] = "models/blockmaker/bm_block_lowgravity.mdl";
new const 
gszBlockModelFire[] = "models/blockmaker/bm_block_fire.mdl";
new const 
gszBlockModelRandom[] = "models/blockmaker/bm_block_random.mdl";
new const 
gszBlockModelSlap[] = "models/blockmaker/bm_block_slap.mdl";
new const 
gszBlockModelHoney[] = "models/blockmaker/bm_block_honey.mdl";
new const 
gszBlockModelBarrierCT[] = "models/blockmaker/bm_block_barrier_ct.mdl";
new const 
gszBlockModelBarrierT[] = "models/blockmaker/bm_block_barrier_t.mdl";
new const 
gszBlockModelBootsOfSpeed[] = "models/blockmaker/bm_block_bootsofspeed.mdl";
new const 
gszBlockModelGlass[] = "models/blockmaker/bm_block_glass.mdl";
new const 
gszBlockModelBhopNoSlow[] = "models/blockmaker/bm_block_bhop_noslow.mdl";
new const 
gszBlockModelTrampolin[] = "models/blockmaker/bm_block_lowtrampov1.mdl";
new const 
gszBlockModelHE[] = "models/blockmaker/bm_block_hegrenade.mdl";
new const 
gszBlockModelDuck[] = "models/blockmaker/bm_block_duck.mdl";
new const 
gszBlockModelAss[] = "models/blockmaker/bm_block_lowtrampov2.mdl";
new const 
gszBlockModelSalto[] = "models/blockmaker/bm_block_lowtrampov3.mdl";
new const 
gszBlockModelFrost[] = "models/blockmaker/bm_block_smoke.mdl";
new const 
gszBlockModelFlash[] = "models/blockmaker/bm_block_flash.mdl";
new const 
gszBlockModelDelayed[] = "models/blockmaker/bm_block_delayed.mdl";
new const 
gszBlockModelMoney[] = "models/blockmaker/bm_block_money.mdl";
new const 
gszBlockModelDeagle[] = "models/blockmaker/bm_block_deagle.mdl";
new const 
gszBlockModelAwp[] = "models/blockmaker/bm_block_awp.mdl";
new const 
gszBlockModelGravity[] = "models/blockmaker/bm_block_superman.mdl";
new const 
gszBlockModelBlind[] = "models/blockmaker/bm_block_blind_perm.mdl";
new const 
gszBlockModelBlindFast[] = "models/blockmaker/bm_block_blind_fast.mdl";
new const 
gszBlockModelSG[] = "models/blockmaker/bm_block_Shotgun.mdl";
new const 
gszBlockModelSuperHeal[] = "models/blockmaker/bm_block_SuperHeal.mdl";
new const 
gszBlockModelSuperHoney[] = "models/blockmaker/bm_block_SuperHoney.mdl";
new const 
gszBlockModelColt[] = "models/blockmaker/bm_block_colt.mdl"
PHP Code:
 // global floats
new Float:gfSnappingGap[33];
new 
Float:gfOldMaxSpeed[33];
new 
Float:gfGrablength[33];
new 
Float:gfNextHealTime[33];
new 
Float:gfNextDamageTime[33];
new 
Float:gfInvincibleNextUse[33];
new 
Float:gfInvincibleTimeOut[33];
new 
Float:gfStealthNextUse[33];
new 
Float:gfStealthTimeOut[33];
new 
Float:gfTrampolineTimeout[33];
new 
Float:gfSpeedBoostTimeOut[33];
new 
Float:gfNukeNextUse[33];
new 
Float:gfCamouflageNextUse[33];
new 
Float:gfCamouflageTimeOut[33];
new 
Float:gfRandomNextUse[33];
new 
Float:gfBootsOfSpeedTimeOut[33];
new 
Float:gfBootsOfSpeedNextUse[33];
new 
Float:gfAutoBhopTimeOut[33];
new 
Float:gfAutoBhopNextUse[33];
new 
Float:gfDeagleNextUse[33];
new 
Float:gfHENextUse[33]; 
PHP Code:
     BM_PLATFORM,        //A
    
BM_BHOP,        //B
    
BM_DAMAGE,        //C
    
BM_HEALER,        //D
    
BM_NOFALLDAMAGE,    //E
    
BM_ICE,            //F
    
BM_TRAMPOLINE,        //G
    
BM_SPEEDBOOST,        //H
    
BM_INVINCIBILITY,    //I
    
BM_STEALTH,        //J
    
BM_DEATH,        //K
    
BM_CAMOUFLAGE,        //L
    
BM_LOWGRAVITY,        //M
    
BM_FIRE,        //N
    
BM_SLAP,        //O
    
BM_RANDOM,        //P
    
BM_HONEY,        //Q
    
BM_BARRIER_CT,        //R
    
BM_BARRIER_T,        //S
    
BM_BOOTSOFSPEED,    //T
    
BM_GLASS,        //U
    
BM_BHOP_NOSLOW,        //V
    
BM_ASS,      // W
    
BM_SALTO//X
    
BM_HE,        //Y
    
BM_DUCK,        //Z
    
BM_FROST,    //1
    
BM_FLASH,    //2
    
BM_DELAYED,    //3
    
BM_MONEY,    //4
    
BM_DEAGLE,    //5
    
BM_AWP,        //6
    
BM_GRAVITY,    //7
    
BM_BLIND,    //8
    
BM_BLINDFAST,    //9
    
BM_SG,        //a
    
BM_SUPERHEAL//b
    
BM_SUPERHONEY//c
    
BM_COLT//d 
PHP Code:
 new const gszBlockNames[gBlockMax][32] =
{
    
"Platform",
    
"Bunnyhop",
    
"Damage",
    
"Healer",
    
"No Fall Damage",
    
"Ice",
    
"Trampoline",
    
"Speed Boost",
    
"Invincibility",
    
"Stealth",
    
"Death",
    
"Camouflage",
    
"Low Gravity",
    
"Fire",
    
"Slap",
    
"Random",
    
"Honey",
    
"CT Barrier",
    
"T Barrier",
    
"Boots Of Speed",
    
"Glass",
    
"Bunnyhop (No slow down)",
    
"Trampolin(High)",
    
"Trampolin(Low)",
    
"HE Grenade",
    
"Duckjump",
    
"Frostnade",
    
"Flashbang",
    
"Delayed Bhop",
    
"Money Block",
    
"Deagle",
    
"Awp",
    
"Superman",
    
"Blind trap (Delay)",
    
"Blind trap (No Delay)",
    
"Shotgun",
    
"Super Heal",
    
"Super Honey",
    
"Colt",
    
"Supermoney" 
PHP Code:
 public plugin_precache()
{
    
//set block models to defaults
    
gszBlockModels[BM_PLATFORM] = gszBlockModelPlatform;
    
gszBlockModels[BM_BHOP] = gszBlockModelBhop;
    
gszBlockModels[BM_DAMAGE] = gszBlockModelDamage;
    
gszBlockModels[BM_HEALER] = gszBlockModelHealer;
    
gszBlockModels[BM_NOFALLDAMAGE] = gszBlockModelNoFallDamage;
    
gszBlockModels[BM_ICE] = gszBlockModelIce;
    
gszBlockModels[BM_TRAMPOLINE] = gszBlockModelDefault;
    
gszBlockModels[BM_SPEEDBOOST] = gszBlockModelSpeedBoost;
    
gszBlockModels[BM_INVINCIBILITY] = gszBlockModelInvincibility;
    
gszBlockModels[BM_STEALTH] = gszBlockModelStealth;
    
gszBlockModels[BM_DEATH] = gszBlockModelDeath;
    
gszBlockModels[BM_CAMOUFLAGE] = gszBlockModelCamouflage;
    
gszBlockModels[BM_LOWGRAVITY] = gszBlockModelLowGravity;
    
gszBlockModels[BM_FIRE] = gszBlockModelFire;
    
gszBlockModels[BM_SLAP] = gszBlockModelSlap;
    
gszBlockModels[BM_RANDOM] = gszBlockModelRandom;
    
gszBlockModels[BM_HONEY] = gszBlockModelHoney;
    
gszBlockModels[BM_BARRIER_CT] = gszBlockModelBarrierCT;
    
gszBlockModels[BM_BARRIER_T] = gszBlockModelBarrierT;
    
gszBlockModels[BM_BOOTSOFSPEED] = gszBlockModelBootsOfSpeed;
    
gszBlockModels[BM_GLASS] = gszBlockModelGlass;
    
gszBlockModels[BM_BHOP_NOSLOW] = gszBlockModelBhopNoSlow;
    
gszBlockModels[BM_DUCK] = gszBlockModelDuck;
    
gszBlockModels[BM_ASS] = gszBlockModelAss;
    
gszBlockModels[BM_SALTO] = gszBlockModelSalto;
    
gszBlockModels[BM_FROST] = gszBlockModelFrost;
    
gszBlockModels[BM_FLASH] = gszBlockModelFlash;
    
gszBlockModels[BM_DELAYED] = gszBlockModelDelayed;
    
gszBlockModels[BM_MONEY] = gszBlockModelMoney;
    
gszBlockModels[BM_DEAGLE] = gszBlockModelDeagle;
    
gszBlockModels[BM_AWP] = gszBlockModelAwp;
    
gszBlockModels[BM_GRAVITY] = gszBlockModelGravity;
    
gszBlockModels[BM_BLIND] = gszBlockModelBlind;
    
gszBlockModels[BM_BLINDFAST] = gszBlockModelBlindFast;
    
gszBlockModels[BM_SG] = gszBlockModelSG;
    
gszBlockModels[BM_SUPERHEAL] = gszBlockModelSuperHeal;
    
gszBlockModels[BM_SUPERHONEY] = gszBlockModelSuperHoney;
    
gszBlockModels[BM_COLT] = gszBlockModelColt
PHP Code:
         if (equal(szType"PLATFORM")) blockType BM_PLATFORM;
        else if (
equal(szType"BHOP")) blockType BM_BHOP;
        else if (
equal(szType"DAMAGE")) blockType BM_DAMAGE;
        else if (
equal(szType"HEALER")) blockType BM_HEALER;
        else if (
equal(szType"NOFALLDAMAGE")) blockType BM_NOFALLDAMAGE;
        else if (
equal(szType"ICE")) blockType BM_ICE;
        else if (
equal(szType"TRAMPOLINE")) blockType BM_TRAMPOLINE;
        else if (
equal(szType"SPEEDBOOST")) blockType BM_SPEEDBOOST;
        else if (
equal(szType"INVINCIBILITY")) blockType BM_INVINCIBILITY;
        else if (
equal(szType"STEALTH")) blockType BM_STEALTH;
        else if (
equal(szType"DEATH")) blockType BM_DEATH;
        else if (
equal(szType"CAMOUFLAGE")) blockType BM_CAMOUFLAGE;
        else if (
equal(szType"LOWGRAVITY")) blockType BM_LOWGRAVITY;
        else if (
equal(szType"FIRE")) blockType BM_FIRE;
        else if (
equal(szType"SLAP")) blockType BM_SLAP;
        else if (
equal(szType"RANDOM")) blockType BM_RANDOM;
        else if (
equal(szType"HONEY")) blockType BM_HONEY;
        else if (
equal(szType"BARRIER_CT")) blockType BM_BARRIER_CT;
        else if (
equal(szType"BARRIER_T")) blockType BM_BARRIER_T;
        else if (
equal(szType"BOOTSOFSPEED")) blockType BM_BOOTSOFSPEED;
        else if (
equal(szType"GLASS")) blockType BM_GLASS;
        else if (
equal(szType"BHOP_NOSLOW")) blockType BM_BHOP_NOSLOW;
        else if (
equal(szType"DUCK")) blockType BM_DUCK;
        else if (
equal(szType"HIGH_TRAMPOLINE")) blockType BM_ASS;
        else if (
equal(szType"LOW_TRAMPOLINE")) blockType BM_SALTO;
        else if (
equal(szType"FROST")) blockType BM_FROST;
        else if (
equal(szType"FLASH")) blockType BM_FLASH;
        else if (
equal(szType"DELAYED")) blockType BM_DELAYED;
        else if (
equal(szType"MONEY")) blockType BM_MONEY;
        else if (
equal(szType"DEAGLE")) blockType BM_DEAGLE;
        else if (
equal(szType"AWP")) blockType BM_AWP;
        else if (
equal(szType"GRAVITY")) blockType BM_GRAVITY;
        else if (
equal(szType"BLIND")) blockType BM_BLIND;
        else if (
equal(szType"NO_BLIND_DELAY")) blockType BM_BLINDFAST;
        else if (
equal(szType"SHOTG")) blockType BM_SG;
        else if (
equal(szType"SuperHeal")) blockType BM_SUPERHEAL;
        else if (
equal(szType"SuperHoney")) blockType BM_SUPERHONEY;
        else if (
equal(szType"SuperColt")) blockType BM_COLT
PHP Code:
 switch (blockType)
                    {
                        case 
BM_HEALERactionHeal(id);
                        case 
BM_DAMAGEactionDamage(id);
                        case 
BM_INVINCIBILITYactionInvincible(idfalse);
                        case 
BM_STEALTHactionStealth(idfalse);
                        case 
BM_TRAMPOLINEactionTrampoline(id);
                        case 
BM_SPEEDBOOSTactionSpeedBoost(id);
                        case 
BM_DEATHactionDeath(id);
                        case 
BM_LOWGRAVITYactionLowGravity(id);
                        case 
BM_CAMOUFLAGEactionCamouflage(idfalse);
                        case 
BM_FIREactionFire(ident);
                        case 
BM_SLAPactionSlap(id);
                        case 
BM_RANDOMactionRandom(ident);
                        case 
BM_HONEYactionHoney(id);
                        case 
BM_BOOTSOFSPEEDactionBootsOfSpeed(idfalse);
                        case 
BM_DUCKactionDuck(id);
                        case 
BM_ASSactionTrampolineAlto(id);
                        case 
BM_SALTOactionTrampolineBajo(id);
                        case 
BM_FROSTactionFrost(idfalse);
                        case 
BM_FLASHactionFlash(idfalse);
                        case 
BM_MONEYactionMoney(idfalse);
                        case 
BM_DEAGLEactionDeagle(idfalse);
                        case 
BM_AWPactionAwp(idfalse);
                        case 
BM_GRAVITYactionGravity(idfalse);
                        case 
BM_BLINDactionBlind(idfalse);
                        case 
BM_BLINDFASTactionBlindDelay(idfalse);
                        case 
BM_SGactionSG(idfalse);
                        case 
BM_SUPERHEALactionSuperHeal(id);
                        case 
BM_SUPERHONEYactionSuperHoney(id);
                        case 
BM_COLTactionColt(idfalse); 
PHP Code:
 actionColt(idOverrideTimer

    
//get game time 
    
new Float:fTime halflife_time(); 
  
    
//make sure player is alive 
    
if (fTime >= gfDeagleNextUse[id] || OverrideTimer && cs_get_user_team(id) == CS_TEAM_T
    { 
        
give_item(id"weapon_m4a1"); 
        
cs_set_weapon_ammo(find_ent_by_owner(-1"weapon_m4a1"id), 3); 
         
        
//set the time when the player can use the nuke again (someone might have been invincible) 
        
gfDeagleNextUse[id] = fTime get_cvar_float("bm_coltcooldown"); 
         
         
//setup hud message to show who nuked what team 
        
set_hudmessage(2552550, -1.00.3506.010.01.01.0); 

        
//Show Message 
        
new szPlayerName[32]; 
        
get_user_name(idszPlayerName32); 
         
        
show_hudmessage(0"Oh My God, All CT's Run %s Got the Colt!"szPlayerName); 
    } 
    else 
    { 
        
set_hudmessage(gHudRedgHudGreengHudBluegfTextXgfTextYgHudEffectsgfHudFxTimegfHudHoldTimegfHudFadeInTimegfHudFadeOutTimegHudChannel); 
        
show_hudmessage(id"COLT NEXT USE AFTER 1 ROUND"gfDeagleNextUse[id] - fTime); 
    } 
}  


actionSuperHoney(id)
{
    new 
taskid TASK_HONEY id;
    
    
//make player feel like they're stuck in honey by lowering their maxspeed
    
set_user_maxspeed(id0.1);
    
    
//remove any existing 'in honey' task
    
if (task_exists(taskid))
    {
        
remove_task(taskid);
    }
    else
    {
        
//half the players velocity the first time they touch it
        
new Float:vVelocity[3];
        
entity_get_vector(idEV_VEC_velocityvVelocity);
        
vVelocity[0] = vVelocity[0] / 2.0;
        
vVelocity[1] = vVelocity[1] / 2.0;
        
entity_set_vector(idEV_VEC_velocityvVelocity);
    }
    
    
//set task to remove 'in honey' effect very soon (task replaced if player is still in honey before task time reached)
    
set_task(0.1"taskNotInHoney"taskid);
}

actionSuperHeal(id)
{
    if (
halflife_time() >= gfNextHealTime[id])
    {
        new 
hp get_user_health(id);
        new 
amount floatround(get_cvar_float("bm_healamount"), floatround_floor);
        new 
sum = (hp amount);
        
        if (
sum 255)
        {
            
set_user_health(idsum);
        }
        else
        {
            
set_user_health(id255);
        }
        
        
gfNextHealTime[id] = halflife_time() + 1.0;
    }
}

actionDamage(id)
{
    if (
halflife_time() >= gfNextDamageTime[id])
    {
        if (
get_user_health(id) > 0)
        {
            new 
Float:amount get_cvar_float("bm_damageamount");
            
fakedamage(id"damage block"amountDMG_CRUSH);
        }
        
        
gfNextDamageTime[id] = halflife_time() + 0.5;
    }
}

actionHeal(id)
{
    if (
halflife_time() >= gfNextHealTime[id])
    {
        new 
hp get_user_health(id);
        new 
amount floatround(get_cvar_float("bm_healamount"), floatround_floor);
        new 
sum = (hp amount);
        
        if (
sum 100)
        {
            
set_user_health(idsum);
        }
        else
        {
            
set_user_health(id100);
        }
        
        
gfNextHealTime[id] = halflife_time() + 1.0;
    }
}

actionInvincible(idOverrideTimer)
{
    new 
Float:fTime halflife_time();
    
    if (
fTime >= gfInvincibleNextUse[id] || OverrideTimer)
    {
        new 
Float:fTimeout get_cvar_float("bm_invincibletime");
        
        
set_user_godmode(id1);
        
set_task(fTimeout"taskInvincibleRemove"TASK_INVINCIBLE id""0"a"1);
        
        
//only make player glow white for invincibility if player isn't already stealth
        
if (fTime >= gfStealthTimeOut[id])
        {
            
set_user_rendering(idkRenderFxGlowShell255255255kRenderNormal16);
        }
        
        
//play invincibility sound
        
emit_sound(idCHAN_STATICgszInvincibleSound1.0ATTN_NORM0PITCH_NORM);
        
        
gfInvincibleTimeOut[id] = fTime fTimeout;
        
gfInvincibleNextUse[id] = fTime fTimeout get_cvar_float("bm_invinciblecooldown");
    }
    else
    {
        
set_hudmessage(gHudRedgHudGreengHudBluegfTextXgfTextYgHudEffectsgfHudFxTimegfHudHoldTimegfHudFadeInTimegfHudFadeOutTimegHudChannel);
        
show_hudmessage(id"Invincibility next use: %.1f"gfInvincibleNextUse[id] - fTime);
    }
}

actionStealth(idOverrideTimer)
{
    new 
Float:fTime halflife_time();
    
    
//check if player is outside of cooldown time to use stealth
    
if (fTime >= gfStealthNextUse[id] || OverrideTimer)
    {
        new 
Float:fTimeout get_cvar_float("bm_stealthtime");
        
        
//set a task to remove stealth after time out amount
        
set_task(fTimeout"taskStealthRemove"TASK_STEALTH id""0"a"1);
        
        
//make player invisible
        
set_user_rendering(idkRenderFxGlowShell000kRenderTransColor0);
        
        
//play stealth sound
        
emit_sound(idCHAN_STATICgszStealthSound1.0ATTN_NORM0PITCH_NORM);
        
        
gfStealthTimeOut[id] = fTime fTimeout;
        
gfStealthNextUse[id] = fTime fTimeout get_cvar_float("bm_stealthcooldown");
    }
    else
    {
        
set_hudmessage(gHudRedgHudGreengHudBluegfTextXgfTextYgHudEffectsgfHudFxTimegfHudHoldTimegfHudFadeInTimegfHudFadeOutTimegHudChannel);
        
show_hudmessage(id"Stealth next use: %.1f"gfStealthNextUse[id] - fTime);
    }
}

actionTrampolineAlto(id)
if (
halflife_time() >= gfTrampolineTimeout[id])
    {
        new 
Float:velocity[3];
        
        
//set player Z velocity to make player bounce
        
entity_get_vector(idEV_VEC_velocityvelocity);
        
velocity[2] = 800.0;                    //jump velocity
        
entity_set_vector(idEV_VEC_velocityvelocity);
        
        
entity_set_int(idEV_INT_gaitsequence6);           //play the Jump Animation
        
        
gfTrampolineTimeout[id] = halflife_time() + 0.5;
    }

actionTrampolineBajo(id)
if (
halflife_time() >= gfTrampolineTimeout[id])
    {
        new 
Float:velocity[3];
        
        
//set player Z velocity to make player bounce
        
entity_get_vector(idEV_VEC_velocityvelocity);
        
velocity[2] = 250.0;                    //jump velocity
        
entity_set_vector(idEV_VEC_velocityvelocity);
        
        
entity_set_int(idEV_INT_gaitsequence6);           //play the Jump Animation
        
        
gfTrampolineTimeout[id] = halflife_time() + 0.5;
    }

actionTrampoline(id)
{
    
//if trampoline timeout has exceeded (needed to prevent velocity being given multiple times)
    
if (halflife_time() >= gfTrampolineTimeout[id])
    {
        new 
Float:velocity[3];
        
        
//set player Z velocity to make player bounce
        
entity_get_vector(idEV_VEC_velocityvelocity);
        
velocity[2] = 500.0;                    //jump velocity
        
entity_set_vector(idEV_VEC_velocityvelocity);
        
        
entity_set_int(idEV_INT_gaitsequence6);           //play the Jump Animation
        
        
gfTrampolineTimeout[id] = halflife_time() + 0.5;
    }
}

actionSpeedBoost(id)
{
    
//if speed boost timeout has exceeded (needed to prevent speed boost being given multiple times)
    
if (halflife_time() >= gfSpeedBoostTimeOut[id])
    {
        new 
Float:pAim[3];
        
        
//set velocity on player in direction they're aiming
        
velocity_by_aim(id800pAim);
        
pAim[2] = 260.0;                    //make sure Z velocity is only as high as a jump
        
entity_set_vector(idEV_VEC_velocitypAim);
        
        
entity_set_int(idEV_INT_gaitsequence6);           //play the Jump Animation
        
        
gfSpeedBoostTimeOut[id] = halflife_time() + 0.5;
    }
}

actionNoFallDamage(id)
{
    
//set the player to not receive any fall damage (handled in client_PostThink)
    
gbNoFallDamage[id] = true;
}

actionOnIce(id)
{
    new 
taskid TASK_ICE id;
    
    if (!
gbOnIce[id])
    {
        
//save players maxspeed value
        
gfOldMaxSpeed[id] = get_user_maxspeed(id);
        
        
//make player feel like they're on ice
        
entity_set_float(idEV_FL_friction0.15);
        
set_user_maxspeed(id600.0);
        
        
//player is now 'on ice'
        
gbOnIce[id] = true;
    }
    
    
//remove any existing 'not on ice' task
    
if (task_exists(taskid))
    {
        
remove_task(taskid);
    }
    
    
//set task to remove 'on ice' effect very soon (task replaced if player is still on ice before task time reached)
    
set_task(0.1"taskNotOnIce"taskid);
}

actionDeath(id)
{
    
//if player does not have godmode enabled (admin godmode or invincibility)
    
if (!get_user_godmode(id))
    {
        
//kill player by inflicting massive damage
        
fakedamage(id"the block of death"10000.0DMG_GENERIC);
    }
}

actionHE(idOverrideTimer)
{
    
//get game time
    
new Float:fTime halflife_time();
    
    
//make sure player is alive
    
if (fTime >= gfHENextUse[id] || OverrideTimer)
    {
        
//ID HE
        
give_item(id"weapon_hegrenade");
        {
            
//omg
        
}
    
        
//set the time when the player can use the nuke again (someone might have been invincible)
        
gfHENextUse[id] = fTime get_cvar_float("bm_hecooldown");
        
        
//setup hud message to show who nuked what team
        
set_hudmessage(2552550, -1.00.3506.010.01.01.0);
        
    }
    else
    {
        
set_hudmessage(gHudRedgHudGreengHudBluegfTextXgfTextYgHudEffectsgfHudFxTimegfHudHoldTimegfHudFadeInTimegfHudFadeOutTimegHudChannel);
        
show_hudmessage(id"HE - GRENADE NEXT USE AFTER 1 ROUND"gfHENextUse[id] - fTime);
    }
}

actionCamouflage(idOverrideTimer)
{
    new 
Float:fTime halflife_time();
    
    
//check if player is outside of cooldown time to use camouflage
    
if (fTime >= gfCamouflageNextUse[id] || OverrideTimer)
    {
        new 
Float:fTimeout get_cvar_float("bm_camouflagetime");
        
        
//get players team and model
        
new szModel[32];
        new 
team;
        
        
cs_get_user_model(idszModel32);
        
        
team get_user_team(id);
        
        
//save current player model
        
gszCamouflageOldModel[id] = szModel;
        
        
//change player model depending on their current team
        
if (team == 1)        //TERRORIST
        
{
            
cs_set_user_model(id"urban");
        }
        else
        {
            
cs_set_user_model(id"leet");
        }
        
        
//play camouflage sound
        
emit_sound(idCHAN_STATICgszCamouflageSound1.0ATTN_NORM0PITCH_NORM);
        
        
//set a task to remove camouflage after time out amount
        
set_task(fTimeout"taskCamouflageRemove"TASK_CAMOUFLAGE id""0"a"1);
        
        
//set timers to prevent player from using camouflage again so soon
        
gfCamouflageTimeOut[id] = fTime fTimeout;
        
gfCamouflageNextUse[id] = fTime fTimeout get_cvar_float("bm_camouflagecooldown");
    }
    else
    {
        
set_hudmessage(gHudRedgHudGreengHudBluegfTextXgfTextYgHudEffectsgfHudFxTimegfHudHoldTimegfHudFadeInTimegfHudFadeOutTimegHudChannel);
        
show_hudmessage(id"Camouflage next use: %.1f"gfCamouflageNextUse[id] - fTime);
    }
}

actionLowGravity(id)
{
    
//set player to have low gravity
    
set_user_gravity(id0.20);
    
    
//set global boolean showing player has low gravity
    
gbLowGravity[id] = true;
}

actionFire(ident)
{
    if (
halflife_time() >= gfNextDamageTime[id])
    {
        new 
hp get_user_health(id);
        
        
//if players health is greater than 0
        
if (hp 0)
        {
            
//if player does not have godmode
            
if (!get_user_godmode(id))
            {
                new 
Float:amount get_cvar_float("bm_firedamageamount") / 10.0;
                new 
Float:newAmount hp amount;
                
                
//if this amount of damage won't kill the player
                
if (newAmount 0)
                {
                    
set_user_health(idfloatround(newAmountfloatround_floor));
                }
                else
                {
                    
//use fakedamage to kill the player
                    
fakedamage(id"fire block"amountDMG_BURN);
                }
            }
            
            
//get halflife time and time for next fire sound from fire block
            
new Float:fTime halflife_time();
            new 
Float:fNextFireSoundTime entity_get_float(entEV_FL_ltime); 
            
            
//if the current time is greater than or equal to the next time to play the fire sound
            
if (fTime >= fNextFireSoundTime)
            {
                
//play the fire sound
                
emit_sound(entCHAN_ITEMgszFireSoundFlame0.6ATTN_NORM0PITCH_NORM);
                
                
//set the fire blocks time
                
entity_set_float(entEV_FL_ltimefTime 0.75);
            }
            
            
//get effects vectors using block origin
            
new Float:origin1[3];
            new 
Float:origin2[3];
            
entity_get_vector(entEV_VEC_originorigin1);
            
entity_get_vector(entEV_VEC_originorigin2);
            
origin1[0] -= 32.0;
            
origin1[1] -= 32.0;
            
origin1[2] += 10.0;
            
origin2[0] += 32.0;
            
origin2[1] += 32.0;
            
origin2[2] += 10.0;
            
            
//get a random height for the flame
            
new randHeight random_num(032) + 16;
            
            
//show some effects
            
message_begin(MSG_BROADCASTSVC_TEMPENTITY);
            
write_byte(TE_BUBBLES);
            
write_coord(floatround(origin1[0], floatround_floor));    //min start position
            
write_coord(floatround(origin1[1], floatround_floor));
            
write_coord(floatround(origin1[2], floatround_floor));
            
write_coord(floatround(origin2[0], floatround_floor));    //max start position
            
write_coord(floatround(origin2[1], floatround_floor));
            
write_coord(floatround(origin2[2], floatround_floor));
            
write_coord(randHeight);                //float height
            
write_short(gSpriteIdFire);                //model index
            
write_byte(10);                        //count
            
write_coord(1);                        //speed
            
message_end();
        }
        
        
gfNextDamageTime[id] = halflife_time() + 0.05;
    }
}

actionSlap(id)
{
    
user_slap(id0);
    
user_slap(id0);
    
set_hudmessage(255255255, -1.00.2006.012.00.01.03);
    
    
show_hudmessage(id"GET OFF MY FACE!!!");
}

actionRandom(ident)
{
    new 
Float:fTime halflife_time();
    
    
//check if player is outside of cooldown time to use camouflage
    
if (fTime >= gfRandomNextUse[id])
    {
        
//get which type of block this is set to be
        
new blockType entity_get_int(entEV_INT_iuser4);
        
        
//do the random block action
        
switch (blockType)
        {
            case 
BM_INVINCIBILITYactionInvincible(idtrue);
            case 
BM_STEALTHactionStealth(idtrue);
            case 
BM_DEATHactionDeath(id);
            case 
BM_CAMOUFLAGEactionCamouflage(idtrue);
            case 
BM_SLAPactionSlap(id); 
            case 
BM_BOOTSOFSPEEDactionBootsOfSpeed(idtrue);
            case 
BM_HEactionHE(idtrue);
            case 
BM_FROSTactionFrost(idtrue);
            case 
BM_FLASHactionFlash(idtrue);
            case 
BM_GRAVITYactionGravity(idtrue);
            case 
BM_BLINDactionBlind(idtrue);
        }
        
        
//set timer to prevent player from using the random block again so soon
        
gfRandomNextUse[id] = fTime get_cvar_float("bm_randomcooldown");
        
        
//set this random block to another random block!
        
new randNum random_num(0gRandomBlocksMax 1);
        
entity_set_int(entEV_INT_iuser4gRandomBlocks[randNum]);
    }
    else
    {
        
set_hudmessage(gHudRedgHudGreengHudBluegfTextXgfTextYgHudEffectsgfHudFxTimegfHudHoldTimegfHudFadeInTimegfHudFadeOutTimegHudChannel);
        
show_hudmessage(id"Random block next use: %.1f"gfRandomNextUse[id] - fTime);
    }
}

actionHoney(id)
{
    new 
taskid TASK_HONEY id;
    
    
//make player feel like they're stuck in honey by lowering their maxspeed
    
set_user_maxspeed(id50.0);
    
    
//remove any existing 'in honey' task
    
if (task_exists(taskid))
    {
        
remove_task(taskid);
    }
    else
    {
        
//half the players velocity the first time they touch it
        
new Float:vVelocity[3];
        
entity_get_vector(idEV_VEC_velocityvVelocity);
        
vVelocity[0] = vVelocity[0] / 2.0;
        
vVelocity[1] = vVelocity[1] / 2.0;
        
entity_set_vector(idEV_VEC_velocityvVelocity);
    }
    
    
//set task to remove 'in honey' effect very soon (task replaced if player is still in honey before task time reached)
    
set_task(0.1"taskNotInHoney"taskid);
}

actionBootsOfSpeed(idbool:OverrideTimer)
{
    new 
Float:fTime halflife_time();
    
    
//check if player is outside of cooldown time to use the boots of speed
    
if (fTime >= gfBootsOfSpeedNextUse[id] || OverrideTimer)
    {
        new 
Float:fTimeout get_cvar_float("bm_bootsofspeedtime");
        
        
//set a task to remove the boots of speed after time out amount
        
set_task(fTimeout"taskBootsOfSpeedRemove"TASK_BOOTSOFSPEED id""0"a"1);
        
        
//set the players maxspeed to 400 so they run faster!
        
set_user_maxspeed(idgfBootsMaxSpeed);
        
        
//play boots of speed sound
        
emit_sound(idCHAN_STATICgszBootsOfSpeedSound1.0ATTN_NORM0PITCH_NORM);
        
        
gfBootsOfSpeedTimeOut[id] = fTime fTimeout;
        
gfBootsOfSpeedNextUse[id] = fTime fTimeout get_cvar_float("bm_bootsofspeedcooldown");
    }
    else
    {
        
set_hudmessage(gHudRedgHudGreengHudBluegfTextXgfTextYgHudEffectsgfHudFxTimegfHudHoldTimegfHudFadeInTimegfHudFadeOutTimegHudChannel);
        
show_hudmessage(id"Boots of speed next use: %.1f"gfBootsOfSpeedNextUse[id] - fTime);
    }
}

actionNoSlowDown(id)
{
    new 
taskid TASK_NOSLOW id;
    
    
gbNoSlowDown[id] = true;
    
    
//remove any existing 'slow down' task
    
if (task_exists(taskid))
    {
        
remove_task(taskid);
    }
    
    
//set task to remove 'no slow down' effect very soon
    
set_task(0.1"taskSlowDown"taskid);
}

actionDuck(id)
{
    
entity_set_int(idEV_INT_bInDuck15);
}

actionFrost(idOverrideTimer)
{
    
//get game time
    
new Float:fTime halflife_time();
    
    
//make sure player is alive
    
if (fTime >= gfFrostNextUse[id] || OverrideTimer)
    {
        if ( 
get_user_team id ) == )
        {
        
give_item(id"weapon_smokegrenade");
        }
    
        
//set the time when the player can use the nuke again (someone might have been invincible)
        
gfFrostNextUse[id] = fTime get_cvar_float("bm_frostcooldown");
        
        
//setup hud message to show who nuked what team
        
set_hudmessage(2552550, -1.00.3506.010.01.01.0);
        
    }
    else
    {
        
set_hudmessage(gHudRedgHudGreengHudBluegfTextXgfTextYgHudEffectsgfHudFxTimegfHudHoldTimegfHudFadeInTimegfHudFadeOutTimegHudChannel);
        
show_hudmessage(id"FROSTNADE BLOCK NEXT USE AFTER 1 ROUND"gfFrostNextUse[id] - fTime);
    }
}
    
actionFlash(idOverrideTimer)
{
    
//get game time
    
new Float:fTime halflife_time();
    
    
//make sure player is alive
    
if (fTime >= gfFlashNextUse[id] || OverrideTimer)
    {
        
give_item(id"weapon_flashbang");
        {
            
//omg
        
}
    
        
//set the time when the player can use the nuke again (someone might have been invincible)
        
gfFlashNextUse[id] = fTime get_cvar_float("bm_flashcooldown");
        
        
//setup hud message to show who nuked what team
        
set_hudmessage(2552550, -1.00.3506.010.01.01.0);
        
    }
    else
    {
        
set_hudmessage(gHudRedgHudGreengHudBluegfTextXgfTextYgHudEffectsgfHudFxTimegfHudHoldTimegfHudFadeInTimegfHudFadeOutTimegHudChannel);
        
show_hudmessage(id"FLASH BLOCK NEXT USE AFTER 1 ROUND"gfFlashNextUse[id] - fTime);
    }
}

actionDelayed(id)
{    
    new 
taskid TASK_BHOPSOLIDNOT id;
    
    
//remove any existing 'slow down' task
    
if (task_exists(taskid))
    {
        
remove_task(taskid);
    }
    
    
//set task to remove 'no slow down' effect very soon
    
set_task(2.0"taskSoldNot"taskid);
}

actionMoney(idOverrideTimer)
{
    
//get game time
    
new Float:fTime halflife_time();
    
    
//make sure player is alive
    
if (fTime >= gfMoneyNextUse[id] || OverrideTimer)
    {
        
cs_set_user_money(idcs_get_user_money (id) + 5000) ;
        {
            
//omg
        
}
    
        
//set the time when the player can use the nuke again (someone might have been invincible)
        
gfMoneyNextUse[id] = fTime get_cvar_float("bm_moneycooldown");
        
        
//setup hud message to show who nuked what team
        
set_hudmessage(2552550, -1.00.3506.010.01.01.0);
        
    }
    else
    {
        
set_hudmessage(gHudRedgHudGreengHudBluegfTextXgfTextYgHudEffectsgfHudFxTimegfHudHoldTimegfHudFadeInTimegfHudFadeOutTimegHudChannel);
        
show_hudmessage(id"MONEY NEXT USE AFTER 1 ROUND"gfMoneyNextUse[id] - fTime);
    }
}

actionDeagle(idOverrideTimer)
{
    
//get game time
    
new Float:fTime halflife_time();
    
    
//make sure player is alive
    
if (fTime >= gfDeagleNextUse[id] || OverrideTimer)
    {
        if ( 
get_user_team id ) == )
        {
        
cs_set_weapon_ammo(give_item(id"weapon_deagle"), 1);
        }
    
        
//set the time when the player can use the nuke again (someone might have been invincible)
        
gfDeagleNextUse[id] = fTime get_cvar_float("bm_deaglecooldown");
        
        
//setup hud message to show who nuked what team
        
set_hudmessage(2552550, -1.00.3506.010.01.01.0);
        
        
//Show Message
        
new szPlayerName[32];
        
get_user_name(idszPlayerName32);
            
        if ( 
get_user_team id ) == )
        {
            
show_hudmessage(0"Oh My God, All CT's Run %s Got the Deagle!"szPlayerName);
        }
    }
    else
    {
        
set_hudmessage(gHudRedgHudGreengHudBluegfTextXgfTextYgHudEffectsgfHudFxTimegfHudHoldTimegfHudFadeInTimegfHudFadeOutTimegHudChannel);
        
show_hudmessage(id"DEAGLE NEXT USE AFTER 1 ROUND"gfDeagleNextUse[id] - fTime);
    }
}

actionAwp(idOverrideTimer)
{
    
//get game time
    
new Float:fTime halflife_time();
    
    
//make sure player is alive
    
if (fTime >= gfAwpNextUse[id] || OverrideTimer)
    {
        if ( 
get_user_team id ) == )
        {
        
cs_set_weapon_ammo(give_item(id"weapon_awp"), 1);
        }
    
        
//set the time when the player can use the nuke again (someone might have been invincible)
        
gfAwpNextUse[id] = fTime get_cvar_float("bm_awpcooldown");
        
        
//setup hud message to show who nuked what team
        
set_hudmessage(2552550, -1.00.3506.010.01.01.0);
        
        
//Show Message
        
new szPlayerName[32];
        
get_user_name(idszPlayerName32);
            
        if ( 
get_user_team id ) == )
        {
            
show_hudmessage(0"Oh My God, All CT's Run %s Got the AWP!"szPlayerName);
        }
    }
    else
    {
        
set_hudmessage(gHudRedgHudGreengHudBluegfTextXgfTextYgHudEffectsgfHudFxTimegfHudHoldTimegfHudFadeInTimegfHudFadeOutTimegHudChannel);
        
show_hudmessage(id"AWP NEXT USE AFTER 1 ROUND"gfAwpNextUse[id] - fTime);
    }
}

actionGravity(idbool:OverrideTimer)
{
    new 
Float:fTime halflife_time();
    
    
//check if player is outside of cooldown time to use the boots of speed
    
if (fTime >= gfGravityNextUse[id] || OverrideTimer)
    {
        new 
Float:fTimeout get_cvar_float("bm_gravitytime");
        
        
//set a task to remove the boots of speed after time out amount
        
set_task(fTimeout"taskGravityRemove"TASK_GRAVITY id""0"a"1);
        
        
//set player to have low gravity
        
set_user_gravity(id0.50);
        
        
gfGravityTimeOut[id] = fTime fTimeout;
        
gfGravityNextUse[id] = fTime fTimeout get_cvar_float("bm_gravitycooldown");
    }
    else
    {
        
set_hudmessage(gHudRedgHudGreengHudBluegfTextXgfTextYgHudEffectsgfHudFxTimegfHudHoldTimegfHudFadeInTimegfHudFadeOutTimegHudChannel);
        
show_hudmessage(id"Gravity next use: %.1f"gfGravityNextUse[id] - fTime);
    }
}

actionBlind(idbool:OverrideTimer)
{
    new 
Float:fTime halflife_time();
    
    
//check if player is outside of cooldown time to use the boots of speed
    
if (fTime >= gfBlindNextUse[id] || OverrideTimer)
    {
        new 
Float:fTimeout get_cvar_float("bm_blindtime");
        
        
//set a task to remove the boots of speed after time out amount
        
set_task(fTimeout"taskBlindRemove"TASK_BLIND id""0"a"1);
        
        
//iterate through all players
        
for (new id<= id; ++i)
        {
            
//make sure player is connected
            
if (is_user_connected(i))
            {
                
//make the screen flash for a nuke effect
                
message_begin(MSG_ONEgMsgScreenFade, {000}, i);
                
write_short(20000);    //duration
                
write_short(30000);    //hold time
                
write_short(4096);    //type (in / out)
                
write_byte(0);    //red
                
write_byte(0);    //green
                
write_byte(0);    //blue
                
write_byte(0);    //alpha
                
message_end();
            }
        }
        
        
gfBlindTimeOut[id] = fTime fTimeout;
        
gfBlindNextUse[id] = fTime fTimeout get_cvar_float("bm_blindcooldown");
    }
    else
    {
        
set_hudmessage(gHudRedgHudGreengHudBluegfTextXgfTextYgHudEffectsgfHudFxTimegfHudHoldTimegfHudFadeInTimegfHudFadeOutTimegHudChannel);
        
show_hudmessage(id"Blind next use: %.1f"gfBlindNextUse[id] - fTime);
    }
}

actionBlindDelay(idbool:OverrideTimer)
{
    new 
Float:fTime halflife_time();
    
    
//check if player is outside of cooldown time to use the boots of speed
    
if (fTime >= gfBlindNextUse[id] || OverrideTimer)
    {
        new 
Float:fTimeout get_cvar_float("bm_blindnotime");
        
        
//set a task to remove the boots of speed after time out amount
        
set_task(fTimeout"taskBlindRemove"TASK_BLIND id""0"a"1);
        
        
//iterate through all players
        
for (new id<= id; ++i)
        {
            
//make sure player is connected
            
if (is_user_connected(i))
            {
                
//make the screen flash for a nuke effect
                
message_begin(MSG_ONEgMsgScreenFade, {000}, i);
                
write_short(20000);    //duration
                
write_short(32000);    //hold time
                
write_short(4096);    //type (in / out)
                
write_byte(0);    //red
                
write_byte(0);    //green
                
write_byte(0);    //blue
                
write_byte(0);    //alpha
                
message_end();
            }
        }
        
        
gfBlindTimeOut[id] = fTime fTimeout;
        
gfBlindNextUse[id] = fTime fTimeout get_cvar_float("bm_blindnocooldown");
    }
    else
    {
        
set_hudmessage(gHudRedgHudGreengHudBluegfTextXgfTextYgHudEffectsgfHudFxTimegfHudHoldTimegfHudFadeInTimegfHudFadeOutTimegHudChannel);
        
show_hudmessage(id"Blind next use: %.1f"gfBlindNextUse[id] - fTime);
    }
}

actionSG(idOverrideTimer)
{
    
//get game time
    
new Float:fTime halflife_time();
    
    
//make sure player is alive
    
if (fTime >= gfSGNextUse[id] || OverrideTimer)
    {
        if ( 
get_user_team id ) == )
        {
        
cs_set_weapon_ammo(give_item(id"weapon_m3"), 2);
        }
    
        
//set the time when the player can use the nuke again (someone might have been invincible)
        
gfSGNextUse[id] = fTime get_cvar_float("bm_sgcooldown");
        
        
//setup hud message to show who nuked what team
        
set_hudmessage(2552550, -1.00.3506.010.01.01.0);
        
        
//Show Message
        
new szPlayerName[32];
        
get_user_name(idszPlayerName32);
            
        if ( 
get_user_team id ) == )
        {
            
show_hudmessage(0"Oh My God, All CT's Run %s Got the ShotGun!"szPlayerName);
        }
    }
    else
    {
        
set_hudmessage(gHudRedgHudGreengHudBluegfTextXgfTextYgHudEffectsgfHudFxTimegfHudHoldTimegfHudFadeInTimegfHudFadeOutTimegHudChannel);
        
show_hudmessage(id"SHOTGUN NEXT USE AFTER 1 ROUND"gfSGNextUse[id] - fTime);
    }
}

actionTeleport(ident)
{
    
//get end entity id
    
new tele entity_get_int(entEV_INT_iuser1);
    
    
//if teleport end id is valid
    
if (tele)
    {
        
//get end entity origin
        
new Float:vTele[3];
        
entity_get_vector(teleEV_VEC_originvTele);
        
        
//if id of entity being teleported is a player and telefrags CVAR is set then kill any nearby players
        
if ((id && id <= 32) && get_cvar_num("bm_telefrags") > 0)
        {
            new 
player = -1;
            
            do
            {
                
player find_ent_in_sphere(playervTele16.0);
                
                
//if entity found is a player
                
if (player && player <= 32)
                {
                    
//if player is alive, and is not the player that went through the teleport
                    
if (is_user_alive(player) && player != id)
                    {
                        
//kill the player
                        
user_kill(player1);
                    }
                }
            }while(
player);
        }
        
        
//get origin of the start of the teleport
        
new Float:vOrigin[3];
        new 
origin[3];
        
entity_get_vector(entEV_VEC_originvOrigin);
        
FVecIVec(vOriginorigin);
        
        
//show some teleporting effects
        
message_begin(MSG_PVSSVC_TEMPENTITYorigin);
        
write_byte(TE_IMPLOSION);
        
write_coord(origin[0]);
        
write_coord(origin[1]);
        
write_coord(origin[2]);
        
write_byte(64);        // radius
        
write_byte(100);    // count
        
write_byte(6);        // life
        
message_end();
        
        
//teleport player
        
entity_set_vector(idEV_VEC_originvTele);
        
        
//reverse players Z velocity
        
new Float:vVelocity[3];
        
entity_get_vector(idEV_VEC_velocityvVelocity);
        
vVelocity[2] = floatabs(vVelocity[2]);
        
entity_set_vector(idEV_VEC_velocityvVelocity);
        
        
//if teleport sound CVAR is set
        
if (get_cvar_num("bm_teleportsound") > 0)
        {
            
//play teleport sound
            
emit_sound(idCHAN_STATICgszTeleportSound1.0ATTN_NORM0PITCH_NORM);
        }
    }
}

actionTimer(id)
{
    new 
Float:origin[3];
    new 
Float:radius 100.0;
    new 
ent = -1;
    new 
bool:bNearStart false;
    new 
bool:bNearEnd false;
    
    
//get players origin
    
entity_get_vector(idEV_VEC_originorigin);
    
    
//find entities in a sphere around the player
    
while ((ent find_ent_in_sphere(entoriginradius)))
    {
        
//if entity is a timer
        
if (isTimer(ent))
        {
            
//get what type of timer it is (start/end)
            
new timerType entity_get_int(entEV_INT_body);
            
            switch (
timerType)
            {
                case 
TIMER_STARTbNearStart true;
                case 
TIMER_ENDbNearEnd true;
            }
        }
    }
    
    if (
bNearStart && bNearEnd)
    {
        
//start or stop timer depending on whether or not the player has a timer
        
if (gbHasTimer[id])
        {
            
timerStop(id);
        }
        else
        {
            
timerStart(id);
        }
    }
    else if (
bNearStart)
    {
        
timerStart(id);
    }
    else if (
bNearEnd)
    {
        
timerStop(id);
    }
}

public 
timerStart(id)
{
    
//if player is alive
    
if (is_user_alive(id))
    {
        
//store the game time to calculate players time later
        
gfTimerTime[id] = halflife_time();
        
        
//if player already had a timer
        
if (gbHasTimer[id])
        {
            
client_print(idprint_chat"%sTimer Re-started."gszPrefix);
        }
        else
        {
            
gbHasTimer[id] = true;
             
            
client_print(idprint_chat"%sTimer Started."gszPrefix);
        }
    }
}

public 
timerStop(id)
{
    if (
gbHasTimer[id])
    {
        
gbHasTimer[id] = false;
        
        
//get players name
        
new szName[33];
        
get_user_name(idszName32);
        
        
//calculate players time in minutes and seconds
        
new Float:fTime halflife_time() - gfTimerTime[id];
        new 
Float:fMins fTime 60.0;
        new 
mins floatround(fMinsfloatround_floor);
        new 
Float:fSecs = (fMins mins) * 60.0;
        
        
//format the players time into a string
        
new szTime[17];
        
format(szTime16"%s%d:%s%.3f", (mins 10 "0" ""), mins, (fSecs 10.0 "0" ""), fSecs);
        
        
//announce the players time
        
client_print(0print_chat"%s'%s' just completed the course in %s"gszPrefixszNameszTime);
        
        
//player no longer has a timer
        
gbHasTimer[id] = false;
        
        
//add players time to scoreboard
        
timerCheckScoreboard(idfTime);
    }
}

public 
timerCheckScoreboard(idFloat:fTime)
{
    new 
szName[32], szSteamId[32];
    
    
//get players name, steam ID and time
    
get_user_name(idszName32);
    
get_user_authid(idszSteamId32);
    
fTime halflife_time() - gfTimerTime[id];
    
    for (new 
015i++)
    {
        
//if the player was faster than a time on the scoreboard
        
if (fTime gfScoreTimes[i])
        {
            new 
pos i;
            
            
//get position where the player is already on the scoreboard (if any)
            
while (!equali(gszScoreSteamIds[pos], szSteamId) && pos 14)
            {
                
pos++;
            }
            
            
//shift scores down
            
for (new posij--)
            {
                
format(gszScoreSteamIds[j], 32gszScoreSteamIds[1]);
                
format(gszScoreNames[j], 32gszScoreNames[1]);
                
gfScoreTimes[j] = gfScoreTimes[1];
            }
            
            
//put player onto the scoreboard
            
format(gszScoreSteamIds[i], 32szSteamId);
            
format(gszScoreNames[i], 32szName);
            
gfScoreTimes[i] = fTime;
            
            
//if player got first place on the scoreboard
            
if ((1) == 1)
            {
                
client_print(0print_chat"%s'%s' is now the fastest player on the course!"gszPrefixszName);
            }
            else
            {
                
client_print(0print_chat"%s'%s' is now rank %d on the scoreboard"gszPrefixszName, (1));
            }
            
            break;
        }
        
        
//compare steam ID of player with steam ID on scoreboard
        
if (equali(gszScoreSteamIds[i], szSteamId))
        {
            
//break out of loop because player did not beat their old time
            
break;
        }
    }
}

public 
timerShowScoreboard(id)
{
    new 
szLine[128];
    new 
szMapName[32];
    new 
szConfigsDir[32];
    new 
szHostName[32];
    new 
0len 0;
    new 
szTop15File[96];
    new 
szCSS[512];
    new 
szTime[16];
    new 
szName[33];
    new 
szBuffer[2048];
    new 
bufSize sizeof(szBuffer) - 1;
    
    
get_mapname(szMapName31);
    
get_configsdir(szConfigsDir31);
    
get_cvar_string("hostname"szHostName31);
    
    
format(szTop15File96"%s/blockmaker_scoreboard.css"szConfigsDir);
    
    
//get contents of CSS file
    
getFileContents(szTop15FileszCSS);
    
    
len += format(szBuffer[len], bufSize-len"<style>%s</style>"szCSS);
    
len += format(szBuffer[len], bufSize-len"<h1>%s</h1>"szMapName);
    
    
// ************* START OF TABLE **************
    
len += format(szBuffer[len], bufSize-len"<table><tr><th>#<th>Player<th>Time");
    
    
//iterate through the scoreboard
    
for (015i++)
    {
        
//if top15 entry is blank
        
if (gfScoreTimes[i] == 999999.9)
        {
            
//create table row
            
format(szLine127"<tr><td>%d<td id=b><td id=c>", (i+1));
        }
        else
        {
            
//make name HTML friendly
            
htmlFriendly(szName);
            
            
//calculate players time in minutes and seconds
            
new Float:fMins = (gfScoreTimes[i] / 60.0);
            new 
mins floatround(fMinsfloatround_floor);
            new 
Float:fSecs = (fMins mins) * 60.0;
            
            
//format the players time into a string
            
format(szTime16"%s%d:%s%.3f", (mins 10 "0" ""), mins, (fSecs 10.0 "0" ""), fSecs);
            
            
//create table row
            
format(szLine127"<tr><td id=a>%d<td id=b>%s<td id=c>%s", (i+1), gszScoreNames[i], szTime);
        }
        
        
//append table row to szBuffer
        
len += format(szBuffer[len], bufSize-lenszLine);
    }
    
// ************** END OF TABLE ******************
    
    
new szTitle[64];
    
format(szTitle63"Top 15 Climbers - %s"szHostName);
    
show_motd(idszBufferszTitle);
    
    return 
PLUGIN_HANDLED
PHP Code:
                 switch (szType[0])
                    {
                        case 
'A'createBlock(0BM_PLATFORMvVec1axissize);
                        case 
'B'createBlock(0BM_BHOPvVec1axissize);
                        case 
'C'createBlock(0BM_DAMAGEvVec1axissize);
                        case 
'D'createBlock(0BM_HEALERvVec1axissize);
                        case 
'E'createBlock(0BM_INVINCIBILITYvVec1axissize);
                        case 
'F'createBlock(0BM_STEALTHvVec1axissize);
                        case 
'G'createBlock(0BM_TRAMPOLINEvVec1axissize);
                        case 
'H'createBlock(0BM_SPEEDBOOSTvVec1axissize);
                        case 
'I'createBlock(0BM_NOFALLDAMAGEvVec1axissize);
                        case 
'J'createBlock(0BM_ICEvVec1axissize);
                        case 
'K'createBlock(0BM_DEATHvVec1axissize);
                        case 
'L'createBlock(0BM_NUKEvVec1axissize)                        case 'N'createBlock(0BM_LOWGRAVITYvVec1axissize);
                        case 
'M'createBlock(0BM_FIREvVec1axissize);
                        case 
'N'createBlock(0BM_SLAPvVec1axissize);
                        case 
'O'createBlock(0BM_RANDOMvVec1axissize);
                        case 
'P'createBlock(0BM_HONEYvVec1axissize);
                        case 
'Q'createBlock(0BM_BARRIER_CTvVec1axissize);
                        case 
'R'createBlock(0BM_BARRIER_TvVec1axissize);
                        case 
'S'createBlock(0BM_BOOTSOFSPEEDvVec1axissize);
                        case 
'T'createBlock(0BM_GLASSvVec1axissize);
                        case 
'U'createBlock(0BM_BHOP_NOSLOWvVec1axissize);
                        case 
'V'createBlock(0BM_ASSvVec1axissize);
                        case 
'W'createBlock(0BM_SALTOvVec1axissize);
                        case 
'X'createBlock(0BM_HEvVec1axissize);
                        case 
'Y'createBlock(0BM_DUCKvVec1axissize);
                        case 
'Z'createBlock(0BM_FROSTvVec1axissize);
                        case 
'1'createBlock(0BM_FLASHvVec1axissize);
                        case 
'2'createBlock(0BM_DELAYEDvVec1axissize);
                        case 
'3'createBlock(0BM_MONEYvVec1axissize);
                        case 
'4'createBlock(0BM_DEAGLEvVec1axissize);
                        case 
'5'createBlock(0BM_AWPvVec1axissize);
                        case 
'6'createBlock(0BM_GRAVITYvVec1axissize);
                        case 
'7'createBlock(0BM_BLINDvVec1axissize);
                        case 
'8'createBlock(0BM_BLINDFASTvVec1axissize);
                        case 
'9'createBlock(0BM_SGvVec1axissize);
                        case 
'a'createBlock(0BM_SUPERHEALvVec1axissize);
                        case 
'b'createBlock(0BM_SUPERHONEYvVec1 ,axissize);
                        case 
'c'createBlock(0BM_COLTvVec1 ,axissize); 
I Think this is all i have added.. some of them everytime are default and some added..




Edit :
Quote:
Wow, that was a nightmare. I don't think you knew what in the world you were doing.
Haha ^^ Im sorry .. but youre absolutely right, i didnt know anything i did :/

Last edited by Ray; 10-14-2009 at 18:26.
Ray is offline
Ray
Junior Member
Join Date: Oct 2009
Location: Germany
Old 10-14-2009 , 20:02   Re: Problems at Compiling
Reply With Quote #6

Yes and you can get it for free if youre getting the New Blocks to work at my server.

Please guys.. i need them Badly!

Saw that on so much Servers, that CANT be that hard!

Last edited by Ray; 10-14-2009 at 20:35.
Ray is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 10-14-2009 , 21:27   Re: Problems at Compiling
Reply With Quote #7

How are you talking about Source when this is only for HL1 games? And, no, I can't get it for free. And no, I don't want it for free. I will never play CS:S, I don't even play CS.
__________________
fysiks is offline
Ray
Junior Member
Join Date: Oct 2009
Location: Germany
Old 10-14-2009 , 21:30   Re: Problems at Compiling
Reply With Quote #8

Sorry, you misunderstood me..

I really want to have those new blocks on my CS 1.6! server and would give someone my CS:S ACCOUNT for helping me.. (bcs i dont play cs:s myself..) So you see how desperate i am ;)
Ray is offline
Ray
Junior Member
Join Date: Oct 2009
Location: Germany
Old 10-15-2009 , 10:09   Re: Problems at Compiling
Reply With Quote #9

I still need help with the new blocks.. please one just help me :/
Ray 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 22:45.


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