Advertisement
Guest User

Untitled

a guest
Sep 15th, 2020
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. public Action Event_BeginDefuse(Event event, const char[] name, bool dontBroadcast)
  2. {
  3. int client_id = GetEventInt(event, "userid");
  4. int client = GetClientOfUserId(GetEventInt(event, "userid"));
  5.  
  6. if (client > 0 && client < MaxClients && IsPlayerAlive(client) && IsClientRealVip(client))
  7. {
  8. CreateTimer(0.1, timer_delay, client_id);
  9. }
  10. return Plugin_Handled;
  11. }
  12.  
  13. public Action timer_delay(Handle timer, int userid)
  14. {
  15. int client = GetClientOfUserId(userid);
  16. if(client != 0)
  17. {
  18. if(IsPlayerAlive(client))
  19. {
  20. int c4 = FindEntityByClassname(MaxClients+1, "planted_c4");
  21. if(c4 != -1)
  22. {
  23. SetEntPropFloat(c4, Prop_Send, "m_flDefuseCountDown", GetGameTime()+4.0);
  24. SetEntProp(client, Prop_Send, "m_iProgressBarDuration", RoundFloat(4.0));
  25. }
  26. }
  27. }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement