Quote:
public Action Timer_Pipe(Handle timer, DataPack dp)
{
dp.Reset();
int witch = EntRefToEntIndex(dp.ReadCell());
if( witch && witch != INVALID_ENT_REFERENCE && IsValidEntity(witch) )
{
if( g_bAlive[witch] )
{
int attacker = GetClientOfUserId(dp.ReadCell());
if( attacker && IsClientInGame(attacker) )
{
SDKUnhook(witch, SDKHook_OnTakeDamage, OnTakeDamage);
g_iShield[witch] = -1;
InsertPipe(witch, attacker, -1, g_hCvarPipeTime.IntValue);
DataPack dp2 = new DataPack();
dp2.WriteCell(EntIndexToEntRef(witch));
dp2.WriteCell(0);
dp2.WriteCell(1); // assign victim
CreateTimer(g_hCvarPipeTime.FloatValue, Timer_Fire, dp2, TIMER_FLAG_NO_MAPCHANGE | TIMER_HNDL_CLOSE);
}
}
}
return Plugin_Continue;
}
|
like so?
~~~~~
got this when compiled
~~~~
//SourceMod Batch Compiler
// by the SourceMod Dev Team
//// l4d_witch_bomber.sp
//
// l4d_witch_bomber.sp(341) : warning 203: symbol is never used: "vShield"
// Code size: 20088 bytes
// Data size: 70552 bytes
// Stack/heap size: 16724 bytes
// Total requirements: 107364 bytes
//
// 1 Warning.
//
// Compilation Time: 1.3 sec
// ----------------------------------------
Press enter to exit ...