So here it how y did it.
This is the code from ultimates.inl (the file where the ultimates functions are stored)
PHP Code:
/* VooDoo */
public Ult_VooDoo ( id )
{
if ( !Ult_Can_Use ( id, SKILLIDX_VOODOO) )
{
return PLUGIN_HANDLED;
}
if ( !ultimateused[id] )
{
new parm[2];
parm[0] = id;
parm[1] = 3;
godshealth[id] = get_user_health ( id );
hasgodmode[id] = true;
set_user_health_log ( id, get_user_health ( id ) + 2048 );
new Float:fTime = 5.0;
new iByte = 4;
if ( USE_ENH && ( p_attribs[id][ATTRIBIDX_INT] >= INT_MASTER_LEVEL ) )
{
iByte = 4;
fTime = 5.0;
}
else
{
fTime = 3.0;
iByte = 2;
}
set_task ( fTime, "Task_Reset_Godmode", TASK_RESET_GODMODE + id, parm, 2 );
if( Util_Should_Msg_Client(id) )
{
message_begin ( MSG_ONE, 108, { 0, 0, 0 }, id );
// Bar ( thanks to bad-at-this )
// duration
write_byte ( iByte );
// duration
write_byte ( 0 );
message_end ( );
}
if( Util_Should_Msg_Client_Alive( id ) )
{
if ( file_exists ( "sound/warcraft3/divineshield.wav" ) == 1 )
{
emit_sound ( id, CHAN_STATIC, "warcraft3/divineshield.wav", 1.0, ATTN_NORM, 0, PITCH_NORM );
set_user_rendering( id, kRenderFxGlowShell, 255, 245, 50, kRenderNormal, 16 );
}
}
ultimateused[id] = true;
icon_controller ( id );
}
return PLUGIN_HANDLED;
}
and this to task.inl (where the tasks are stored)
PHP Code:
/* voodoo */
public Task_Reset_Godmode ( parm[] )
{
new id = parm[0];
new name[32];
get_user_name ( id, name, 31 );
if ( godshealth[id] < 1 )
{
set_user_health_log ( id, 30 );
}
else
{
set_user_health_log ( id, godshealth[id] );
}
hasgodmode[id] = false;
set_task ( CVAR_VOODOO_COOLDOWN, "cooldown", TASK_COOLDOWN_RESET + id, parm, 1 );
set_user_rendering( id, kRenderFxGlowShell, 0, 0, 0, kRenderNormal, 16 );
if( Util_Should_Msg_Client(id) )
{
set_hudmessage ( 0, 100, 0, 0.05, 0.75, 2, 0.02, 10.0, 0.01, 0.1, 2 );
show_hudmessage ( id, "Your Voodoo has expired" );
}
icon_controller ( id );
return PLUGIN_CONTINUE;
}
Now it works.The glowing apears and disapears after the voodoo is gone but when in voodoo mode if y shot or switch weapon or enithing else besides moving and jumping it disapears.
Why?