author = "Boeing767 aka asdf",
public void OnPluginStart()
HookEvent("bomb_planted", Bomb);
hDistance = CreateConVar("sm_bomb_distance", "65.0")
void Bomb(Event event, char[] name, bool dontBroadcast)
float fPos[3], fAng[3], fOrg[3];
int temp = GetClientOfUserId(event.GetInt("userid"));
GetClientEyePosition(temp, fPos); GetClientEyeAngles(temp, fAng); GetClientEyePosition(temp, fOrg);
TR_TraceRayFilter(fPos, fAng, MASK_SOLID, RayType_Infinite, TR_Filter, temp);
temp = FindEntityByClassname(MaxClients+1, "planted_c4");
if(IsValidEntity(temp) && GetVectorDistance(fOrg, fPos) < hDistance.FloatValue)
TR_GetPlaneNormal(null, fAng);
GetVectorAngles(fAng, fAng);
fAng[0] -= 90.0; fAng[2] -= 180.0;
TeleportEntity(temp,fPos,fAng,NULL_VECTOR);
bool TR_Filter(int iEnt, int iMask, any iEntity){