Kod: Tümünü seç
public fw_SetModel(entity, model[])
{
if(!pev_valid(entity))
return FMRES_IGNORED
if(!equali(model, OLDWORLD_MODEL))
return FMRES_IGNORED
new className[33]
pev(entity, pev_classname, className, 32)
if(equal(className, "weaponbox") || equal(className, "armoury_entity") || equal(className, "grenade"))
{
engfunc(EngFunc_SetModel, entity, WORLD_MODEL)
return FMRES_SUPERCEDE
}
return FMRES_IGNORED
}
public Fwd_EmitSound(id, channel, const sample[], Float:volume, Float:attn, flags, pitch)
{
if (!is_user_connected(id))
return FMRES_IGNORED;
if(CTCuchillo[id])
{
if(get_user_team(id) == 2)
{
if (equal(sample[8], "kni", 3))
{
if (equal(sample[14], "sla", 3))
{
switch (random_num(1, 2))
{
case 1: engfunc(EngFunc_EmitSound, id, channel, ct_slash1, volume, attn, flags, pitch)
case 2: engfunc(EngFunc_EmitSound, id, channel, ct_slash2, volume, attn, flags, pitch)
}
return FMRES_SUPERCEDE;
}
if(equal(sample,"weapons/knife_deploy1.wav"))
{
engfunc(EngFunc_EmitSound, id, channel, ct_deploy, volume, attn, flags, pitch)
return FMRES_SUPERCEDE;
}
if (equal(sample[14], "hit", 3))
{
if (sample[17] == 'w')
{
engfunc(EngFunc_EmitSound, id, channel, ct_wall, volume, attn, flags, pitch)
return FMRES_SUPERCEDE;
}
else
{
switch (random_num(1, 4))
{
case 1: engfunc(EngFunc_EmitSound, id, channel, ct_hit1, volume, attn, flags, pitch)
case 2: engfunc(EngFunc_EmitSound, id, channel, ct_hit2, volume, attn, flags, pitch)
case 3: engfunc(EngFunc_EmitSound, id, channel, ct_hit3, volume, attn, flags, pitch)
case 4: engfunc(EngFunc_EmitSound, id, channel, ct_hit4, volume, attn, flags, pitch)
}
return FMRES_SUPERCEDE;
}
}
if (equal(sample[14], "sta", 3))
{
engfunc(EngFunc_EmitSound, id, channel, ct_stab, volume, attn, flags, pitch)
return FMRES_SUPERCEDE;
}
}
}
}
if(TCuchillo[id])
{
if(get_user_team(id) == 1)
{
if (equal(sample[8], "kni", 3))
{
if (equal(sample[14], "sla", 3))
{
switch (random_num(1, 2))
{
case 1: engfunc(EngFunc_EmitSound, id, channel, t_slash1, volume, attn, flags, pitch)
case 2: engfunc(EngFunc_EmitSound, id, channel, t_slash2, volume, attn, flags, pitch)
}
return FMRES_SUPERCEDE;
}
if(equal(sample,"weapons/knife_deploy1.wav"))
{
engfunc(EngFunc_EmitSound, id, channel, t_deploy, volume, attn, flags, pitch)
return FMRES_SUPERCEDE;
}
if (equal(sample[14], "hit", 3))
{
if (sample[17] == 'w')
{
engfunc(EngFunc_EmitSound, id, channel, t_wall, volume, attn, flags, pitch)
return FMRES_SUPERCEDE;
}
else
{
switch (random_num(1, 4))
{
case 1: engfunc(EngFunc_EmitSound, id, channel, t_hit1, volume, attn, flags, pitch)
case 2: engfunc(EngFunc_EmitSound, id, channel, t_hit2, volume, attn, flags, pitch)
case 3: engfunc(EngFunc_EmitSound, id, channel, t_hit3, volume, attn, flags, pitch)
case 4: engfunc(EngFunc_EmitSound, id, channel, t_hit4, volume, attn, flags, pitch)
}
return FMRES_SUPERCEDE;
}
}
if (equal(sample[14], "sta", 3))
{
engfunc(EngFunc_EmitSound, id, channel, t_stab, volume, attn, flags, pitch)
return FMRES_SUPERCEDE;
}
}
}
}
if(Destapador[id])
{
if (equal(sample[8], "kni", 3))
{
if (equal(sample[14], "sla", 3))
{
switch (random_num(1, 2))
{
case 1: engfunc(EngFunc_EmitSound, id, channel, palo_slash1, volume, attn, flags, pitch)
case 2: engfunc(EngFunc_EmitSound, id, channel, palo_slash2, volume, attn, flags, pitch)
}
return FMRES_SUPERCEDE;
}
if(equal(sample,"weapons/knife_deploy1.wav"))
{
engfunc(EngFunc_EmitSound, id, channel, palo_deploy, volume, attn, flags, pitch)
return FMRES_SUPERCEDE;
}
if (equal(sample[14], "hit", 3))
{
if (sample[17] == 'w')
{
engfunc(EngFunc_EmitSound, id, channel, palo_wall, volume, attn, flags, pitch)
return FMRES_SUPERCEDE;
}
else
{
switch (random_num(1, 4))
{
case 1:engfunc(EngFunc_EmitSound, id, channel, palo_hit1, volume, attn, flags, pitch)
case 2:engfunc(EngFunc_EmitSound, id, channel, palo_hit2, volume, attn, flags, pitch)
case 3:engfunc(EngFunc_EmitSound, id, channel, palo_hit3, volume, attn, flags, pitch)
case 4:engfunc(EngFunc_EmitSound, id, channel, palo_hit4, volume, attn, flags, pitch)
}
return FMRES_SUPERCEDE;
}
}
if (equal(sample[14], "sta", 3))
{
engfunc(EngFunc_EmitSound, id, channel, palo_stab, volume, attn, flags, pitch)
return FMRES_SUPERCEDE;
}
}
}
if(Hacha[id])
{
if (equal(sample[8], "kni", 3))
{
if (equal(sample[14], "sla", 3))
{
switch (random_num(1, 2))
{
case 1: engfunc(EngFunc_EmitSound, id, channel, hacha_slash1, volume, attn, flags, pitch)
case 2: engfunc(EngFunc_EmitSound, id, channel, hacha_slash2, volume, attn, flags, pitch)
}
return FMRES_SUPERCEDE;
}
if(equal(sample,"weapons/knife_deploy1.wav"))
{
engfunc(EngFunc_EmitSound, id, channel, hacha_deploy, volume, attn, flags, pitch)
return FMRES_SUPERCEDE;
}
if (equal(sample[14], "hit", 3))
{
if (sample[17] == 'w')
{
engfunc(EngFunc_EmitSound, id, channel, hacha_wall, volume, attn, flags, pitch)
return FMRES_SUPERCEDE;
}
else
{
switch (random_num(1, 3))
{
case 1: engfunc(EngFunc_EmitSound, id, channel, hacha_hit1, volume, attn, flags, pitch)
case 2: engfunc(EngFunc_EmitSound, id, channel, hacha_hit2, volume, attn, flags, pitch)
case 3: engfunc(EngFunc_EmitSound, id, channel, hacha_hit3, volume, attn, flags, pitch)
}
return FMRES_SUPERCEDE;
}
}
if (equal(sample[14], "sta", 3))
{
engfunc(EngFunc_EmitSound, id, channel, hacha_stab, volume, attn, flags, pitch)
return FMRES_SUPERCEDE;
}
}
}
if(Machete[id])
{
if (equal(sample[8], "kni", 3))
{
if (equal(sample[14], "sla", 3))
{
switch (random_num(1, 2))
{
case 1: engfunc(EngFunc_EmitSound, id, channel, machete_slash1, volume, attn, flags, pitch)
case 2: engfunc(EngFunc_EmitSound, id, channel, machete_slash2, volume, attn, flags, pitch)
}
return FMRES_SUPERCEDE;
}
if(equal(sample,"weapons/knife_deploy1.wav"))
{
engfunc(EngFunc_EmitSound, id, channel, machete_deploy, volume, attn, flags, pitch)
return FMRES_SUPERCEDE;
}
if (equal(sample[14], "hit", 3))
{
if (sample[17] == 'w')
{
engfunc(EngFunc_EmitSound, id, channel, machete_wall, volume, attn, flags, pitch)
return FMRES_SUPERCEDE;
}
else // hit
{
switch (random_num(1, 4))
{
case 1: engfunc(EngFunc_EmitSound, id, channel, machete_hit1, volume, attn, flags, pitch)
case 2: engfunc(EngFunc_EmitSound, id, channel, machete_hit2, volume, attn, flags, pitch)
case 3: engfunc(EngFunc_EmitSound, id, channel, machete_hit3, volume, attn, flags, pitch)
case 4: engfunc(EngFunc_EmitSound, id, channel, machete_hit4, volume, attn, flags, pitch)
}
return FMRES_SUPERCEDE;
}
}
if (equal(sample[14], "sta", 3))
{
engfunc(EngFunc_EmitSound, id, channel, machete_stab, volume, attn, flags, pitch)
return FMRES_SUPERCEDE;
}
}
}
if(Motocierra[id])
{
if (equal(sample[8], "kni", 3))
{
if (equal(sample[14], "sla", 3))
{
engfunc(EngFunc_EmitSound, id, channel, motocierra_slash, volume, attn, flags, pitch)
return FMRES_SUPERCEDE;
}
if(equal(sample,"weapons/knife_deploy1.wav"))
{
engfunc(EngFunc_EmitSound, id, channel, motocierra_deploy, volume, attn, flags, pitch)
return FMRES_SUPERCEDE;
}
if (equal(sample[14], "hit", 3))
{
if (sample[17] == 'w')
{
engfunc(EngFunc_EmitSound, id, channel, motocierra_wall, volume, attn, flags, pitch)
return FMRES_SUPERCEDE;
}
else
{
switch (random_num(1, 2))
{
case 1: engfunc(EngFunc_EmitSound, id, channel, motocierra_hit1, volume, attn, flags, pitch)
case 2: engfunc(EngFunc_EmitSound, id, channel, motocierra_hit2, volume, attn, flags, pitch)
}
return FMRES_SUPERCEDE;
}
}
if (equal(sample[14], "sta", 3))
{
engfunc(EngFunc_EmitSound, id, channel, motocierra_stab, volume, attn, flags, pitch)
return FMRES_SUPERCEDE;
}
}
}
return FMRES_IGNORED;
}