fixed hintMessage not working and prevented melee spam.

master
Chris Nutter 2024-06-01 22:16:12 -07:00
parent cc484b379c
commit 55c4968475
1 changed files with 67 additions and 32 deletions

View File

@ -130,12 +130,6 @@ randomGuns() {
snipersOnly() { snipersOnly() {
// Also give SoH Pro
self maps\mp\perks\_perks::givePerk("specialty_fastsnipe");
self maps\mp\perks\_perks::givePerk("specialty_fastreload");
self maps\mp\perks\_perks::givePerk("specialty_quickdraw");
self maps\mp\perks\_perks::givePerk("specialty_fastsprintrecovery");
self.gunList[0] = createGun("cheytac_heartbeat_xmags_mp", 5, true, false); self.gunList[0] = createGun("cheytac_heartbeat_xmags_mp", 5, true, false);
self.gunList[1] = createGun("barrett_acog_mp", 9, false, false); self.gunList[1] = createGun("barrett_acog_mp", 9, false, false);
self.gunList[2] = createGun("barrett_thermal_xmags_mp", 6, true, false); self.gunList[2] = createGun("barrett_thermal_xmags_mp", 6, true, false);
@ -228,44 +222,62 @@ doBinds() { // Put persistent threads that are started once here
} }
doDvars() { // Put threads that are called with every respawn doDvars() { // Put threads that are called with every respawn
// No fall damage + speed
setDvar("g_speed", 225); setDvar("g_speed", 225);
setDvar("bg_fallDamageMaxHeight", 1); setDvar("bg_fallDamageMaxHeight", 1);
setDvar("bg_fallDamageMinHeight", 999); setDvar("bg_fallDamageMinHeight", 999);
// Reduce melee range (useless but can't hurt)
self setClientDvar("player_meleeRange", -1); self setClientDvar("player_meleeRange", -1);
self setClientDvar("player_meleeHeight", -1); self setClientDvar("player_meleeHeight", -1);
self setClientDvar("player_meleeWidth", -1); self setClientDvar("player_meleeWidth", -1);
// Remove all perks (for now)
self _clearPerks(); self _clearPerks();
self maps\mp\perks\_perks::givePerk("specialty_bulletaccuracy"); // Remove all killstreaks (permanently)
self maps\mp\perks\_perks::givePerk("specialty_bulletdamage");
self maps\mp\perks\_perks::givePerk("specialty_bulletpenetration");
self maps\mp\perks\_perks::givePerk("specialty_exposeenemy");
self maps\mp\perks\_perks::givePerk("specialty_extendedmags");
self maps\mp\perks\_perks::givePerk("specialty_fastreload");
self maps\mp\perks\_perks::givePerk("specialty_fastsnipe");
self maps\mp\perks\_perks::givePerk("specialty_marathon");
self maps\mp\perks\_perks::givePerk("specialty_quieter");
self maps\mp\gametypes\_class::setKillstreaks( "none", "none", "none" ); self maps\mp\gametypes\_class::setKillstreaks( "none", "none", "none" );
self notifyOnPlayercommand("E", "+melee"); switch(level.variantType) {
case 0:
self.variantName = "Random Guns";
// Remove Melee // Marathon
while(true) { self maps\mp\perks\_perks::givePerk("specialty_marathon");
self waittill("E"); self maps\mp\perks\_perks::givePerk("specialty_longersprint");
self thread maps\mp\gametypes\_hud_message::hintMessage("No melee allowed."); self maps\mp\perks\_perks::givePerk("specialty_automantle");
self maps\mp\perks\_perks::givePerk("specialty_fastmantle");
curwep = self getCurrentWeapon(); // Lightweight
self takeWeapon(curwep); self maps\mp\perks\_perks::givePerk("specialty_lightweight");
if(isSubStr( curwep, "akimbo" )) { // Steady Aim
self giveWeapon(curwep, 8, true); self maps\mp\perks\_perks::givePerk("specialty_improvedholdbreath");
} else { self maps\mp\perks\_perks::givePerk("specialty_bulletaccuracy");
self giveWeapon(curwep, 8, false); self maps\mp\perks\_perks::givePerk("specialty_holdbreath");
}
self thread randomGuns();
break;
case 1:
self.variantName = "Snipers Only";
// Sleight of Hand Pro
self maps\mp\perks\_perks::givePerk("specialty_fastsnipe");
self maps\mp\perks\_perks::givePerk("specialty_fastreload");
self maps\mp\perks\_perks::givePerk("specialty_quickdraw");
self maps\mp\perks\_perks::givePerk("specialty_fastsprintrecovery");
// Stopping Power
self maps\mp\perks\_perks::givePerk("specialty_bulletdamage");
// Steady Aim
self maps\mp\perks\_perks::givePerk("specialty_improvedholdbreath");
self maps\mp\perks\_perks::givePerk("specialty_bulletaccuracy");
self maps\mp\perks\_perks::givePerk("specialty_holdbreath");
self thread snipersOnly();
break;
} }
if(self.firstRun) { if(self.firstRun) {
@ -280,9 +292,32 @@ doDvars() { // Put threads that are called with every respawn
self thread maps\mp\gametypes\_hud_message::hintMessage("^7Snipers Only"); self thread maps\mp\gametypes\_hud_message::hintMessage("^7Snipers Only");
break; break;
} }
self.firstRun = false; self.firstRun = false;
} }
self notifyOnPlayercommand("E", "+melee");
self.didMelee = false;
// Remove Melee
while(true) {
self waittill("E");
// Prevent Melee spam
if (self.didMelee != true) {
self thread maps\mp\gametypes\_hud_message::hintMessage("No melee allowed.");
self.didMelee = true;
}
curwep = self getCurrentWeapon();
self takeWeapon(curwep);
if(isSubStr( curwep, "akimbo" )) {
self giveWeapon(curwep, 8, true);
} else {
self giveWeapon(curwep, 8, false);
}
}
} }
doGun() { doGun() {
@ -330,7 +365,7 @@ doScore() {
while(true) { while(true) {
scoreText setText("^:Weapon ^3" + (self.curgun + 1) + " ^2/^3 " + (self.gunList.size)); scoreText setText("^:Weapon ^3" + (self.curgun + 1) + " ^2/^3 " + (self.gunList.size));
variantText setText("^3" + (level.variantName)); variantText setText("^3" + (self.variantName));
wait .2; wait .2;
} }