13/07/2019, 03:06 PM
(Última modificación: 13/07/2019, 03:07 PM por +rdNN!. Edited 1 time in total.)
tengo problema con este mod de agustin la verdad es que al quedar terroristas vivo me dice han ganado los antiterroristas y eso que aun quedan vivos y otra cosa es que cuando dropeo las armas me quedan en el suelo y las pueden recoger porfavor ayuda
Código PHP:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <hamsandwich>
#include <fun>
#include <fakemeta>
#include <cstrike>
#define PLUGIN "Simple Hide N' Seek"
#define VERSION "1.0"
#define AUTHOR "AGustiN"
new g_count
new hnscount
new hnshe
new hnsfb
new hnssg
const TASK_ID = 2016
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
RegisterHam(Ham_Spawn, "player", "fw_Spawn", 1);
register_event("HLTV", "RoundStart", "a", "1=0", "2=0")
register_event ("SendAudio", "AntiTerroristWin", "a", "1=0", "2=%!MRAD_ctwin");
register_event ("SendAudio", "TerroristWin", "a", "1=0", "2=%!MRAD_terwin");
register_forward(FM_CmdStart, "fwdCmdStart", 0);
register_forward(FM_PlayerPreThink, "fwdPlayerPreThink", 0);
hnshe = register_cvar("hns_he", "0", ADMIN_ADMIN)
hnsfb = register_cvar("hns_fb", "0", ADMIN_ADMIN)
hnssg = register_cvar("hns_sg", "1", ADMIN_ADMIN)
hnscount = register_cvar("hns_count", "10", ADMIN_ADMIN)
// Add your code here...
}
public fwdPlayerPreThink(id) {
if(is_user_alive(id)) {
if( g_count >= 1 && get_user_team(id) == 2) {
set_pev(id, pev_maxspeed, -1.0);
set_pev(id, pev_velocity, Float:{0.0, 0.0, 0.0});
}
}
}
public AntiTerroristWin()
{
set_hudmessage(0, 255, 0, -1.0, -1.0, 0, 6.0, 12.0)
show_hudmessage(0, "Seekers Ganan^nHay cambio de equipo")
for(new i = 0; i < get_maxplayers(); i++ )
{
if(!is_user_connected(i))continue
switch( cs_get_user_team( i ) )
{
case CS_TEAM_CT: cs_set_user_team( i, CS_TEAM_T )
case CS_TEAM_T: cs_set_user_team( i, CS_TEAM_CT )
}
}
}
public TerroristWin()
{
set_hudmessage(0, 255, 0, -1.0, -1.0, 0, 6.0, 12.0)
show_hudmessage(0, "Hiders Ganan^nNo hay cambio de equipo")
}
public RoundStart() {
remove_task(TASK_ID)
g_count = get_pcvar_num(hnscount)
set_task(1.0, "Conteo", TASK_ID, _, _, "a", g_count)
}
public Conteo() {
g_count--
new sSound[16]
num_to_word(g_count, sSound, 15);
set_hudmessage(0, 255, 0, -1.0, -1.0, 0, 6.0, 12.0)
if(g_count) {
show_hudmessage(0, "Quedan %d segundo%s^nPara esconderse", g_count, g_count > 1 ? "s" : "")
client_cmd(0, "spk vox/%s.wav", sSound)
for(new i = 0; i < get_maxplayers(); i++) {
if(!is_user_alive(i) || get_user_team(i) != 2)
continue;
ScreenFade(i, 1.0, 0, 0, 0, 100)
}
}
else {
remove_task(TASK_ID)
show_hudmessage(0, "Termino el tiempo!")
for(new i = 0; i < get_maxplayers(); i++) {
SetItem(i)
if(!is_user_alive(i) || get_user_team(i) != 2)
continue;
engfunc(EngFunc_SetClientMaxspeed, i, 250.0);
set_pev(i, pev_maxspeed, 250.0);
}
}
}
public fwdCmdStart(id, ucHandle, seed) {
if(!is_user_alive(id)) return FMRES_IGNORED;
static clip, ammo;
if(get_user_weapon(id, clip, ammo) != CSW_KNIFE)
return FMRES_IGNORED
if(get_user_team(id) == 1) {
new button = get_uc(ucHandle, UC_Buttons);
if( button&IN_ATTACK )
button &= ~IN_ATTACK;
if( button&IN_ATTACK2 )
button &= ~IN_ATTACK2;
set_uc(ucHandle, UC_Buttons, button);
return FMRES_SUPERCEDE;
}
else if(get_user_team(id)== 2) {
new button = get_uc(ucHandle, UC_Buttons);
if( button&IN_ATTACK ) {
button &= ~IN_ATTACK;
button |= IN_ATTACK2;
}
set_uc(ucHandle, UC_Buttons, button);
return FMRES_SUPERCEDE;
}
return FMRES_IGNORED;
}
public SetItem(id) {
if(!is_user_alive(id)) return;
if(get_user_team(id) == 1) {
if(get_pcvar_num(hnshe))
give_item(id, "weapon_hegrenade")
if(get_pcvar_num(hnsfb))
give_item(id, "weapon_flashbang")
if(get_pcvar_num(hnssg))
give_item(id, "weapon_smokegrenade")
}
}
public fw_Spawn(id)
{
if(!is_user_alive(id)) return;
strip_user_weapons(id)
give_item(id , "weapon_knife")
}
public JoinTeam(id) {
engclient_cmd(id, "jointeam", "5")
engclient_cmd(id, "joinclass", "5")
}
public client_putinserver(id)
set_task(0.1, "JoinTeam", id)
stock ScreenFade(plr, Float:fDuration, red, green, blue, alpha)
{
new i = plr ? plr : get_maxplayers();
if( !i )
{
return 0;
}
message_begin(plr ? MSG_ONE : MSG_ALL, get_user_msgid( "ScreenFade"), {0, 0, 0}, plr);
write_short(floatround(4096.0 * fDuration, floatround_round));
write_short(floatround(4096.0 * fDuration, floatround_round));
write_short(4096);
write_byte(red);
write_byte(green);
write_byte(blue);
write_byte(alpha);
message_end();
return 1;
}