Raised This Month: $51 Target: $400
 12% 

mosquito


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
notorious-sk8er
Senior Member
Join Date: Jun 2005
Old 09-07-2005 , 21:31   mosquito
Reply With Quote #1

i need help
when i compile my hero i get these errors

Code:
sh_mosquito.sma(3) : error 010: invalid function or declaration
sh_mosquito.sma(6) : error 010: invalid function or declaration
sh_mosquito.sma(728) : error 001: expected token: "*/", but found "-end of file-
"
sh_mosquito.sma(728) : error 013: no entry point (no public functions)

4 Errors.
Small compiler 2.1.0            Copyright (c) 1997-2002, ITB CompuPhase
how can i fix it
Attached Files
File Type: sma Get Plugin or Get Source (sh_mosquito.sma - 103 views - 19.1 KB)
notorious-sk8er is offline
Batman/Gorlag
Senior Member
Join Date: Aug 2005
Old 09-07-2005 , 21:37  
Reply With Quote #2

Try copying and paste this code, hopefully that will fix the error.
Code:
//Mosquito /*CVARS copy and paste to shconfig.cfg //Mosquito mos_level 5     //level mos_pctperlvl 1.0   //how much life he gets from shooting ppl mos_toggle 0    //(def 0=no, key must be held down to fly) (1=yes, toggle flying) mos_flybeforeftime 0    //Fly before freezetime is over, 0=no 1=yes (def=0) mos_flyspeed 450    //speed of flying */ #include <amxmod> #include <Vexd_Utilities> #include <superheromod> #if defined AMX98     #include <xtrafun>  //Only for the constants, doesn't use any functions #endif //GLOBAL VARIABLES new gHeroName[]="Mosquito" new gHasMosquitoPower[SH_MAXSLOTS+1] new bool: isflying[SH_MAXSLOTS+1] new bool: roundfreeze new Float: Velocity[SH_MAXSLOTS+1][3] new new Float:gMultiplier //---------------------------------------------------------------------------------------------- public plugin_init() {     // Plugin Info     register_plugin("SUPERHERO Mosquito", "1.0", "sk8er")         // DO NOT EDIT THIS FILE TO CHANGE CVARS, USE THE SHCONFIG.CFG     register_cvar("mos_level", "5")     register_cvar("mos_pctperlevel", "1.0")     register_cvar("mos_toggle", "0")     register_cvar("mos_flybeforetime", "0")     register_cvar("mos_flyspeed", "450")         //FIRE THIS EVENT TO CREATE THIS HERO     shCreateHero(gHeroName, "Fly/Life Steal", "Flying and Steal life from people you shoot", false, "mos_level")         // REGISTER EVENTS THIS HERO WILL RESPOND TO! (AND SERVER COMMANDS)     // INIT     register_srvcmd("mos_init", "mos_init")     shRegHeroInit(gHeroName, "mos_init")         // LEVELS     register_srvcmd("mos_levels", "mos_levels")     shRegLevels(gHeroName,"mos_levels")     // GET MORE ENERGY!     register_event("Damage", "mos_damage", "b", "2!0")     //Makes superhero tell Mosquito a players max health     register_srvcmd("mos_maxhealth", "mos_maxhealth")     shRegMaxHealth(gHeroName, "mos_maxhealth" )         // KEY DOWN     register_srvcmd("mos_kd", "mos_kd")     shRegKeyDown(gHeroName, "mos_kd")         // KEY UP     register_srvcmd("mos_ku", "mos_ku")     shRegKeyUp(gHeroName, "mos_ku") //---------------------------------------------------------------------------------------------- public mos_init() {     // First Argument is an id     new temp[6]     read_argv(1,temp,5)     new id=str_to_num(temp)     // 2nd Argument is 0 or 1 depending on whether the id has Mosquito skills     read_argv(2,temp,5)     new hasPowers = str_to_num(temp)     gPlayerMaxHealth[id] = 200     gHasMosquitoPowers[id] = (hasPowers!=0)                 if ( isflying[id] ) {                     stop_fly(id)         } } //---------------------------------------------------------------------------------------------- public mos_levels() {     new id[5]     new lev[5]     read_argv(1,id,4)     read_argv(2,lev,4)     gPlayerLevels[str_to_num(id)] = str_to_num(lev) } //---------------------------------------------------------------------------------------------- public mos_damage(id) {     if (!shModActive() || !is_user_connected(id)) return     new damage = read_data(2)     new attacker = get_user_attacker(id)     if ( attacker <= 0 || attacker > SH_MAXSLOTS ) return     if ( gHasMosquitoPowers[attacker] && is_user_alive(attacker) && attacker != id ) {         //Add some HP back!         gMultiplier = get_cvar_float("mos_pctperlev")         new giveHPs = floatround( damage * gMultiplier * gPlayerLevels[attacker] )         if (get_user_health(attacker) < gPlayerMaxHealth[attacker] && giveHPs > 0 ) {             new alphanum = damage * 2             if (alphanum > 200) alphanum = 200             else if (alphanum < 40) alphanum = 40             setScreenFlash(attacker, 255, 10, 10, 10, alphanum )  //Red Screen Flash             shAddHPs(attacker, giveHPs, gPlayerMaxHealth[attacker] )         }     } } //---------------------------------------------------------------------------------------------- public mos_maxhealth() {     new id[6]     new health[9]     read_argv(1,id,5)     read_argv(2,health,8)     gPlayerMaxHealth[str_to_num(id)] = str_to_num(health) } //---------------------------------------------------------------------------------------------- public client_connect(id) {     gHasMosquitoPowers[id] = false } //---------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------- public newSpawn(id) {     if( gHasMosquitoPower[id] && isflying[id] ) {         stop_fly(id)     } } //---------------------------------------------------------------------------------------------- // RESPOND TO KEYDOWN public smos_kd() {     // First Argument is an id     new temp[6]     read_argv(1, temp, 5)     new id = str_to_num(temp)     if ( !is_user_alive(id) ) return     // If in toggle mode change this to a keyup event     if ( get_cvar_num("mos_toggle") && isflying[id] ) {         stop_fly(id)         return     }     //could be done easier with just a !hasRoundStarted(), unless they want a removal of flight at round end     if ( roundfreeze && !get_cvar_num("mos_flybeforeftime") ) {         client_print(id, print_chat, "[SH](Mosquito) You must wait until the round has started to fly")         playSoundDenySelect(id)         return     }     make_fly(id) } //---------------------------------------------------------------------------------------------- // RESPOND TO KEYUP public mos_ku() {     // toggle mode - keyup doesn't do anything!     if ( get_cvar_num("mos_toggle") ) return     // First Argument is an id     new temp[6]     read_argv(1, temp, 5)     new id = str_to_num(temp)     stop_fly(id) } //---------------------------------------------------------------------------------------------- public round_end() {     roundfreeze = true     //Should flight be removed when round ends if in no fly roundfreeze cvar? } //---------------------------------------------------------------------------------------------- public round_start() {     roundfreeze = false } //---------------------------------------------------------------------------------------------- public make_fly(id) {     if( !is_user_alive(id) || isflying[id] ) return     client_print(id, print_center, "FLY Like A Mosquito !?")     set_user_gravity(id, 0.001)     new parm[1]     parm[0] = id     set_task(0.1, "user_fly", 5327+id, parm, 1, "b")         isflying[id] = true } //---------------------------------------------------------------------------------------------- public stop_fly(id) {     if ( !isflying[id] ) return     //Don't really need to tell users when they die     if ( is_user_alive(id) ) client_print(id, print_center, "Flying Mode OFF")     //resets users gravity after being set     shSetGravityPower(id)     isflying[id] = false     remove_task(5327+id) } //---------------------------------------------------------------------------------------------- public user_fly(parm[]) {     new Float: xAngles[3]     new Float: xOrigin[3]     new xEnt     new id = parm[0]     //No Death Event needed it gets turned off here     if ( !is_user_alive(id) ) {         stop_fly(id)         return PLUGIN_HANDLED     }     new butnprs = Entvars_Get_Int(id, EV_INT_button)     if(butnprs&IN_FORWARD && butnprs&IN_MOVERIGHT && butnprs&IN_JUMP)  // FORWARD + MOVERIGHT + JUMP     {         Entvars_Get_Vector(id, EV_VEC_v_angle, xAngles)         Entvars_Get_Vector(id, EV_VEC_origin, xOrigin)         xEnt = CreateEntity("info_target")         if(xEnt == 0) {             return PLUGIN_HANDLED_MAIN         }         xAngles[0] = -45.0         xAngles[1] -= 45         ENT_SetOrigin(xEnt, xOrigin)         Entvars_Set_Vector(xEnt, EV_VEC_v_angle, xAngles)         VelocityByAim(xEnt, get_cvar_num("superman_flyspeed"), Velocity[id])         RemoveEntity(xEnt)     }     else if(butnprs&IN_FORWARD && butnprs&IN_MOVERIGHT && butnprs&IN_DUCK)  // FORWARD + MOVERIGHT + DUCK     {         Entvars_Get_Vector(id, EV_VEC_v_angle, xAngles)         Entvars_Get_Vector(id, EV_VEC_origin, xOrigin)         xEnt = CreateEntity("info_target")         if(xEnt == 0) {             return PLUGIN_HANDLED_MAIN         }         xAngles[0] = 45.0         xAngles[1] -= 45         ENT_SetOrigin(xEnt, xOrigin)         Entvars_Set_Vector(xEnt, EV_VEC_v_angle, xAngles)         VelocityByAim(xEnt, get_cvar_num("superman_flyspeed"), Velocity[id])         RemoveEntity(xEnt)     }     else if(butnprs&IN_FORWARD && butnprs&IN_MOVELEFT && butnprs&IN_JUMP)  // FORWARD + MOVELEFT + JUMP     {         Entvars_Get_Vector(id, EV_VEC_v_angle, xAngles)         Entvars_Get_Vector(id, EV_VEC_origin, xOrigin)         xEnt = CreateEntity("info_target")         if(xEnt == 0) {             return PLUGIN_HANDLED_MAIN         }         xAngles[0] = -45.0         xAngles[1] += 45         ENT_SetOrigin(xEnt, xOrigin)         Entvars_Set_Vector(xEnt, EV_VEC_v_angle, xAngles)         VelocityByAim(xEnt, get_cvar_num("mos_flyspeed"), Velocity[id])         RemoveEntity(xEnt)     }     else if(butnprs&IN_FORWARD && butnprs&IN_MOVELEFT && butnprs&IN_DUCK)  // FORWARD + MOVELEFT + DUCK     {         Entvars_Get_Vector(id, EV_VEC_v_angle, xAngles)         Entvars_Get_Vector(id, EV_VEC_origin, xOrigin)         xEnt = CreateEntity("info_target")         if(xEnt == 0) {             return PLUGIN_HANDLED_MAIN         }         xAngles[0] = 45.0         xAngles[1] += 45         ENT_SetOrigin(xEnt, xOrigin)         Entvars_Set_Vector(xEnt, EV_VEC_v_angle, xAngles)         VelocityByAim(xEnt, get_cvar_num("mos_flyspeed"), Velocity[id])         RemoveEntity(xEnt)     }     else if(butnprs&IN_JUMP && butnprs&IN_MOVERIGHT && butnprs&IN_BACK)  // BACK + MOVERIGHT + JUMP     {         Entvars_Get_Vector(id, EV_VEC_v_angle, xAngles)         Entvars_Get_Vector(id, EV_VEC_origin, xOrigin)         xEnt = CreateEntity("info_target")         if(xEnt == 0) {             return PLUGIN_HANDLED_MAIN         }         xAngles[0] = -45.0         xAngles[1] -= 135         ENT_SetOrigin(xEnt, xOrigin)         Entvars_Set_Vector(xEnt, EV_VEC_v_angle, xAngles)         VelocityByAim(xEnt, get_cvar_num("mos_flyspeed"), Velocity[id])         RemoveEntity(xEnt)     }     else if(butnprs&IN_BACK && butnprs&IN_MOVERIGHT && butnprs&IN_DUCK)  // BACK + MOVERIGHT + DUCK     {         Entvars_Get_Vector(id, EV_VEC_v_angle, xAngles)         Entvars_Get_Vector(id, EV_VEC_origin, xOrigin)         xEnt = CreateEntity("info_target")         if(xEnt == 0) {             return PLUGIN_HANDLED_MAIN         }         xAngles[0] = 45.0         xAngles[1] -= 135         ENT_SetOrigin(xEnt, xOrigin)         Entvars_Set_Vector(xEnt, EV_VEC_v_angle, xAngles)         VelocityByAim(xEnt, get_cvar_num("mos_flyspeed"), Velocity[id])         RemoveEntity(xEnt)     }     else if(butnprs&IN_JUMP && butnprs&IN_MOVELEFT && butnprs&IN_BACK)  // BACK + MOVELEFT + JUMP     {         Entvars_Get_Vector(id, EV_VEC_v_angle, xAngles)         Entvars_Get_Vector(id, EV_VEC_origin, xOrigin)         xEnt = CreateEntity("info_target")         if(xEnt == 0) {             return PLUGIN_HANDLED_MAIN         }         xAngles[0] = -45.0         xAngles[1] += 135         ENT_SetOrigin(xEnt, xOrigin)         Entvars_Set_Vector(xEnt, EV_VEC_v_angle, xAngles)         VelocityByAim(xEnt, get_cvar_num("mos_flyspeed"), Velocity[id])         RemoveEntity(xEnt)     }     else if(butnprs&IN_BACK && butnprs&IN_MOVELEFT && butnprs&IN_DUCK)  // BACK + MOVELEFT + DUCK     {         Entvars_Get_Vector(id, EV_VEC_v_angle, xAngles)         Entvars_Get_Vector(id, EV_VEC_origin, xOrigin)         xEnt = CreateEntity("info_target")         if(xEnt == 0) {             return PLUGIN_HANDLED_MAIN         }         xAngles[0] = 45.0         xAngles[1] += 135         ENT_SetOrigin(xEnt, xOrigin)         Entvars_Set_Vector(xEnt, EV_VEC_v_angle, xAngles)         VelocityByAim(xEnt, get_cvar_num("mos_flyspeed"), Velocity[id])         RemoveEntity(xEnt)     }     else if(butnprs&IN_MOVERIGHT && butnprs&IN_FORWARD) //  MOVERIGHT  + FORWARD     {         Entvars_Get_Vector(id, EV_VEC_v_angle, xAngles)         Entvars_Get_Vector(id, EV_VEC_origin, xOrigin)         xEnt = CreateEntity("info_target")         if(xEnt == 0) {             return PLUGIN_HANDLED_MAIN         }         xAngles[0] = 0.0         xAngles[1] -= 45         ENT_SetOrigin(xEnt, xOrigin)         Entvars_Set_Vector(xEnt, EV_VEC_v_angle, xAngles)         VelocityByAim(xEnt, get_cvar_num("mos_flyspeed"), Velocity[id])         RemoveEntity(xEnt)     }     else if(butnprs&IN_MOVERIGHT && butnprs&IN_BACK) // MOVERIGHT + BACK     {         Entvars_Get_Vector(id, EV_VEC_v_angle, xAngles)         Entvars_Get_Vector(id, EV_VEC_origin, xOrigin)         xEnt = CreateEntity("info_target")         if(xEnt == 0) {             return PLUGIN_HANDLED_MAIN         }         xAngles[0] = 0.0         xAngles[1] -= 135         ENT_SetOrigin(xEnt, xOrigin)         Entvars_Set_Vector(xEnt, EV_VEC_v_angle, xAngles)         VelocityByAim(xEnt, get_cvar_num("mos_flyspeed"), Velocity[id])         RemoveEntity(xEnt)     }     else if(butnprs&IN_MOVELEFT && butnprs&IN_FORWARD) // MOVELEFT + FORWARD     {         Entvars_Get_Vector(id, EV_VEC_v_angle, xAngles)         Entvars_Get_Vector(id, EV_VEC_origin, xOrigin)         xEnt = CreateEntity("info_target")         if(xEnt == 0) {             return PLUGIN_HANDLED_MAIN         }         xAngles[0] = 0.0         xAngles[1] += 45         ENT_SetOrigin(xEnt, xOrigin)         Entvars_Set_Vector(xEnt, EV_VEC_v_angle, xAngles)         VelocityByAim(xEnt, get_cvar_num("mos_flyspeed"), Velocity[id])         RemoveEntity(xEnt)     }     else if(butnprs&IN_MOVELEFT && butnprs&IN_BACK) // MOVELEFT + BACK     {         Entvars_Get_Vector(id, EV_VEC_v_angle, xAngles)         Entvars_Get_Vector(id, EV_VEC_origin, xOrigin)         xEnt = CreateEntity("info_target")         if(xEnt == 0) {             return PLUGIN_HANDLED_MAIN         }         xAngles[0] = 0.0         xAngles[1] += 135         ENT_SetOrigin(xEnt, xOrigin)         Entvars_Set_Vector(xEnt, EV_VEC_v_angle, xAngles)         VelocityByAim(xEnt, get_cvar_num("mos_flyspeed"), Velocity[id])         RemoveEntity(xEnt)     }     else if(butnprs&IN_FORWARD && butnprs&IN_JUMP)  // FORWARD + JUMP     {         Entvars_Get_Vector(id, EV_VEC_v_angle, xAngles)         Entvars_Get_Vector(id, EV_VEC_origin, xOrigin)         xEnt = CreateEntity("info_target")         if(xEnt == 0) {             return PLUGIN_HANDLED_MAIN         }         xAngles[0] = -45.0         ENT_SetOrigin(xEnt, xOrigin)         Entvars_Set_Vector(xEnt, EV_VEC_v_angle, xAngles)         VelocityByAim(xEnt, get_cvar_num("mos_flyspeed"), Velocity[id])         RemoveEntity(xEnt)     }     else if(butnprs&IN_FORWARD && butnprs&IN_DUCK)  // FORWARD + DUCK     {         Entvars_Get_Vector(id, EV_VEC_v_angle, xAngles)         Entvars_Get_Vector(id, EV_VEC_origin, xOrigin)         xEnt = CreateEntity("info_target")         if(xEnt == 0) {             return PLUGIN_HANDLED_MAIN         }         xAngles[0] = 45.0         ENT_SetOrigin(xEnt, xOrigin)         Entvars_Set_Vector(xEnt, EV_VEC_v_angle, xAngles)         VelocityByAim(xEnt, get_cvar_num("mos_flyspeed"), Velocity[id])         RemoveEntity(xEnt)     }     else if(butnprs&IN_BACK && butnprs&IN_JUMP)  // BACK + JUMP     {         Entvars_Get_Vector(id, EV_VEC_v_angle, xAngles)         Entvars_Get_Vector(id, EV_VEC_origin, xOrigin)         xEnt = CreateEntity("info_target")         if(xEnt == 0) {             return PLUGIN_HANDLED_MAIN         }         xAngles[0] = -45.0         xAngles[1] += 180         ENT_SetOrigin(xEnt, xOrigin)         Entvars_Set_Vector(xEnt, EV_VEC_v_angle, xAngles)         VelocityByAim(xEnt, get_cvar_num("mos_flyspeed"), Velocity[id])         RemoveEntity(xEnt)     }     else if(butnprs&IN_BACK && butnprs&IN_DUCK)  // BACK + DUCK     {         Entvars_Get_Vector(id, EV_VEC_v_angle, xAngles)         Entvars_Get_Vector(id, EV_VEC_origin, xOrigin)         xEnt = CreateEntity("info_target")         if(xEnt == 0) {             return PLUGIN_HANDLED_MAIN         }         xAngles[0] = 45.0         xAngles[1] += 180         ENT_SetOrigin(xEnt, xOrigin)         Entvars_Set_Vector(xEnt, EV_VEC_v_angle, xAngles)         VelocityByAim(xEnt, get_cvar_num("mos_flyspeed"), Velocity[id])         RemoveEntity(xEnt)     }     else if(butnprs&IN_MOVERIGHT && butnprs&IN_JUMP)  // MOVERIGHT + JUMP     {         Entvars_Get_Vector(id, EV_VEC_v_angle, xAngles)         Entvars_Get_Vector(id, EV_VEC_origin, xOrigin)         xEnt = CreateEntity("info_target")         if(xEnt == 0) {             return PLUGIN_HANDLED_MAIN         }         xAngles[0] = -45.0         xAngles[1] -= 90         ENT_SetOrigin(xEnt, xOrigin)         Entvars_Set_Vector(xEnt, EV_VEC_v_angle, xAngles)         VelocityByAim(xEnt, get_cvar_num("mos_flyspeed"), Velocity[id])         RemoveEntity(xEnt)     }     else if(butnprs&IN_MOVERIGHT && butnprs&IN_DUCK)  // MOVERIGHT + DUCK     {         Entvars_Get_Vector(id, EV_VEC_v_angle, xAngles)         Entvars_Get_Vector(id, EV_VEC_origin, xOrigin)         xEnt = CreateEntity("info_target")         if(xEnt == 0) {             return PLUGIN_HANDLED_MAIN         }         xAngles[0] = 45.0         xAngles[1] -= 90         ENT_SetOrigin(xEnt, xOrigin)         Entvars_Set_Vector(xEnt, EV_VEC_v_angle, xAngles)         VelocityByAim(xEnt, get_cvar_num("mos_flyspeed"), Velocity[id])         RemoveEntity(xEnt)     }     else if(butnprs&IN_MOVELEFT && butnprs&IN_JUMP)  // MOVELEFT + JUMP     {         Entvars_Get_Vector(id, EV_VEC_v_angle, xAngles)         Entvars_Get_Vector(id, EV_VEC_origin, xOrigin)         xEnt = CreateEntity("info_target")         if(xEnt == 0) {             return PLUGIN_HANDLED_MAIN         }         xAngles[0] = -45.0         xAngles[1] += 90         ENT_SetOrigin(xEnt, xOrigin)         Entvars_Set_Vector(xEnt, EV_VEC_v_angle, xAngles)         VelocityByAim(xEnt, get_cvar_num("mos_flyspeed"), Velocity[id])         RemoveEntity(xEnt)     }     else if(butnprs&IN_MOVELEFT && butnprs&IN_DUCK)  // MOVELEFT + DUCK     {         Entvars_Get_Vector(id, EV_VEC_v_angle, xAngles)         Entvars_Get_Vector(id, EV_VEC_origin, xOrigin)         xEnt = CreateEntity("info_target")         if(xEnt == 0) {             return PLUGIN_HANDLED_MAIN         }         xAngles[0] = 45.0         xAngles[1] += 90         ENT_SetOrigin(xEnt, xOrigin)         Entvars_Set_Vector(xEnt, EV_VEC_v_angle, xAngles)         VelocityByAim(xEnt, get_cvar_num("mos_flyspeed"), Velocity[id])         RemoveEntity(xEnt)     }     else if(butnprs&IN_FORWARD) // FORWARD     VelocityByAim(id, get_cvar_num("mos_flyspeed") , Velocity[id])     else if(butnprs&IN_BACK) // BACK     VelocityByAim(id, -get_cvar_num("mos_flyspeed") , Velocity[id])     else if(butnprs&IN_DUCK) // DUCK     {         Velocity[id][0] = 0.0         Velocity[id][1] = 0.0         Velocity[id][2] = -get_cvar_num("mos_flyspeed") * 1.0     }     else if(butnprs&IN_JUMP) // JUMP     {         Velocity[id][0] = 0.0         Velocity[id][1] = 0.0         Velocity[id][2] = get_cvar_num("mos_flyspeed") * 1.0     }     else if(butnprs&IN_MOVERIGHT) // MOVERIGHT     {         Entvars_Get_Vector(id, EV_VEC_v_angle, xAngles)         Entvars_Get_Vector(id, EV_VEC_origin, xOrigin)         xEnt = CreateEntity("info_target")         if(xEnt == 0) {             return PLUGIN_HANDLED_MAIN         }         xAngles[0] = 0.0         xAngles[1] -= 90         ENT_SetOrigin(xEnt, xOrigin)         Entvars_Set_Vector(xEnt, EV_VEC_v_angle, xAngles)         VelocityByAim(xEnt, get_cvar_num("mos_flyspeed"), Velocity[id])         RemoveEntity(xEnt)     }     else if(butnprs&IN_MOVELEFT) // MOVELEFT     {         Entvars_Get_Vector(id, EV_VEC_v_angle, xAngles)         Entvars_Get_Vector(id, EV_VEC_origin, xOrigin)         xEnt = CreateEntity("info_target")         if(xEnt == 0) {             return PLUGIN_HANDLED_MAIN         }         xAngles[0] = 0.0         xAngles[1] += 90         ENT_SetOrigin(xEnt, xOrigin)         Entvars_Set_Vector(xEnt, EV_VEC_v_angle, xAngles)         VelocityByAim(xEnt, get_cvar_num("mos_flyspeed"), Velocity[id])         RemoveEntity(xEnt)     }     else {         Velocity[id][0] = 0.0         Velocity[id][1] = 0.0         Velocity[id][2] = 0.0     }     Entvars_Set_Vector(id, EV_VEC_velocity, Velocity[id])     new Float: pOrigin[3]     new Float: zOrigin[3]     new Float: zResult[3]     Entvars_Get_Vector(id, EV_VEC_origin, pOrigin)     zOrigin[0] = pOrigin[0]     zOrigin[1] = pOrigin[1]     zOrigin[2] = pOrigin[2] - 1000     TraceLn(id,pOrigin, zOrigin, zResult)     //Supposed to be used to check if you moved up to set you to look like your swiming     //I think this could be done differently, like if he is flying and not on the ground     //and moving then set the swim look, etc...     if(Entvars_Get_Int(id, EV_INT_sequence) != 8 && (zResult[2] + 100) < pOrigin[2] && is_user_alive(id) && (Velocity[id][0] > 0.0 && Velocity[id][1] > 0.0 && Velocity[id][2] > 0.0))     Entvars_Set_Int(id, EV_INT_sequence, 8)     return PLUGIN_HANDLED } //----------------------------------------------------------------------------------------------
__________________
GRR If only the amxmod programming were in Java.....
Java and C used to be two different languages, now Java is turning into another C. My logevent plugin
Batman/Gorlag 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 03:53.


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