Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public PlayerBlind_Post(const id, const inflictor, const attacker, const Float:fadeTime, const Float:fadeHold, const alpha, Float:color[3])
- {
- if(alpha)
- {
- if(g_ePlayerData[id][SPRITE_ID])
- return;
- g_ePlayerData[id][BLIND_TIME] = get_gametime() + fadeHold;
- g_ePlayerData[id][FINISH_FLASH] = get_gametime() + (fadeTime-fadeHold);
- new Float:frame; frame = alpha == 255 ? 99.0 : alpha/255.0*100.0;
- new iEnt = rg_create_entity("info_target", true);
- if(iEnt)
- {
- set_entvar(iEnt, var_classname, SPRITE_CLASSNAME);
- set_entvar(iEnt, var_impulse, SPRITE_IMPULSE);
- set_entvar(iEnt, var_movetype, MOVETYPE_FOLLOW);
- set_entvar(iEnt, var_aiment, id);
- engfunc(EngFunc_SetModel, iEnt, SPRITE);
- set_entvar(iEnt, var_scale, SPRITE_SCALE);
- set_entvar(iEnt, var_frame, frame);
- set_entvar(iEnt, var_groupinfo, MaskEnt(attacker));
- SetThink(iEnt, "SpriteThink");
- set_entvar(iEnt, var_nextthink, 0.1);
- }
- g_ePlayerData[id][SPRITE_ID] = iEnt;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement