GetEventInt(event, "userid")
public Action TMR_Bounce(Handle tmr, any iC4)
{
if(iC4 != INVALID_ENT_REFERENCE && bombCanBounce)
{
...
}
// тут
}
На v34 не пашет(
L 06/29/2015 - 23:35:19: SourceMod error session started
L 06/29/2015 - 23:35:19: Info (map "de_dust2") (file "errors_20150629.log")
L 06/29/2015 - 23:35:19: [SM] Plugin encountered error 25: Call was aborted
L 06/29/2015 - 23:35:19: [SM] Native "SetFailState" reported: This plugin is for CSGO/CSS only.
L 06/29/2015 - 23:35:19: [SM] Displaying call stack trace for plugin "C4Bounce.smx":
L 06/29/2015 - 23:35:19: [SM] [0] Line 34, /groups/sourcemod/upload_tmp/textYF7P3W.sp::OnPluginStart()
Native "TeleportEntity" reported: Entity 476 is not valid
public Action TMR_Bounce(Handle tmr, any iC4)
{
if(iC4 != INVALID_ENT_REFERENCE && bombCanBounce)
{
float angles[3];
angles[0] = GetRandomFloat(-360.0, 360.0);
angles[1] = GetRandomFloat(-360.0, 360.0);
angles[2] = GetRandomFloat(GetConVarFloat(CVAR_MiniPowerJump), GetConVarFloat(CVAR_MaxiPowerJump));
TeleportEntity(iC4, NULL_VECTOR, NULL_VECTOR, angles);
TE_SetupBeamFollow(iC4, g_iBeamSprite, 0, 0.8, 1.0, 1.0, 1, g_ColorRed);
TE_SendToAll();
}
}
public Action TMR_Bounce(Handle tmr, any iC4)
{
if(IsValidEntity(iC4) && bombCanBounce)
{
float angles[3];
angles[0] = GetRandomFloat(-360.0, 360.0);
angles[1] = GetRandomFloat(-360.0, 360.0);
angles[2] = GetRandomFloat(GetConVarFloat(CVAR_MiniPowerJump), GetConVarFloat(CVAR_MaxiPowerJump));
TeleportEntity(iC4, NULL_VECTOR, NULL_VECTOR, angles);
TE_SetupBeamFollow(iC4, g_iBeamSprite, 0, 0.8, 1.0, 1.0, 1, g_ColorRed);
TE_SendToAll();
return Plugin_Continue;
}
return Plugin_Stop;
}