Skocz do zawartości

  • Zaloguj korzystając z Facebooka Zaloguj korzystając z Twittera Zaloguj przez Steam Zaloguj poprzez Google      Logowanie »   
  • Rejestracja

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
Modyfikacja

Dodanie opcji DM

Modyfikacja

  • Zamknięty Temat jest zamknięty
2 odpowiedzi w tym temacie

#1 k00wb0j.

    Zaawansowany

  • Użytkownik

Reputacja: 4
Nowy

  • Postów:89
Offline

Napisano 13.12.2009 01:25

Dałoby rade dodać do tego pluginu opcje DM ?

#include <amxmodx>
#include <fun>

new bool:isrestart = false
new timer

public plugin_init()
{
  register_plugin("Crazy Restart", "4.8", "Salamon")

  register_event("TextMsg","start","a","2&#Game_C")
   
  register_cvar("crazy_restart","1")
  register_cvar("crazy_restart_time","45")
  register_cvar("crazy_restart_weapon","weapon_hegrenade")

  register_clcmd("drop","block")
  register_clcmd("cl_setautobuy","block")
  register_clcmd("cl_autobuy","block")
  register_clcmd("cl_setrebuy","block")
  register_clcmd("cl_rebuy","block")
  register_clcmd("buy","block")
  register_clcmd("glock","block")
  register_clcmd("usp","block")
  register_clcmd("p228","block")
  register_clcmd("deagle","block")
  register_clcmd("elites","block")
  register_clcmd("fn57","block")
  register_clcmd("m3","block")
  register_clcmd("autoshotgun","block")
  register_clcmd("mac10","block")
  register_clcmd("tmp","block")
  register_clcmd("mp5","block")
  register_clcmd("ump45","block")
  register_clcmd("p90","block")
  register_clcmd("galil","block")
  register_clcmd("ak47","block")
  register_clcmd("scout","block")
  register_clcmd("sg552","block")
  register_clcmd("awp","block")
  register_clcmd("g3sg1","block")
  register_clcmd("famas","block")
  register_clcmd("m4a1","block")
  register_clcmd("bullpup","block")
  register_clcmd("sg550","block")
  register_clcmd("m249","block")
  register_clcmd("shield","block")
  register_clcmd("primammo","block")
  register_clcmd("secammo","block")
  register_clcmd("vest","block")
  register_clcmd("vesthelm","block")
  register_clcmd("flash","block")
  register_clcmd("hegren","block")
  register_clcmd("sgren","block")
  register_clcmd("nvgs","block")

  register_clcmd("weapon_knife", "block")
  register_clcmd("weapon_sg550", "block")
  register_clcmd("weapon_mac10", "block")
  register_clcmd("weapon_aug", "block")
  register_clcmd("weapon_xm1014", "block")
  register_clcmd("weapon_p90", "block")
  register_clcmd("weapon_c4", "block")
  register_clcmd("weapon_tmp", "block")
  register_clcmd("weapon_mp5navy", "block")
  register_clcmd("weapon_ump45", "block")
  register_clcmd("weapon_m4a1", "block")
  register_clcmd("weapon_awp", "block")
  register_clcmd("weapon_g3sg1", "block")
  register_clcmd("weapon_sg552", "block")
  register_clcmd("weapon_scout", "block")
  register_clcmd("weapon_m3", "block")
  register_clcmd("weapon_m249", "block")
  register_clcmd("weapon_ak47", "block")
  register_clcmd("weapon_fiveseven", "block")
  register_clcmd("weapon_usp", "block")
  register_clcmd("weapon_glock18", "block")
  register_clcmd("weapon_deagle", "block")
  register_clcmd("weapon_p228", "block")
  register_clcmd("weapon_elite", "block")
  register_clcmd("weapon_flashbang", "block")
  register_clcmd("weapon_hegrenade", "block")
  register_clcmd("weapon_smokegrenade", "block")

  register_clcmd("lastinv", "block")
}

public start()
{
  timer = get_cvar_num("crazy_restart_time")

  new Float:res_time = get_cvar_float("crazy_restart_time")

  if(get_cvar_num("crazy_restart") == 1)
   {
    isrestart = true

//dodajemy pluginy ktore chcemy zatrzymac na czas rundy nozowej
//a robimy to w nastepujacy sposob
//server_cmd("amx_pausecfg pause nazwa_pluginu.amxx")
//server_cmd("amx_pausecfg pause nazwa_pluginu2.amxx")
//dopisujemy te pluginy ktore chcemy zatrzymac i te same spowrotem
//wlaczamy nizej

    set_task(res_time + 1, "end")
    set_task(1.0, "count_me", 123, _, _, "b")
    set_task(1.0, "ammo", 123, _, _, "b")
   }
}

