AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Block Maker Code (https://forums.alliedmods.net/showthread.php?t=116570)

boltah 01-24-2010 08:14

Block Maker Code
 
Hey there!

I need some help on my block maker. Dont know the exact code for some things.

Code:

new const g_model_Trampoline[] =                  "models/stressless/trampoline.mdl";
It says : Warning 203: Symbol is never used: "g_model_trampoline"



Code:

new iHealth = get_user_health( id );
    if( iHealth >= 100 || iHealth == 250 ) return PLUGIN_HANDLED;
   
    if( iHealth < 100 )
    {
        iHealth = min( 100, iHealth + floatround(get_cvar_float("bm_healamount"), floatround_floor) );
    }
    else //if( iHealth > 100 )
    {
        return PLUGIN_HANDLED;
    }
   
    set_user_health(id, iHealth);

What should i add to the health thing to get my healer get more than 100 HP?

I got EXolents XP mod. And when I got 120 hp for example, the healer wont heal me if im going down to 110 HP.

Anyone can help me?

Kaaba 01-24-2010 08:17

Re: Block Maker Code
 
http://forums.alliedmods.net/showthread.php?t=107153

boltah 01-24-2010 08:40

Re: Block Maker Code
 
Many other treads is in this forum. And its not a request, its a question about help on scripting

RelaxMazteR 01-24-2010 08:50

Re: Block Maker Code
 
It means that it is never used. You should add this
gszBlockModels[BM_TRAMPOLINE] = g_model_Trampoline;
in plugin_precache

Subject healer, use this code instead
if (halflife_time() >= gfNextHealTime[id])
{
new iHealth = ( get_user_health( id ) );

if( iHealth < 100 ) {
set_pev( id, pev_health, float( iHealth ) );
} else {
if( get_user_health( id ) < 100 )
set_pev( id, pev_health, 100.0 );
}
}
}

boltah 01-24-2010 09:13

Re: Block Maker Code
 
Dont works

Gets alot errors and wont compile

RelaxMazteR 01-24-2010 09:57

Re: Block Maker Code
 
send me the errors then

boltah 01-24-2010 10:35

Re: Block Maker Code
 
Undefined symbol "g_model_trampoline"

error 033: array must be indexed (variable gszBlockModels

zacky 01-24-2010 12:09

Re: Block Maker Code
 
Quote:

Originally Posted by boltah (Post 1065717)
Undefined symbol "g_model_trampoline"

error 033: array must be indexed (variable gszBlockModels

Undefined symbol "g_model_trampoline" - This means g_model_trampoline doesn't exist.

error 033: array must be indexed (variable gszBlockModels) - This means gszBlockModels needs to be indexed, for example gszBlockModels[6], but in your case you should have gszBlockModels[BM_TRAMPOLINE]

Sn!ff3r 01-24-2010 14:37

Re: Block Maker Code
 
Case sensitive.


All times are GMT -4. The time now is 07:20.

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