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

ultimate_warmup paka dla wsztkich terrorystów


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

#1 0PeL

    Nowy

  • Użytkownik

Reputacja: -3
Mniej niż zer0.

  • Postów:6
  • GG:
  • Imię:Tomasz
  • Lokalizacja:Radlin
Offline

Napisano 17.10.2011 22:51

#include <amxmodx>
#include <fun>
#include <cstrike>
#include <hamsandwich>
#include <fakemeta>
#pragma semicolon 1
new bool:gPlayerFirstSpawn[33];
new bool:g_is_warmup;
new g_warmup_time;
new time_left;
new g_cvar_respawn;
/*
Plugin was originally developed by x-raycat(I've changed almost everything and added so many features)
Cvary/cvars
amx_warmup_time <x> gdzie x to czas w sekundach
amx_warmup_time <x> where x is time in seconds
amx_warmup_respawn(0- ożywianie wyłączone, 1- ożywianie włączone)
amx_warmup_respawn(0- auto-respawn off, 1- auto-respawn ON)
amx_warmup_weapon:
Każdy numer odpowiada broni.
amx_warmup_weapon:
Each number is a weapon for this plugin. List:
1 weapon_p228 //p228
2 weapon_scout //scout
3 weapon_hegrenade //granat HE
4 weapon_xm1014 //auto-pompa
5 weapon_mac10 //uzi tt
6 weapon_aug //aug
7 weapon_elites //elites
8 weapon_fiveseven //fiveseven
9 weapon_ump45 //b(3(2))
10 weapon_sg550 //autokampa cT
11 weapon_galil //galil
12 weapon_famas //famas
13 weapon_usp //usp
14 weapon_glock18 //glock
15 weapon_awp //awp
16 weapon_mp5navy //MP5
17 weapon_m249 //krowa
18 weapon_m3 //pompa
19 weapon_m4a1 //M4
20 weapon_tmp //tmp
21 weapon_g3sg1 //autokampa TT
22 weapon_deagle //dgl
23 weapon_sg552 //sg552(tt)
24 weapon_ak47 //ak47
25 weapon_p90 //P90
26 weapon_knife //n&#243;ż
27 is random weapons from above
Ustawienie każdej innej wartości cvaru amx_warmup_weapon powoduje ustawienie domyślnej broni- n&#243;ż.
By setting any different number as a cvar value causes to use default weapon- knife.
Change-Log
v.1.7
- added random wepons,
- added example on disabling plugins during the warmup,
- code cleanup,
- new languages,
- blocking weapon pickup during the warmup,
- blocking weapon dropping during the warmup.
v.1.6
- replaced game commencing event instead of task,
- changed way of using amx_warmup_time cvar, now it's defined in seconds,
- removed some useless code,
- added possiblity to disable plugins during warm-up.

v.1.5c
-added serbian translation.
v.1.5b
- changed way of giving ammo,
- changed a little in weapon switch,
- added Turkish and Bulgarian translations
v.1.4
- code cleanup: fixed identation, used pcvars.

v.1.3
- added multilingual support,
- added commented examples of using mp3 format.
v.1.2
- little code cleanup.
v.1.1
- added most of available things: weapons, respawns, countdown, sound.
v.1.0
- first written, testing, testing and once more testing.

To do list:
- random weapons.
*/
public plugin_init()
{
register_plugin("Ultimate Warm-Up", "1.7.1", "naven");
g_warmup_time = register_cvar("amx_warmup_time", "65");
g_cvar_respawn = register_cvar("amx_warmup_respawn", "1");
register_cvar("amx_warmup_weapon", "1");
register_event("ResetHUD", "Event_ResetHud", "be");
register_event("DeathMsg", "DeathMsg", "a");
register_dictionary("ultimate_warmup.txt");
register_event("TextMsg","restart_time","a","2&#Game_C"); //thx Pavulon
register_clcmd("amx_start_warmup", "restart_time", ADMIN_KICK);
RegisterHam( Ham_Touch, "weaponbox", "HamTouchPre", 0 );
RegisterHam( Ham_Touch, "armoury_entity", "HamTouchPre", 0 );
register_clcmd("drop", "handle_drop");
}
public muza_on()
{
//let's play the music
client_cmd(0,"stopsound"); //silence .wav sounds
client_cmd(0,"mp3 stop"); //silence .mp3 sounds
client_cmd(0,"mp3 play sound/sound_name.mp3");
}
public restart_time()
{
//pausing plugins
server_cmd("amx_pausecfg pause vip.amxx");
g_is_warmup = true;
init_warmup_time();
muza_on();
return PLUGIN_HANDLED;
}
public restartround(id)
{
gPlayerFirstSpawn[id] = true;
return PLUGIN_HANDLED;
}
public countdown()
{
time_left--;
if(time_left < 0)
{
restart();
}
return PLUGIN_CONTINUE;
}
public init_warmup_time()
{
new time[256], temp[2][6];
get_pcvar_string(g_warmup_time, time, 255);

parse(time, temp[0], 5, temp[1], 5);

time_left = str_to_num(temp[0]) /** 60*/ + str_to_num(temp[1]);
set_task(1.0, "countdown", 4567,_,_,"b");
set_task(1.0, "show_time", 2345,_,_,"b");
}
public show_time()
{
set_hudmessage(random_num(0,255), random_num(0,255), random_num(0,255), 0.01, 0.7, 2, 60, 0.4, 0.1, 0.2, 4);
show_hudmessage(0, "%L", LANG_PLAYER, "WARMUP_COUNTDOWN", time_left / 60, time_left % 60); //countdown
}
public restart()
{
//unpausing plugins
server_cmd("amx_pausecfg enable vip.amxx");
g_is_warmup = false;
remove_task(4567);
remove_task(2345);

server_cmd("sv_restart 1");
new Players[32], playerCount;
get_players(Players, playerCount);
for (new i=0; i<playerCount; i++)
{
new id = Players[i];
if(cs_get_user_bpammo(id, CSW_HEGRENADE))
cs_set_user_bpammo(id, CSW_HEGRENADE, 0);
}
}
public Event_ResetHud(id)
{
if(g_is_warmup)
{
set_task(0.1, "task_give", id); //after spawn
}
}
public DeathMsg()
{
new l_cvar_respawn = get_pcvar_num(g_cvar_respawn);
if((g_is_warmup) && (l_cvar_respawn ==1))

{
new id = read_data(2);
set_task(1.0,"respawn_player",id);
}
}
public respawn_player(id) //thx sniffer
{
if(is_user_connected(id))
ExecuteHamB(Ham_CS_RoundRespawn, id); //let's respawn player
}
public task_give(id)
{
if (!is_user_alive(id))
return;
strip_user_weapons(id);
new l_cvar_weapon;
if(get_cvar_num("amx_warmup_weapon") == 27)
{
l_cvar_weapon = random_num(1, 26);
}
else
{
l_cvar_weapon = get_cvar_num("amx_warmup_weapon");
}
switch(l_cvar_weapon)
{
case 1 :
{
//now, we have to give weapons that we promised earlier
cs_set_user_armor (id, 100, CS_ARMOR_VESTHELM);
cs_set_user_money (id , 0);
give_item(id, "weapon_p228");
cs_set_user_bpammo(id, CSW_P228, 52);
}
case 2 :
{
cs_set_user_armor (id, 100, CS_ARMOR_VESTHELM);
cs_set_user_money (id , 0);
give_item(id, "weapon_scout");
cs_set_user_bpammo(id, CSW_SCOUT, 90);
}
case 3 :
{
give_item(id, "weapon_hegrenade");
cs_set_user_bpammo(id, CSW_HEGRENADE, 100);
}
case 4 :
{
cs_set_user_armor (id, 100, CS_ARMOR_VESTHELM);
cs_set_user_money (id , 0);
give_item(id, "weapon_xm1014");
cs_set_user_bpammo(id, CSW_XM1014, 32);
}
case 5 :
{
cs_set_user_armor (id, 100, CS_ARMOR_VESTHELM);
cs_set_user_money (id , 0);
give_item(id, "weapon_mac10");
cs_set_user_bpammo(id, CSW_MAC10, 100);
}
case 6 :
{
cs_set_user_armor (id, 100, CS_ARMOR_VESTHELM);
cs_set_user_money (id , 0);
give_item(id, "weapon_aug");
cs_set_user_bpammo(id,CSW_AUG, 90);
}
case 7 :
{
cs_set_user_armor (id, 100, CS_ARMOR_VESTHELM);
cs_set_user_money (id , 0);
give_item(id, "weapon_elite");
cs_set_user_bpammo(id, CSW_ELITE, 120);
}
case 8 :
{
cs_set_user_armor (id, 100, CS_ARMOR_VESTHELM);
cs_set_user_money (id , 0);
give_item(id, "weapon_fiveseven");
cs_set_user_bpammo(id, CSW_FIVESEVEN, 100);
}
case 9 :
{
cs_set_user_armor (id, 100, CS_ARMOR_VESTHELM);
cs_set_user_money (id , 0) ;
give_item(id, "weapon_ump45");
cs_set_user_bpammo(id, CSW_UMP45, 100);

}
case 10 :
{
give_item(id, "weapon_sg550");
cs_set_user_armor (id, 100, CS_ARMOR_VESTHELM);
cs_set_user_money (id , 0);
cs_set_user_bpammo(id, CSW_SG550, 90);
}
case 11 :
{
cs_set_user_armor (id, 100, CS_ARMOR_VESTHELM);
cs_set_user_money (id , 0);
give_item(id, "weapon_galil");
cs_set_user_bpammo(id, CSW_GALIL, 90);
}
case 12 :
{
cs_set_user_armor (id, 100, CS_ARMOR_VESTHELM);
cs_set_user_money (id , 0);
give_item(id, "weapon_famas");
cs_set_user_bpammo(id, CSW_FAMAS, 90);
}
case 13 :
{
cs_set_user_armor (id, 100, CS_ARMOR_VESTHELM);
cs_set_user_money (id , 0);
cs_set_user_bpammo(id, CSW_USP, 100);
}
case 14 :
{
cs_set_user_armor (id, 100, CS_ARMOR_VESTHELM);
cs_set_user_money (id , 0);
give_item(id, "weapon_glock18");
cs_set_user_bpammo(id, CSW_GLOCK18, 120);
}
case 15 :
{
cs_set_user_armor (id, 100, CS_ARMOR_VESTHELM);
cs_set_user_money (id , 0);
give_item(id, "weapon_awp");
cs_set_user_bpammo(id,CSW_AWP, 30);
}
case 16 :
{
cs_set_user_armor (id, 100, CS_ARMOR_VESTHELM);
cs_set_user_money (id , 0);
give_item(id, "weapon_mp5navy");
cs_set_user_bpammo(id, CSW_MP5NAVY, 120);
}
case 17 :
{

cs_set_user_armor (id, 100, CS_ARMOR_VESTHELM);
cs_set_user_money (id , 0);
give_item(id, "weapon_m249");
cs_set_user_bpammo(id, CSW_M249, 200);
}
case 18 :
{

cs_set_user_armor (id, 100, CS_ARMOR_VESTHELM);
cs_set_user_money (id , 0);
give_item(id, "weapon_m3");
cs_set_user_bpammo(id, CSW_M3, 32);
}
case 19 :
{
cs_set_user_armor (id, 100, CS_ARMOR_VESTHELM);
cs_set_user_money (id , 0);
give_item(id, "weapon_m4a1");
cs_set_user_bpammo(id, CSW_M4A1, 90);
}
case 20 :
{

cs_set_user_armor (id, 100, CS_ARMOR_VESTHELM);
cs_set_user_money (id , 0);
give_item(id, "weapon_tmp");
cs_set_user_bpammo(id, CSW_TMP, 120);

}
case 21 :
{
cs_set_user_armor (id, 100, CS_ARMOR_VESTHELM);
cs_set_user_money (id , 0);
give_item(id, "weapon_g3sg1");
cs_set_user_bpammo(id, CSW_G3SG1, 90);
}
case 22 :
{

cs_set_user_armor (id, 100, CS_ARMOR_VESTHELM);
cs_set_user_money (id , 0);
give_item(id, "weapon_deagle");
cs_set_user_bpammo(id, CSW_DEAGLE, 35);
}
case 23 :
{

cs_set_user_armor (id, 100, CS_ARMOR_VESTHELM);
cs_set_user_money (id , 0);
give_item(id, "weapon_sg552");
cs_set_user_bpammo(id, CSW_SG552, 90);
}
case 24 :
{
cs_set_user_armor (id, 100, CS_ARMOR_VESTHELM);
cs_set_user_money (id , 0);
give_item(id, "weapon_ak47");
cs_set_user_bpammo(id, CSW_AK47, 90);
}
case 25 :
{

cs_set_user_armor (id, 100, CS_ARMOR_VESTHELM);
cs_set_user_money (id , 0);
give_item(id, "weapon_p90");
cs_set_user_bpammo(id, CSW_P90, 100);

}
case 26 :
{
cs_set_user_armor (id, 100, CS_ARMOR_VESTHELM);
cs_set_user_money (id , 0);
give_item(id, "weapon_knife");
}
}
}
public HamTouchPre(weapon)
{
if(g_is_warmup)
{
return HAM_SUPERCEDE;
}
return HAM_IGNORED;
}
public handle_drop(id)
{
if(g_is_warmup)
{
return PLUGIN_HANDLED;
}
return PLUGIN_CONTINUE;
}
public plugin_precache()
{
precache_sound("misc/cs-przyczajka.wav");
//precache_sound("misc/sound_name.mp3");//MP3 version
}


Mogłby ktos przerobic zeby wszyscy terrorysci mieli pake co runde przez cala rozgrzewke i spauzowac mi bf2rank_colorchat.amxx będę bardzo wdzieczny ;]
  • +
  • -
  • 0




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

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