public ammo()
{
  new weapon[192]
  get_cvar_string("crazy_restart_weapon", weapon, 191)

  for(new i = 1; i <= get_playersnum(); i++)
  {
  give_item(i, weapon)
  engclient_cmd(i, weapon)
  }
}

public end()
{
 isrestart = false

 remove_task(123)

//tu spowrotem wlaczamy pluginy ktore zatrzymalismy wyzej
//server_cmd("amx_pausecfg enable nazwa_pluginu.amxx")
//server_cmd("amx_pausecfg enable nazwa_pluginu2.amxx")
//robimy tak z kazdym, a jak widac jedyne co sie zmienia to enable

 set_cvar_num("sv_restartround",1)
}

public count_me()
{
    new red = random_num(5,255)
    new green = random_num(5,255)
    new blue = random_num(5,255)  

    set_hudmessage(red, green, blue, -1.0, 0.01, 0, 0.1, 0.92, 0.1, 0.1, -1)
    show_hudmessage(0,"******************************^n Restart za %i sekund ^n******************************", timer)

    if(timer == 3)
    {
    client_cmd(0, "spk vox/three.wav")
    }
    if(timer == 2)
    {
    client_cmd(0, "spk vox/two.wav")
    }
    if(timer == 1)
    {
    client_cmd(0, "spk vox/one.wav")
    }
    timer--
}

public block(id)
{
    if(isrestart)
        return PLUGIN_HANDLED
   
    return PLUGIN_CONTINUE
}

  • +
  • -
  • 0

#2 DarkGL

    Nie oddam ciasteczka !

  • Administrator

Reputacja: 6033
Godlike

  • Postów:10831
  • GG:
  • Steam:steam
  • Imię:Rafał
  • Lokalizacja:Warszawa
Offline

Napisano 13.12.2009 10:09

#include <amxmodx>

#include <amxmisc>

#include <cstrike>

#include <fun>

#include <fakemeta>





new bool:isrestart = false 

new timer 



public plugin_init() 

{ 

	register_plugin("Crazy Restart", "4.8", "Salamon") 

	

	register_event("TextMsg","start","a","2&#Game_C") 

	register_event("DeathMsg", "DeathMsg", "a") 

	

	register_cvar("crazy_restart","1") 

	register_cvar("crazy_restart_time","45") 

	register_cvar("crazy_restart_weapon","weapon_hegrenade") 

	

	register_clcmd("drop","block") 

	register_clcmd("cl_setautobuy","block") 

	register_clcmd("cl_autobuy","block") 

	register_clcmd("cl_setrebuy","block") 

	register_clcmd("cl_rebuy","block") 

	register_clcmd("buy","block") 

	register_clcmd("glock","block") 

	register_clcmd("usp","block") 

	register_clcmd("p228","block") 

	register_clcmd("deagle","block") 

	register_clcmd("elites","block") 

	register_clcmd("fn57","block") 

	register_clcmd("m3","block") 

	register_clcmd("autoshotgun","block") 

	register_clcmd("mac10","block") 

	register_clcmd("tmp","block") 

	register_clcmd("mp5","block") 

	register_clcmd("ump45","block") 

	register_clcmd("p90","block") 

	register_clcmd("galil","block") 

	register_clcmd("ak47","block") 

	register_clcmd("scout","block") 

	register_clcmd("sg552","block") 

	register_clcmd("awp","block") 

	register_clcmd("g3sg1","block") 

	register_clcmd("famas","block") 

	register_clcmd("m4a1","block") 

	register_clcmd("bullpup","block") 

	register_clcmd("sg550","block") 

	register_clcmd("m249","block") 

	register_clcmd("shield","block") 

	register_clcmd("primammo","block") 

	register_clcmd("secammo","block") 

	register_clcmd("vest","block") 

	register_clcmd("vesthelm","block") 

	register_clcmd("flash","block") 

	register_clcmd("hegren","block") 

	register_clcmd("sgren","block") 

	register_clcmd("nvgs","block") 

	

	register_clcmd("weapon_knife", "block") 

	register_clcmd("weapon_sg550", "block") 

	register_clcmd("weapon_mac10", "block") 

	register_clcmd("weapon_aug", "block") 

	register_clcmd("weapon_xm1014", "block") 

	register_clcmd("weapon_p90", "block") 

	register_clcmd("weapon_c4", "block") 

	register_clcmd("weapon_tmp", "block") 

	register_clcmd("weapon_mp5navy", "block") 

	register_clcmd("weapon_ump45", "block") 

	register_clcmd("weapon_m4a1", "block") 

	register_clcmd("weapon_awp", "block") 

	register_clcmd("weapon_g3sg1", "block") 

	register_clcmd("weapon_sg552", "block") 

	register_clcmd("weapon_scout", "block") 

	register_clcmd("weapon_m3", "block") 

	register_clcmd("weapon_m249", "block") 

	register_clcmd("weapon_ak47", "block") 

	register_clcmd("weapon_fiveseven", "block") 

	register_clcmd("weapon_usp", "block") 

	register_clcmd("weapon_glock18", "block") 

	register_clcmd("weapon_deagle", "block") 

	register_clcmd("weapon_p228", "block") 

	register_clcmd("weapon_elite", "block") 

	register_clcmd("weapon_flashbang", "block") 

	register_clcmd("weapon_hegrenade", "block") 

	register_clcmd("weapon_smokegrenade", "block") 

	

	register_clcmd("lastinv", "block") 

} 



