Possible fixes. Can any translate this code to 1.6?
Code:
if(IsFakeClient(client) && bombIsPlanted)
{
CS_RespawnPlayer(client);
ent = -1;
ent = FindEntityByClassname(ent, "planted_c4");
if(ent != -1)
{
float c4_position[3];
float player_position[3];
GetEntPropVector(ent, Prop_Send, "m_vecOrigin", c4_position);
GetEntPropVector(client, Prop_Send, "m_vecOrigin", player_position);
TeleportEntity(client, c4_position, NULL_VECTOR, NULL_VECTOR);
Event BombPlanted = CreateEvent("bomb_planted");
if(BombPlanted != null)
{
SetEventInt(BombPlanted, "userid", client);
SetEventInt(BombPlanted, "site", bombSite);
FireEvent(BombPlanted, true);
}
TeleportEntity(client, player_position, NULL_VECTOR, NULL_VECTOR);
}
}
else
{
CS_RespawnPlayer(client);
ent = -1;
ent = FindEntityByClassname(ent, "weapon_c4");
if(ent != -1 && (GetRandomInt(1, 10) <= 7))
{
//DebugLog("Found weapon_c4");
float c4_position[3];
float player_position[3];
GetEntPropVector(ent, Prop_Send, "m_vecOrigin", c4_position);
GetEntPropVector(client, Prop_Send, "m_vecOrigin", player_position);
TeleportEntity(client, c4_position, NULL_VECTOR, NULL_VECTOR);
TeleportEntity(client, player_position, NULL_VECTOR, NULL_VECTOR);
}
}
https://forums.alliedmods.net/showthread.php?t=321011
https://forums.alliedmods.net/showthread.php?p=2802279