Quote:
Originally Posted by Bacardi
Not sure why not work...
So I script cheap one:
PHP Code:
/*
Server event "bomb_begindefuse", Tick 14022:
- "userid" = "2"
- "haskit" = "1"
m_flTimerLength 99.000000
m_flDefuseLength 5.000000
m_flDefuseCountDown 586.031250
m_iProgressBarDuration -1
m_flProgressBarStartTime 1598.687500
*/
ConVar sm_instadefuse_enabled;
#include <sdktools>
public void OnPluginStart()
{
sm_instadefuse_enabled = CreateConVar("sm_instadefuse_enabled", "1", _, _, true, 0.0, true, 1.0);
HookEvent("bomb_begindefuse", bomb_begindefuse);
}
public void bomb_begindefuse(Event event, char[] name, bool dontBroadcast)
{
if(!GetConVarBool(sm_instadefuse_enabled)) return;
int c4 = FindEntityByClassname(-1, "planted_c4");
if(c4 == -1) return;
RequestFrame(frame, EntIndexToEntRef(c4));
}
public void frame(int ref)
{
int c4 = EntRefToEntIndex(ref);
if(c4 == -1) return;
SetEntPropFloat(c4, Prop_Send, "m_flDefuseCountDown", GetGameTime());
}
- Works 100% on maps where is only one c4 planted.
|
As soon as i get back at home from work i'll give this a try, would it be possible to retain the messages feature? Still want to get some sort of visual-chat alert (No need for the time left, just a Could or Couldn't defuse in time basic message).
Sorry to ask for this much
spoon-feeding, not usually my go to thing but this is certainly out of my knowledge zone (Working on learning programming myself nonetheless, though i'm just a Junior Front-End Designer at the moment) i_i
Your help and time has been greatly appreciated so far! <3