AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Blowback Bob help (https://forums.alliedmods.net/showthread.php?t=17429)

-(A99)- | sk8er 08-31-2005 20:07

Blowback Bob help
 
sh_blowbackbob.sma(130) : error 017: undefined symbol "enemyPushed"\

Code:
//---------------------------------------------------------------------------------------------- public force_wind(id) {     {     new team[33], players[32], pnum, origin[3], vorigin[3], parm[4]     new Float:tempVelocity[3] = {0.0, 0.0, 200.0}     new bool:enemyPushed = false     get_user_team(id, team, 32)     // Find all alive enemies     if ( equali(team, "CT") ) {         get_players(players, pnum, "ae", "TERRORIST")     }     else {         get_players(players, pnum, "ae", "CT")     }     get_user_origin(id, origin)     for ( new victim = 0; victim < pnum; victim++ ) {         get_user_origin(players[victim], vorigin)         if ( get_distance(origin, vorigin) < get_cvar_num("bob_radius") ) {             // Set cooldown/sound/self damage only once, if push is used             if ( !enemyPushed ) {                 if (get_cvar_float("bob_cooldown") > 0.0) ultimateTimer(id, get_cvar_float("bob_cooldown"))                 }                 enemyPushed = true             }             // Stun enemy makes them easier to push             shStun(players[victim], 1)             set_user_maxspeed(players[victim], 1.0)             // First lift them             Entvars_Set_Vector(players[victim], EV_VEC_velocity, tempVelocity)             // Then push them back in x seconds after lift and do some damage             set_task(0.1, "move_enemy", 0, parm, 4)         }     }     if ( !enemyPushed && is_user_alive(id) ) {         client_print(id, print_chat, "[SH](Blowback Bob) No one around")     } } //----------------------------------------------------------------------------------------------

can any1 help me

v3x 08-31-2005 20:12

Code:
public force_wind(id) {     { // remove this

-(A99)- | sk8er 08-31-2005 20:59

that made it worse

Sp4rt4n 08-31-2005 22:17

somewhere in there there is an extra '{' though

GHW_Chronic 08-31-2005 22:38

Re: Blowback Bob help
 
Code:

            if ( !enemyPushed ) {
                if (get_cvar_float("bob_cooldown") > 0.0) ultimateTimer(id, get_cvar_float("bob_cooldown"))

                }
                enemyPushed = true
            }

That is all wrongly punctuated. I dunno what you are even trying to do... And also what v3x said to do was correct as well.

GHW_Chronic 08-31-2005 22:41

Re: Blowback Bob help
 
Code:

            if ( !enemyPushed && get_cvar_float("bob_cooldown") > 0.0) {
                    ultimateTimer(id, get_cvar_float("bob_cooldown"))
                    enemyPushed = true
            }

Should work, i think thats what u want to do (and do what v3x said...still)


All times are GMT -4. The time now is 14:30.

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