Тема: Звук телепорта
Почему у телепорта нет звука,когда он телепортируется?
public plugin_precache()
{
precache_sound("allheroes/teleport.wav");
}
public cmdShoot(id)
{
if(teleport[id] && (get_gametime() - lastTeleport[id] >= userCooldawn[id]) && !ah_gotflag(id))
{
static origin[3], Float:teleport[3];
get_user_origin(id, origin, 3);
teleport[0] = float(origin[0]);
teleport[1] = float(origin[1]);
teleport[2] = float(origin[2] + 40);
if(teleport_player(id, teleport))
{
lastTeleport[id] = get_gametime();
emit_sound(id, CHAN_AUTO, "allheroes/teleport.wav", 1.0, ATTN_NORM, 0, PITCH_NORM);
set_hudmessage(180, 180, 180, 0.51, 0.51, 0, 6.0, (float(userCooldawn[id]) - 0.1), _, _, 3);
show_hudmessage(id, "[Cooldown]");
}
}
}
Отредактировано артист (04-08-2013 21:33)