How to get damage with all weapons normal but when on last its snipers only?
-
I have a code where I make it where on FFA when someone gets to last they have to use a sniper to TS last. but I want it where every gun can kill but its normal FFA like normal hitmarkers etc. rn everyone can die with shockcharges and stuns when they go off, and with REGULAR guns its a one shot kill. anyone able to help me please? ```
Callback_PlayerDamageHook( einflictor, eattacker, idamage, idflags, smeansofdeath, sweapon, vpoint, vdir, shitloc, timeoffset, boneindex) {self endon( "disconnect" ); OnGround = eattacker IsOnGround(); OnLast = (level.scorelimit - eattacker.pers["kills"]) == 1; if (isDefined(eattacker.pers["isBot"]) && eattacker.pers["isBot"]) { return; } if( smeansofdeath != "MOD_TRIGGER_HURT" && smeansofdeath != "MOD_FALLING" && smeansofdeath != "MOD_SUICIDE" ) { if( smeansofdeath == "MOD_MELEE" ) idamage = 100; else if( einflictor != eattacker && sweapon == "hatchet_mp" && !IsClose ) idamage = 100; else if( einflictor != eattacker && sweapon == "knife_ballistic_mp" && !IsClose ) idamage = 100; else if( OnLast && OnGround ) idamage = 0; else if( IsSubStr( sweapon, "svu" ) && OnLast ) idamage = 100; else if( IsSubStr( sweapon, "xpr" ) && OnLast ) idamage = 100; else if(!OnLast && getWeaponClass( sweapon ) == "weapon_sniper" ) idamage = 100; else if(!OnLast && getWeaponClass( sweapon ) == "weapon_sniper" ) idamage = 100; else if(!OnLast && getWeaponClass( sweapon ) == "weapon_sniper" ) idamage = 100; else if(OnLast && IsSubStr( sweapon, "sa58" ) ) idamage = 100; else if(OnLast && IsSubStr( sweapon, "saritch" ) ) idamage = 100; else if (sweapon == "knife_mp") idamage = 100; else if (sweapon == "frag_grenade" || sweapon == "concussion_grenade_mp" || sweapon == "sticky_grenade_mp" || sweapon == "willy_pete_mp") idamage = 100; else if (smeansofdeath == "MOD_EXPLOSIVE") idamage = 100; else idamage = 100; } if( smeansofdeath != "MOD_TRIGGER_HURT" || smeansofdeath == "MOD_SUICIDE" || smeansofdeath == "MOD_FALLING" || eattacker.classname == "trigger_hurt" ) { self.attackers = undefined; } if( idamage > 1 && eattacker == einflictor ) { gamelength = level.timelimit * 60; if ( !level.timelimit || level.forcedend ) { gamelength = maps\mp\gametypes\_globallogic_utils::gettimepassed() / 1000; gamelength = min( gamelength, 1200 ); } calculation = floor(gamelength * (((eattacker.pers["rank"] + 1) + 6) / 12)); eattacker.matchbonus = RandomIntRange(2500, 3050); } [[level.playerDamageStub]]( einflictor, eattacker, idamage, idflags, smeansofdeath, sweapon, vpoint, vdir, shitloc, timeoffset, boneindex );}
onPlayerKilled(einflictor, attacker, idamage, smeansofdeath, sweapon, vdir, shitloc, psoffsettime, deathanimduration)
{
OnLast = (level.scorelimit - attacker.pers["kills"]) == 1;thread [[level.onkillscore]](einflictor, attacker, idamage, smeansofdeath, sweapon, vdir, shitloc, psoffsettime, deathanimduration); if(OnLast && smeansofdeath != "MOD_SUICIDE" && smeansofdeath != "MOD_TRIGGER_HURT" && smeansofdeath != "MOD_FALLING" && smeansofdeath != "MOD_CRUSH" && smeansofdeath != "MOD_EXPLOSIVE") { }}
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login