From 01a30d9160b4588ba3b51fb9684649bbf458eba9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20D=C5=BEid=C5=BEi=C4=87?= Date: Sat, 19 Nov 2022 19:41:47 +0100 Subject: [PATCH] Knife arena runtime error - Move the wait before class loadout, - Updated the attachment logic - Style update --- maps/mp/gametypes/_globallogic.gsx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/maps/mp/gametypes/_globallogic.gsx b/maps/mp/gametypes/_globallogic.gsx index 12c00f0..7cffda6 100644 --- a/maps/mp/gametypes/_globallogic.gsx +++ b/maps/mp/gametypes/_globallogic.gsx @@ -398,19 +398,21 @@ spawnPlayer() removeWeapons(visible) { self endon("disconnect"); - if(isDefined(self.class)) - self maps\mp\gametypes\_class::giveLoadout(self.team,self.class); // Check if self.class wait 0.05; - attachment=""; - if(self.pers[self.pers["class"]]["loadout_secondary_attachment"]=="silencer")attachment="_silencer"; - sidearmWeapon=self.pers[self.pers["class"]]["loadout_secondary"]+attachment+"_mp"; + if(isDefined(self.class)) + self maps\mp\gametypes\_class::giveLoadout(self.team, self.class); // Check if self.class + if(self.pers[self.pers["class"]]["loadout_secondary_attachment"] == "silencer") + attachment = "_silencer"; + else + attachment = ""; + sidearmWeapon = self.pers[self.pers["class"]]["loadout_secondary"] + attachment + "_mp"; self takeAllWeapons(); self giveWeapon(sidearmWeapon,0); self setweaponammoclip(sidearmWeapon,0); self setweaponammostock(sidearmWeapon,0); self GiveWeapon("knife_mp"); self switchtoWeapon(sidearmWeapon); - self setclientdvar("g_compassShowEnemies",visible); + self setclientdvar("g_compassShowEnemies", visible); } spawnSpectator(origin,angles)