csgo-retakes
csgo-retakes copied to clipboard
A Terrorist with a bomb should spawn with already holding the bomb
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.
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
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.
You could also just decrease the planting time, right?
@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
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
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
Alternatively you could use: https://github.com/b3none/retakes-autoplant
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
@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.
Thanks. I will use your version in the future. I'am already using your Retakes HUD. Keep up the good work! ;)