Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public Action Event_BeginDefuse(Event event, const char[] name, bool dontBroadcast)
- {
- int client_id = GetEventInt(event, "userid");
- int client = GetClientOfUserId(GetEventInt(event, "userid"));
- if (client > 0 && client < MaxClients && IsPlayerAlive(client) && IsClientRealVip(client))
- {
- CreateTimer(0.1, timer_delay, client_id);
- }
- return Plugin_Handled;
- }
- public Action timer_delay(Handle timer, int userid)
- {
- int client = GetClientOfUserId(userid);
- if(client != 0)
- {
- if(IsPlayerAlive(client))
- {
- int c4 = FindEntityByClassname(MaxClients+1, "planted_c4");
- if(c4 != -1)
- {
- SetEntPropFloat(c4, Prop_Send, "m_flDefuseCountDown", GetGameTime()+4.0);
- SetEntProp(client, Prop_Send, "m_iProgressBarDuration", RoundFloat(4.0));
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement