if( eAttacker meleeButtonPressed() ) { self setVelocity( vectorToAngles( eAttacker.origin - self.origin ) ); // Not tested, you'll have to play around with this. Most likely won't push the player in the correct direction.
If you want scripts / features made for you, then contact me by PM or email / skype etc it will cost you tho so if you have no intention of reciprocating don't even waste my time
if( eAttacker meleeButtonPressed() ) { self setVelocity( vectorToAngles( eAttacker.origin - self.origin ) ); // Not tested, you'll have to play around with this. Most likely won't push the player in the correct direction.
zombs = getaiarray("axis"); for(i=0;i<zombs.size;i++) { zombs[i] delete(); //removes all currently spawned in zombies }
maps\_zombiemode_powerups::powerup_round_start(); //restarts the amount of powerups you can earn this round array_thread( players, maps\_zombiemode_blockers_new::rebuild_barrier_reward_reset ); //restarts your barrier points this round level thread [[level.round_spawn_func]](); //makes the amount of zombies restart to its original amount for the round
players = get_players(); for( i = 0; i < players.size; i++ ) //respawns you back in and gives you your weapons back { players[i] spectator_respawn(); players[i] [[level.spawnPlayer]](); while(1) { if(players[i] hasWeapon("zombie_colt")) { players[i] maps\_laststand::laststand_giveback_player_weapons(); if( isDefined( players[i].has_altmelee ) && players[i].has_altmelee ) { players[i] SetPerk( "specialty_altmelee" ); } level thread award_grenades_for_survivors(); //get 2 extra grenades when you spawn back in, optional break; } wait(0.05); } } iprintlnbold("You have been given another chance"); //message letting you know the round restarted, optional } else { self maps\_callbackglobal::finishPlayerDamageWrapper( eInflictor, eAttacker, finalDamage, iDFlags, sMeansOfDeath, sWeapon, vPoint, vDir, sHitLoc, modelIndex, psOffsetTime ); } }
edit: heres an example of what mine would look like:
Code Snippet
Plaintext
functname(){ for(;;){ players = get_players(); for(i=0;i<players.size;i++){ players[i] grenade_logic(); } } grenade_logic(){ self waittill( "grenade_fire" , grenade , weapName ); //if( weapName == "zombie_black_hole_bomb" ) //this can be used for specific grenades grenade waittill( "explode" , position ); players = get_players(); for( u=0;u<players.size;u++ ){ if( distance( players[u] , position ) <= 30){ //player[u] shellshock( "grenade" , 3 ); //this will shellshock the player zombies = getaiarray( "axis" , "all" ); player[u] dodamage(25 , ( 0 , 0 , 0 ) , zombies[0] , "grenade"); // the last parameter might be wrong, im not shure if it wanted the entity or type or MOD_* } } } }
Couldn't you use radiusdamage instead and use the origin of the grenade?
Also, I tested and theres two problems: the grenade damages me no matter how far away it is and it doesnt seem i can get damaged from another grenade until i have rehealed
Couldn't you use radiusdamage instead and use the origin of the grenade?
Also, I tested and theres two problems: the grenade damages me no matter how far away it is and it doesnt seem i can get damaged from another grenade until i have rehealed
ok ill run some tests and tell u a revised script... also radius damage should work