Skocz do zawartości

Witamy w Nieoficjalnym polskim support'cie AMX Mod X

Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
  • Rozpoczynaj nowe tematy i odpowiedaj na inne
  • Zapisz się do tematów i for, aby otrzymywać automatyczne uaktualnienia
  • Dodawaj wydarzenia do kalendarza społecznościowego
  • Stwórz swój własny profil i zdobywaj nowych znajomych
  • Zdobywaj nowe doświadczenia

Dołączona grafika Dołączona grafika

Guest Message by DevFuse
 

Zdjęcie

Ganiany Jail Break


  • Nie możesz napisać tematu
  • Zaloguj się, aby dodać odpowiedź
Brak odpowiedzi do tego tematu

#1 Cheaters

    Życzliwy

  • Zbanowany

Reputacja: -9
Nowy

  • Postów:37
  • Imię:Kamil
  • Lokalizacja:Moszczenica
Offline

Napisano 02.10.2011 16:37

Witam.

proszę o Przerobienie tego .sma
na chowanego
poniewaz jak pisze /chowany to jest ciemno ale jak czas minie to sie rozswietla i jest normalnie
i proszę o dodanie CT zaczyna Szukac za (czas)

i czasu jest minuta

o to .sma

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#include <hamsandwich>
#include <fakemeta>
#include <fakemeta_util>

#define PLUGIN "Chowany"
#define VERSION "1.0"
#define AUTHOR "Gierek"
new g_tempid, chow
new stop[33]
new bron[33]
new Float:roundstart
new ch_time
new screenfade;
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)

register_clcmd("say /chowany", "chowanyspr");
register_clcmd("say_team /chowany", "chowanyspr");

register_event("CurWeapon","cur_weapon","be", "1=1");

register_forward(FM_CmdStart, "CmdStart");

RegisterHam(Ham_Spawn, "player", "Odrodzenie", 1);
RegisterHam(Ham_TakeDamage, "player", "TakeDamage");

register_logevent("round_start", 2, "1=Round_Start")
register_logevent("round_end", 2, "1=Round_End")

screenfade = get_user_msgid("ScreenFade")

register_cvar("ch_enable", "1")
ch_time = register_cvar("ch_time", "60.0")
register_cvar("ch_weapon", "1")
}
public cur_weapon(id)
{

if(!is_user_alive(id))
return PLUGIN_HANDLED;

static Float:nowtime
nowtime = get_gametime()

if(stop[id]==1 && chow==1 && nowtime - roundstart < get_cvar_float("mp_roundtime")*60)
engclient_cmd(id,"weapon_knife");

return PLUGIN_HANDLED;
}
public round_start()
{
roundstart = get_gametime()
}
public round_end()
{
chow=0
}
public CmdStart(id, uc_handle)
{
if(!is_user_alive(id))
return FMRES_IGNORED;


static Float: nowtime
nowtime = get_gametime()

if(chow==1)
{
if(nowtime - roundstart < get_cvar_float("mp_roundtime")*60)
{
if(stop[id] == 0)
set_user_maxspeed(id, 250.0);
if(stop[id] == 1)
set_user_maxspeed(id, 0.01);
}
else
{
set_user_maxspeed(id, 250.0);
if(bron[id]==1)
{
bron[id]=0
give_item(id, "weapon_m4a1")
cs_set_user_bpammo(id, CSW_M4A1, 120)
}
}
}
return FMRES_IGNORED;
}
public Odrodzenie(id)
{
if(!is_user_alive(id) || !is_user_connected(id))
return PLUGIN_CONTINUE;

set_user_maxspeed(id, 250.0);
return PLUGIN_CONTINUE;
}
public TakeDamage(this, idinflictor, idattacker, Float:damage, damagebits)
{
if(!is_user_alive(this) || !is_user_connected(this) || !is_user_connected(idattacker) || get_user_team(this) == get_user_team(idattacker))
return HAM_IGNORED;

span>( Float:nowtime
nowtime = get_gametime()

if(cs_get_user_team(idattacker) == CS_TEAM_T && cs_get_user_team(this) == CS_TEAM_CT)
{
if(chow==1 && nowtime - roundstart < get_cvar_float("mp_roundtime")*60)
{
set_user_frags(this,get_user_frags(this)+1)
user_kill(idattacker)
return HAM_SUPERCEDE
}
}
return HAM_IGNORED;
}
public chowanyspr(id)
{
if(get_cvar_num("ch_enable"))
{
if(cs_get_user_team(id) == CS_TEAM_T && !(get_user_flags(id) & ADMIN_IMMUNITY))
{
client_print(id, print_chat, "[Jail] Nie jestes Klawiszem");
return PLUGIN_HANDLED;
}
if(!is_user_alive(id) && !(get_user_flags(id) & ADMIN_IMMUNITY))
{
client_print(id, print_chat, "[Jail] Nie Zyjesz wiec nie mozesz uzywac tej komendy");
return PLUGIN_HANDLED;
}
if(chow==1)
{
client_print(id, print_chat, "[Jail] chowany jest już włączony");
return PLUGIN_HANDLED;
}
chow = 1
force_open()
chowany()
}
return PLUGIN_HANDLED;
}
public chowany()
{
new players[32], pnum
get_players(players, pnum)

new Float: czas = get_pcvar_float(ch_time)

for( new i; i<pnum;i++ )
{
g_tempid = players[i];

if(get_cvar_num("ch_weapon"))
bron[g_tempid] = 1
else
bron[g_tempid] = 0

if(get_user_team(g_tempid)==1 && is_user_alive(g_tempid))
{
stop[g_tempid] = 0
}
if(get_user_team(g_tempid)==2 && is_user_alive(g_tempid))
{
stop[g_tempid] = 1
message_begin( MSG_ONE, screenfade, _, g_tempid )
write_short( 1 << 12 )
write_short( 1 << 8 )
write_short( 1 << 0 )
write_byte( 0 )
write_byte( 0 )
write_byte( 0 )
write_byte( 255 )
message_end()
set_task( 0.3, "full_fade", g_tempid )
set_task( czas, "reset", g_tempid )
}
set_task(czas, "chowanystart", g_tempid)
}
}
public chowanystart(id)
{
if(get_user_team(id)==1 && is_user_alive(id))
{
stop[id] = 1
}
if(get_user_team(id)==2 && is_user_alive(id))
{
stop[id] = 0
}
return PLUGIN_HANDLED;
}
public force_open()
{
new ent = -1
while((ent = fm_find_ent_by_class(ent, "func_door")))
{
dllfunc(DLLFunc_Use, ent, 0)
}
}
public full_fade(id)
{
message_begin( MSG_ONE, screenfade, _, id )
write_short( 1 << 0 )
write_short( 1 << 0 )
write_short( 1 << 2 )
write_byte( 0 )
write_byte( 0 )
write_byte( 0 )
write_byte( 255 )
message_end()
}
public reset(id)
{
message_begin( MSG_ONE, screenfade, _, id)
write_short( 1 << 0 )
write_short( 1 << 0 )
write_short( 1 << 0 )
write_byte( 0 )
write_byte( 0 )
write_byte( 0 )
write_byte( 0 )
message_end()
}






Użytkownicy przeglądający ten temat: 0

0 użytkowników, 0 gości, 0 anonimowych