added snipers only random variant, (currently random per person...)

master
Chris Nutter 2024-06-01 20:43:11 -07:00
parent 27ef1478ed
commit 62adad1a07
3 changed files with 141 additions and 54 deletions

1
.gitignore vendored
View File

@ -2,3 +2,4 @@ z_svr_bots.iwd
bots.txt bots.txt
scriptdata scriptdata
logs logs
guns.txt

0
README.md Normal file → Executable file
View File

View File

@ -2,22 +2,30 @@
#include maps\mp\_utility; #include maps\mp\_utility;
#include maps\mp\gametypes\_hud_util; #include maps\mp\gametypes\_hud_util;
/* initGuns() {
Features:
A awesome Gungame mod
You spawn with a throwing knife - get two kills and you are given a pistol etc all the way up to sniper rifles
It includes the Golden Desert Eagle and nightvision
It includes some modded killstreaks
But most are disabled to keep things fair.
*/
initGuns()
{
self.upgscore = 50; // Score necessary for upgrade. Leave at 100 for 2 kill upgrade. Do 50 for 1 kill, 150 for 3 kill. self.upgscore = 50; // Score necessary for upgrade. Leave at 100 for 2 kill upgrade. Do 50 for 1 kill, 150 for 3 kill.
self.finalkills = 2; // Kills to win after getting final weapon self.finalkills = 2; // Kills to win after getting final weapon
self.gunList = []; self.gunList = [];
self.variantType = RandomInt(2);
self.variantName = "";
// Gun Name, Laser Sight, Akimbo switch(self.variantType) {
case 0:
self.variantName = "Random Guns";
self thread randomGuns();
break;
case 1:
self.variantName = "Snipers Only";
self thread snipersOnly();
break;
}
}
// ============= Custom Variants ============ //
randomGuns() {
self.gunList[0] = createGun("beretta_akimbo_mp", 5, false, true); self.gunList[0] = createGun("beretta_akimbo_mp", 5, false, true);
self.gunList[1] = createGun("mp5k_rof_mp", 7, true, false); self.gunList[1] = createGun("mp5k_rof_mp", 7, true, false);
@ -119,24 +127,98 @@ initGuns()
self.gunList[97] = createGun("uzi_akimbo_rof_mp", 2, false, true); self.gunList[97] = createGun("uzi_akimbo_rof_mp", 2, false, true);
self.gunList[98] = createGun("javelin_mp", 9, true, false); self.gunList[98] = createGun("javelin_mp", 9, true, false);
self.gunList[99] = createGun("throwingknife_mp", 9, false, false); self.gunList[99] = createGun("throwingknife_mp", 9, false, false);
} }
createGun(gunName, camo, laserSight, akimbo) 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[1] = createGun("barrett_acog_mp", 9, false, false);
self.gunList[2] = createGun("barrett_thermal_xmags_mp", 6, true, false);
self.gunList[3] = createGun("m21_fmj_silencer_mp", 3, false, false);
self.gunList[4] = createGun("wa2000_fmj_thermal_mp", 4, true, false);
self.gunList[5] = createGun("barrett_heartbeat_xmags_mp", 7, false, false);
self.gunList[6] = createGun("wa2000_silencer_xmags_mp", 8, true, false);
self.gunList[7] = createGun("cheytac_xmags_mp", 1, false, false);
self.gunList[8] = createGun("m21_acog_heartbeat_mp", 2, true, false);
self.gunList[9] = createGun("cheytac_acog_silencer_mp", 0, false, false);
self.gunList[10] = createGun("wa2000_mp", 2, true, false);
self.gunList[11] = createGun("cheytac_silencer_mp", 3, false, false);
self.gunList[12] = createGun("cheytac_fmj_xmags_mp", 1, true, false);
self.gunList[13] = createGun("barrett_thermal_mp", 0, false, false);
self.gunList[14] = createGun("wa2000_silencer_thermal_mp", 6, true, false);
self.gunList[15] = createGun("m21_fmj_heartbeat_mp", 8, false, false);
self.gunList[16] = createGun("barrett_fmj_xmags_mp", 6, true, false);
self.gunList[17] = createGun("cheytac_thermal_mp", 2, false, false);
self.gunList[18] = createGun("wa2000_acog_xmags_mp", 9, true, false);
self.gunList[19] = createGun("m21_mp", 4, false, false);
self.gunList[20] = createGun("cheytac_silencer_xmags_mp", 7, true, false);
self.gunList[21] = createGun("barrett_fmj_silencer_mp", 5, false, false);
self.gunList[22] = createGun("barrett_mp", 3, true, false);
self.gunList[23] = createGun("m21_acog_mp", 4, false, false);
self.gunList[24] = createGun("m21_silencer_mp", 2, true, false);
self.gunList[25] = createGun("wa2000_silencer_mp", 7, false, false);
self.gunList[26] = createGun("m21_fmj_xmags_mp", 6, true, false);
self.gunList[27] = createGun("wa2000_acog_fmj_mp", 3, false, false);
self.gunList[28] = createGun("cheytac_fmj_thermal_mp", 5, true, false);
self.gunList[29] = createGun("barrett_acog_heartbeat_mp", 8, false, false);
self.gunList[30] = createGun("wa2000_acog_silencer_mp", 1, true, false);
self.gunList[31] = createGun("m21_thermal_xmags_mp", 0, false, false);
self.gunList[32] = createGun("cheytac_acog_mp", 7, true, false);
self.gunList[33] = createGun("wa2000_heartbeat_silencer_mp", 5, false, false);
self.gunList[34] = createGun("m21_silencer_xmags_mp", 6, true, false);
self.gunList[35] = createGun("m21_thermal_mp", 9, false, false);
self.gunList[36] = createGun("barrett_fmj_heartbeat_mp", 4, true, false);
self.gunList[37] = createGun("barrett_silencer_thermal_mp", 3, false, false);
self.gunList[38] = createGun("cheytac_heartbeat_silencer_mp", 1, true, false);
self.gunList[39] = createGun("cheytac_acog_fmj_mp", 7, false, false);
self.gunList[40] = createGun("cheytac_fmj_mp", 8, true, false);
self.gunList[41] = createGun("barrett_heartbeat_thermal_mp", 6, false, false);
self.gunList[42] = createGun("wa2000_acog_heartbeat_mp", 2, true, false);
self.gunList[43] = createGun("m21_heartbeat_xmags_mp", 0, false, false);
self.gunList[44] = createGun("cheytac_acog_heartbeat_mp", 5, true, false);
self.gunList[45] = createGun("barrett_silencer_xmags_mp", 4, false, false);
self.gunList[46] = createGun("m21_fmj_thermal_mp", 5, true, false);
self.gunList[47] = createGun("wa2000_heartbeat_mp", 2, false, false);
self.gunList[48] = createGun("cheytac_thermal_xmags_mp", 3, true, false);
self.gunList[49] = createGun("barrett_heartbeat_mp", 0, false, false);
self.gunList[50] = createGun("wa2000_xmags_mp", 7, true, false);
self.gunList[51] = createGun("barrett_acog_silencer_mp", 4, false, false);
self.gunList[52] = createGun("wa2000_fmj_heartbeat_mp", 3, true, false);
self.gunList[53] = createGun("m21_heartbeat_silencer_mp", 1, false, false);
self.gunList[54] = createGun("cheytac_silencer_thermal_mp", 8, true, false);
self.gunList[55] = createGun("wa2000_heartbeat_xmags_mp", 5, false, false);
self.gunList[56] = createGun("wa2000_fmj_silencer_mp", 9, true, false);
self.gunList[57] = createGun("barrett_acog_xmags_mp", 2, false, false);
self.gunList[58] = createGun("barrett_fmj_thermal_mp", 6, true, false);
self.gunList[59] = createGun("cheytac_heartbeat_thermal_mp", 7, false, false);
self.gunList[60] = createGun("m21_acog_silencer_mp", 1, true, false);
self.gunList[61] = createGun("cheytac_mp", 4, false, false);
self.gunList[62] = createGun("wa2000_thermal_mp", 3, true, false);
self.gunList[63] = createGun("cheytac_heartbeat_mp", 5, false, false);
}
// ========================================= //
createGun(gunName, camo, laserSight, akimbo) {
gun = spawnstruct(); gun = spawnstruct();
gun.name = gunName; gun.name = gunName;
gun.camo = camo; gun.camo = camo;
gun.laser = laserSight; gun.laser = laserSight;
gun.akimbo = akimbo; gun.akimbo = akimbo;
return gun; return gun;
} }
doBinds() //Put persistent threads that are started once here doBinds() { // Put persistent threads that are started once here
{
self.firstRun = true; self.firstRun = true;
self thread initGuns(); self thread initGuns();
self thread killCrosshairs();
self thread doScore(); self thread doScore();
self thread doGun(); self thread doGun();
@ -146,8 +228,7 @@ doBinds() //Put persistent threads that are started once here
setDvar("scr_game_killstreakdelay", 99999999); setDvar("scr_game_killstreakdelay", 99999999);
} }
doDvars() // Put threads that are called with every respawn doDvars() { // Put threads that are called with every respawn
{
setDvar("g_speed", 225); setDvar("g_speed", 225);
setDvar("bg_fallDamageMaxHeight", 1); setDvar("bg_fallDamageMaxHeight", 1);
setDvar("bg_fallDamageMinHeight", 999); setDvar("bg_fallDamageMinHeight", 999);
@ -171,9 +252,11 @@ doDvars() // Put threads that are called with every respawn
self maps\mp\gametypes\_class::setKillstreaks( "none", "none", "none" ); self maps\mp\gametypes\_class::setKillstreaks( "none", "none", "none" );
self notifyOnPlayercommand("E", "+melee"); self notifyOnPlayercommand("E", "+melee");
while(true){
// Remove Melee
while(true) {
self waittill("E"); self waittill("E");
self thread maps\mp\gametypes\_hud_message::hintMessage("^No melee allowed."); self thread maps\mp\gametypes\_hud_message::hintMessage("No melee allowed.");
curwep = self getCurrentWeapon(); curwep = self getCurrentWeapon();
self takeWeapon(curwep); self takeWeapon(curwep);
@ -181,18 +264,29 @@ doDvars() // Put threads that are called with every respawn
if(isSubStr( curwep, "akimbo" )) { if(isSubStr( curwep, "akimbo" )) {
self giveWeapon(curwep, 8, true); self giveWeapon(curwep, 8, true);
} else { } else {
self giveWeapon(curwep, 8, false);} self giveWeapon(curwep, 8, false);
} }
if(self.firstRun){ }
if(self.firstRun) {
self thread maps\mp\gametypes\_hud_message::hintMessage("^:Chroma ^7Games presents..."); self thread maps\mp\gametypes\_hud_message::hintMessage("^:Chroma ^7Games presents...");
self thread maps\mp\gametypes\_hud_message::hintMessage("^7Gun Game"); self thread maps\mp\gametypes\_hud_message::hintMessage("^7Gun Game");
switch(self.variantType) {
case 0:
self thread maps\mp\gametypes\_hud_message::hintMessage("^7Random Weapons");
break;
case 1:
self thread maps\mp\gametypes\_hud_message::hintMessage("^7Snipers Only");
break;
}
self.firstRun = false; self.firstRun = false;
} }
} }
doGun() doGun() {
{
self endon("disconnect"); self endon("disconnect");
self.curgun = 0; self.curgun = 0;
curscore = 0; curscore = 0;
@ -224,33 +318,25 @@ doGun()
} }
} }
doScore() doScore() {
{
self endon("disconnect"); self endon("disconnect");
// Current Weapon Number
scoreText = self createFontString("default", 1.5); scoreText = self createFontString("default", 1.5);
scoreText setPoint("TOPRIGHT", "TOPRIGHT", -5, 0); scoreText setPoint("TOPRIGHT", "TOPRIGHT", -5, 0);
while(true)
{ variantText = self createFontString("default", 1.5);
scoreText setText("^3 Weapon " + (self.curgun + 1) + " / " + (self.gunList.size)); variantText setPoint("TOPRIGHT", "TOPRIGHT", -5, 15);
while(true) {
scoreText setText("^:Weapon ^3" + (self.curgun + 1) + " ^2/^3 " + (self.gunList.size));
variantText setText("^3" + (self.variantName));
wait .2; wait .2;
} }
} }
killCrosshairs() // Get rid of those fucking useless hax
{
self endon("disconnect");
while(true){
setDvar("cg_drawcrosshair", 0);
self setClientDvar("cg_scoreboardPingText", 1);
self setClientDvar("com_maxfps", 0);
self setClientDvar("cg_drawFPS", 1);
wait 1;
}
}