splewis / csgo-retakes

CS:GO Sourcemod plugin for a site-retake gamemode
GNU General Public License v3.0
329 stars 115 forks source link

A Terrorist with a bomb should spawn with already holding the bomb #165

Open borzaka opened 5 years ago

borzaka commented 5 years ago

Expected behavior

A Terrorist with a bomb would spawn with already holding the bomb to be able to plant immediately. Like in any (competitive, casual) 5v5; if you are the one given the bomb, you spawn already holding it.

Actual behavior

Now a Terrorist who has the bomb spawns with holding a gun, and then switching to the bomb. This takes at least 2-3 seconds. And if you press any weapon switching key, you stop to switch to the bomb. Sometimes it's confusing, and you may forget you have the bomb.

TandelK commented 5 years ago

There are 2 solutions for this,

By default the Player has been given bomb when they spawn but if they dont wanna see and run across the map nothing can be done or the best is you can add Auto Plant System

splewis commented 5 years ago

but if they dont wanna see and run across the map nothing can be done

That's why the Retakes_OnFailToPlant forward exists, for the record.

bariod commented 5 years ago

You could also just decrease the planting time, right?

TandelK commented 5 years ago

@bariod that thing is related to game and cannot be modified without server cheats enabled. You can either use AutoPlant system which will completely remove Planting system manually by players and auto plant on Bomb Areas

RavageCS commented 5 years ago

Edit: Sorry I forgot to say you need a timer before doing the client command pasted what I've used below

Add: a timer that does ClientCommand(client, "slot5");

in spawns.sp

https://github.com/splewis/csgo-retakes/blob/master/scripting/retakes/spawns.sp#L187

I think doing ClientCommand(client, "use weapon_c4"); causes players hud to show incorrect weapon

RavageCS commented 5 years ago
if (g_BombOwner == client) {
    g_bombPlantSignal = false;
    GivePlayerItem(client, "weapon_c4");
    CreateTimer(1.0, Timer_StartPlant, client);
}

}

public Action Timer_StartPlant(Handle timer, int client) { if (IsPlayer(client)) { ClientCommand(client, "slot5"); } }

where 1.0 is the amount of time it pull bomb out

B3none commented 5 years ago

Alternatively you could use: https://github.com/b3none/retakes-autoplant

borzaka commented 5 years ago

Yes @b3none, I ended up using that. Or maybe not your plugin, I'am think I'am using this one: https://github.com/Technoblazed/sm-autoplant

B3none commented 5 years ago

@borzaka if you're looking for LTS then I'd suggest using mine :P Especially since that was just a released version of mine and a friends code with someone shamefully putting their name on it and claiming it as their own.

borzaka commented 5 years ago

Thanks. I will use your version in the future. I'am already using your Retakes HUD. Keep up the good work! ;)