public DeathMsg(){ 

	new victim = read_data(2) 

	if(isrestart){

		set_task(1.0,"respawn_player",victim); 

	}

} 



public respawn_player(id) 

{      

	if (!is_user_connected(id) || is_user_alive(id) || cs_get_user_team(id) == CS_TEAM_SPECTATOR){ 

		return; 

	} 

	

	set_pev(id, pev_deadflag, DEAD_RESPAWNABLE)

	dllfunc(DLLFunc_Think, id) 

	

	if(pev(id, pev_deadflag) == DEAD_RESPAWNABLE) 

	{ 

		dllfunc(DLLFunc_Spawn, id) 

	} 

}



public start() 

{ 

	timer = get_cvar_num("crazy_restart_time") 

	

	new Float:res_time = get_cvar_float("crazy_restart_time") 

	

	if(get_cvar_num("crazy_restart") == 1) 

	{ 

		isrestart = true 

		

		//dodajemy pluginy ktore chcemy zatrzymac na czas rundy nozowej 

		//a robimy to w nastepujacy sposob 

		//server_cmd("amx_pausecfg pause nazwa_pluginu.amxx") 

		//server_cmd("amx_pausecfg pause nazwa_pluginu2.amxx") 

		//dopisujemy te pluginy ktore chcemy zatrzymac i te same spowrotem 

		//wlaczamy nizej 

		

		set_task(res_time + 1, "end") 

		set_task(1.0, "count_me", 123, _, _, "b") 

		set_task(1.0, "ammo", 123, _, _, "b") 

	} 

} 



public ammo() 

{ 

	new weapon[192] 

	get_cvar_string("crazy_restart_weapon", weapon, 191) 

	

	for(new i = 1; i <= get_playersnum(); i++) 

	{ 

		give_item(i, weapon) 

		engclient_cmd(i, weapon) 

	} 

} 



public end() 

{ 

	isrestart = false 

	

	remove_task(123) 

	

	//tu spowrotem wlaczamy pluginy ktore zatrzymalismy wyzej 

	//server_cmd("amx_pausecfg enable nazwa_pluginu.amxx") 

	//server_cmd("amx_pausecfg enable nazwa_pluginu2.amxx") 

	//robimy tak z kazdym, a jak widac jedyne co sie zmienia to enable 

	

	set_cvar_num("sv_restartround",1) 

} 



public count_me() 

{ 

	new red = random_num(5,255) 

	new green = random_num(5,255) 

	new blue = random_num(5,255)  

	

	set_hudmessage(red, green, blue, -1.0, 0.01, 0, 0.1, 0.92, 0.1, 0.1, -1) 

	show_hudmessage(0,"******************************^n Restart za %i sekund ^n******************************", timer) 

	

	if(timer == 3) 

	{ 

		client_cmd(0, "spk vox/three.wav") 

	} 

	if(timer == 2) 

	{ 

		client_cmd(0, "spk vox/two.wav") 

	} 

	if(timer == 1) 

	{ 

		client_cmd(0, "spk vox/one.wav") 

	} 

	timer-- 

} 



public block(id) 

{ 

	if(isrestart) 

		return PLUGIN_HANDLED 

	

	return PLUGIN_CONTINUE 

}

  • +
  • -
  • 0

#3 k00wb0j.

    Zaawansowany

  • Autor tematu
  • Użytkownik

Reputacja: 4
Nowy

  • Postów:89
Offline

Napisano 13.12.2009 10:54

Dzięki wielkie ; )
Pomogl leci +
Mozna zamknąć ; )
  • +
  • -
  • 0





Również z jednym lub większą ilością słów kluczowych: Modyfikacja

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

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