Advertisement
Guest User

Untitled

a guest
Jul 19th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.14 KB | None | 0 0
  1. public PlayerBlind_Post(const id, const inflictor, const attacker, const Float:fadeTime, const Float:fadeHold, const alpha, Float:color[3])
  2. {
  3. if(alpha)
  4. {
  5. if(g_ePlayerData[id][SPRITE_ID])
  6. return;
  7.  
  8. g_ePlayerData[id][BLIND_TIME] = get_gametime() + fadeHold;
  9. g_ePlayerData[id][FINISH_FLASH] = get_gametime() + (fadeTime-fadeHold);
  10. new Float:frame; frame = alpha == 255 ? 99.0 : alpha/255.0*100.0;
  11.  
  12. new iEnt = rg_create_entity("info_target", true);
  13.  
  14. if(iEnt)
  15. {
  16. set_entvar(iEnt, var_classname, SPRITE_CLASSNAME);
  17. set_entvar(iEnt, var_impulse, SPRITE_IMPULSE);
  18. set_entvar(iEnt, var_movetype, MOVETYPE_FOLLOW);
  19. set_entvar(iEnt, var_aiment, id);
  20. engfunc(EngFunc_SetModel, iEnt, SPRITE);
  21. set_entvar(iEnt, var_scale, SPRITE_SCALE);
  22. set_entvar(iEnt, var_frame, frame);
  23. set_entvar(iEnt, var_groupinfo, MaskEnt(attacker));
  24.  
  25. SetThink(iEnt, "SpriteThink");
  26. set_entvar(iEnt, var_nextthink, 0.1);
  27. }
  28. g_ePlayerData[id][SPRITE_ID] = iEnt;
  29. }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement