Spoiler
PHP Code:
#include <sdktools>
public void OnPluginStart()
{
HookEvent("bomb_planted", bomb_planted);
}
public void bomb_planted(Event event, const char[] name, bool dontBroadcast)
{
int client = GetClientOfUserId(event.GetInt("userid"));
float pos[3];
GetClientAbsOrigin(client, pos);
pos[2] += 300.0;
TeleportEntity(client, pos, NULL_VECTOR, NULL_VECTOR);
}
https://youtu.be/CNKhTHkQlv8
PHP Code:
#include <sdktools>
public void OnPluginStart()
{
HookEvent("bomb_planted", bomb_planted);
}
public void bomb_planted(Event event, const char[] name, bool dontBroadcast)
{
int entity = MaxClients+1;
entity = FindEntityByClassname(entity, "planted_c4");
if(entity == -1) return;
PrintToServer("planted_c4 %i", entity);
float position[3];
GetEntPropVector(entity, Prop_Send, "m_vecOrigin", position);
position[2] += 100.0;
TE_SetupSparks(position, NULL_VECTOR, 5, 20);
TE_SendToAllInRange(position, RangeType_Visibility, 0.0);
}
__________________