Witam, potrzebuje pluginu ktory:
- Na poczatku puszcza muzyke
- Wojna na HE
- Odradzasz sie po 2-3 s.
dzięki.
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.
|
Guest Message by DevFuse
[HE] Granade Round
Temat rozp. m4ciekpl, 24.03.2010 16:50
4 odpowiedzi w tym temacie
#1
Napisano 24.03.2010 16:50
#2
Napisano 24.03.2010 18:08
#include <amxmodx> #include <amxmisc> #include <fakemeta> #include <fakemeta_util> #include <hamsandwich> #define PLUGIN "Rozgrzewka nr blablabla" #define VERSION "1.2.2" #define AUTHOR "R3X" new const gszMusic[]="misc/sarestart.mp3"; //cstrike/sound/[gszMusic] new const gszPausePlugins[][]={ "alt_end_round_sounds.amxx" }; new const giColor[3]={0, 200,200}; #define MAX_PLAYERS 32 #define SPAWN_TASKID 9999 #define TASK_EQUIP 99999 #define RESTART_TASKID 123 #define ACTIVE_TASKID 124 new bool:Active=false; new bool:gbPlay[33]; new Float:fPosition[2]; new g_cvarRTime; new g_cvarFreeze; new g_cvarTimerX,g_cvarTimerY, g_cvarDelay, g_cvarSpawnDelay; public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR); register_event("TextMsg", "Game_Restart", "a", "2&#Game_C"); register_event("DeathMsg","onDeath","a"); register_event("CurWeapon","eventCurWeapon","be","1=0", "2!0"); RegisterHam(Ham_Spawn, "player", "fwSpawn",1); register_forward(FM_SetModel, "fwSetModel",1); register_event("HLTV", "setWeapons", "a", "1=0", "2=0"); g_cvarRTime=register_cvar("restart_time","45"); g_cvarTimerX=register_cvar("restart_timer_pozx","0.01",0,0.01); g_cvarTimerY=register_cvar("restart_timer_pozy","0.86",0,0.86); g_cvarDelay=register_cvar("restart_weapondelay","2.0",0,2.0); g_cvarSpawnDelay=register_cvar("restart_spawndelay","2.0",0,2.0); g_cvarFreeze=get_cvar_pointer("mp_freezetime"); blockBuy(); } public plugin_precache(){ precache_sound(gszMusic); } public Game_Restart(){ if(Active){ remove_task(RESTART_TASKID); return; } Active=true; new iRTime=get_pcvar_num(g_cvarRTime)+get_pcvar_num(g_cvarFreeze)+1; for(new i=1;i<33;i++) gbPlay[i]=true; fPosition[0]=get_pcvar_float(g_cvarTimerX); fPosition[1]=get_pcvar_float(g_cvarTimerY); new param[1]; param[0]=iRTime; set_task(1.0,"CountDown",RESTART_TASKID,param,1); for(new i=0;i<sizeof gszPausePlugins;i++) pause("ac",gszPausePlugins[i]); } public CountDown(param[1]){ new iNow=param[0]--; switch(iNow){ case 0:{ server_cmd("sv_restartround 1"); clearRespawns(); new param[1]; param[0]=0; set_task(1.0,"Activation",ACTIVE_TASKID,param,1); for(new i=0;i<sizeof gszPausePlugins;i++) unpause("ac",gszPausePlugins[i]); } case 1:{ client_cmd(0,"speak one"); } case 2:{ client_cmd(0,"speak two"); } case 3:{ client_cmd(0,"speak three"); } } if(iNow>=1) set_task(1.0,"CountDown",RESTART_TASKID,param,1); new fx=0; if(iNow<=5){ fx=1; } set_hudmessage(giColor[0], giColor[1], giColor[2], fPosition[0], fPosition[1], fx, 6.0, 1.0) show_hudmessage(0, "Czas rozgrzewki^n%2d:%02d",iNow/60,iNow%60); } public Activation(param[1]){ Active=(param[0]==0)?false:true; } public onDeath(){ new vid=read_data(2); if(Active) set_task(get_pcvar_float(g_cvarSpawnDelay),"respawn",SPAWN_TASKID+vid); return PLUGIN_CONTINUE; } public fwSpawn(id){ if(Active && is_user_alive(id)){ if(gbPlay[id]){ play(id, gszMusic); gbPlay[id]=false; } if(task_exists(TASK_EQUIP+id)) remove_task(TASK_EQUIP+id); set_task(0.2, "taskEquip", TASK_EQUIP+id); } } public eventCurWeapon(id){ if(Active){ if(task_exists(TASK_EQUIP+id)) remove_task(TASK_EQUIP+id); set_task(0.5, "taskEquip", TASK_EQUIP+id); } } public taskEquip(id){ id-=TASK_EQUIP; if(Active && is_user_alive(id)){ fm_strip_user_weapons(id); fm_give_item(id, "weapon_hegrenade"); } } public fwSetModel(ent, szModel[]){ if(Active){ if(equal(szModel[7], "w_hegrenade.mdl")) set_task(get_pcvar_float(g_cvarDelay), "taskEquip", TASK_EQUIP+pev(ent,pev_owner)); else{ static szClass[32]; pev(ent, pev_classname,szClass ,31); if(equal(szClass, "weaponbox") || contain(szClass, "weapon_")==0 || contain(szClass, "item_")==0 ){ set_pev(ent, pev_solid, SOLID_NOT); fm_set_rendering(ent, _, _,_,_,kRenderTransAlpha,0); } } } } public respawn(task_id){ ExecuteHamB(Ham_CS_RoundRespawn,task_id-SPAWN_TASKID); } public clearRespawns(){ for(new i=1;i<=MAX_PLAYERS;i++){ if(task_exists(SPAWN_TASKID+i)) remove_task(SPAWN_TASKID+i); if(task_exists(TASK_EQUIP+i)) remove_task(TASK_EQUIP+i); } } public blockBuy(){ 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("p228","block"); register_clcmd("228compact","block"); register_clcmd("shield","block"); register_clcmd("scout","block"); register_clcmd("hegren","block"); register_clcmd("xm1014","block"); register_clcmd("autoshotgun","block"); register_clcmd("mac10","block"); register_clcmd("aug","block"); register_clcmd("bullpup","block"); register_clcmd("sgren","block"); register_clcmd("elites","block"); register_clcmd("fn57","block"); register_clcmd("fiveseven","block"); register_clcmd("ump45","block"); register_clcmd("sg550","block"); register_clcmd("krieg550","block"); register_clcmd("galil","block"); register_clcmd("defender","block"); register_clcmd("famas","block"); register_clcmd("clarion","block"); register_clcmd("usp","block"); register_clcmd("km45","block"); register_clcmd("glock","block"); register_clcmd("9x19mm","block"); register_clcmd("awp","block"); register_clcmd("magnum","block"); register_clcmd("mp5","block"); register_clcmd("smg","block"); register_clcmd("m249","block"); register_clcmd("m3","block"); register_clcmd("12gauge","block"); register_clcmd("m4a1","block"); register_clcmd("tmp","block"); register_clcmd("mp","block"); register_clcmd("g3sg1","block"); register_clcmd("d3au1","block"); register_clcmd("flash","block"); register_clcmd("deagle","block"); register_clcmd("nighthawk","block"); register_clcmd("sg552","block"); register_clcmd("krieg552","block"); register_clcmd("ak47","block"); register_clcmd("cv47","block"); register_clcmd("p90","block"); register_clcmd("c90","block"); register_clcmd("primammo","block"); register_clcmd("secammo","block"); register_clcmd("vest","block"); register_clcmd("vesthelm","block"); register_clcmd("nvgs","block"); } public block(id){ if(Active){ client_print(id,print_center,"Nie tym razem"); return PLUGIN_HANDLED; } return PLUGIN_CONTINUE; } public setWeapons(){ //weapons new ent=-1; do{ ent=engfunc(EngFunc_FindEntityByString, ent,"classname", "armoury_entity"); if(pev_valid( ent )) { set_pev(ent, pev_solid, (Active)?SOLID_NOT:1); fm_set_rendering(ent,kRenderFxNone, 0,0,0, kRenderTransTexture,(Active)?0:255); } } while(ent); } play(id,const sound[]) { new end=strlen(sound)-4; if(containi(sound,".mp3") == end && end>0) client_cmd(id,"mp3 play sound/%s",sound); else if(containi(sound,".wav") == end && end>0) client_cmd(id, "spk sound/%s",sound); else client_cmd(id, "speak %s",sound); }
Cvar'y:
restart_time "x" Czas rozgrzewki domyślnie 45s...
restart_weapondelay "x" Co ile sekund dostajemy next granata...
restart_spawndelay "x" Co ile sekund odradza nas...
sarestart tak nazywa się muzyka musisz poszukać chyba, że masz jakąś...Nazwij ją sarestart i ma być w formacie .mp3... Wrzucasz ją do sound/misc
Użytkownik Lukasz5 edytował ten post 24.03.2010 18:16
#3
Napisano 25.03.2010 17:18
Nie dziala, tzn. moje pluginy:
a cvary : restart_time "50"
restart_weapondelay "1"
restart_spawndelay "3" cvary wrzucilem do amxx.cfg.
; AMX Mod X plugins ; Admin Base - Always one has to be activated admin.amxx ; admin base (required for any admin-related) ;admin_sql.amxx ; admin base - SQL version (comment admin.amxx) ; Basic admincmd.amxx ; basic admin console commands adminhelp.amxx ; help command for admin console commands adminslots.amxx ; slot reservation multilingual.amxx ; Multi-Lingual management ; Menus menufront.amxx ; front-end for admin menus cmdmenu.amxx ; command menu (speech, settings) plmenu.amxx ; players menu (kick, ban, client cmds.) ;telemenu.amxx ; teleport menu (Fun Module required!) mapsmenu.amxx ; maps menu (vote, changelevel) pluginmenu.amxx ; Menus for commands/cvars organized by plugin ; Chat / Messages adminchat.amxx ; console chat commands antiflood.amxx ; prevent clients from chat-flooding the server scrollmsg.amxx ; displays a scrolling message imessage.amxx ; displays information messages adminvote.amxx ; vote commands ; Map related nextmap.amxx ; displays next map in mapcycle mapchooser.amxx ; allows to vote for next map timeleft.amxx ; displays time left on map ; Configuration pausecfg.amxx ; allows to pause and unpause some plugins statscfg.amxx ; allows to manage stats plugins via menu and commands ; Counter-Strike ;restmenu.amxx ; restrict weapons menu statsx.amxx ; stats on death or round end (CSX Module required!) ;miscstats.amxx ; bunch of events announcement for Counter-Strike ;stats_logging.amxx ; weapons stats logging (CSX Module required!) ; Enable to use AMX Mod plugins ;amxmod_compat.amxx ; AMX Mod backwards compatibility layer ; Custom - Add 3rd party plugins here; bf2rank.amxx ;BF2 amx_deagle5_knife_pl.amxx ;deagle ultimate_sounds_PL.amxx ;muza godzina.amxx ;zegar grenade_trail.amxx ;trail magic_marker.amxx ;mazak No_advertisement.amxx ;niereklamuj no_team_flash.amxx ;noflash timeC4.amxx ;timer parachute.amxx ;spadochron ColoredSmoke.amxx ;xdxd speclist.amxx ;lol CustomFlashLight.amxx ;latarynka join_leave.amxx ;loleqq ad_manager.amxx ;reklamy krew.amxx ;trupy polski_cs.amxx ;fps alt_end_round_sounds.amxx ;rs sillyc4.amxx ;paka sarestart.amxx ;resetroundSarestart - to ten plugin, kompilowalem przez webkompilator.. nie mam amxmoda na kompie.. Muze wrzucilem pobiera mi ja ale nnie odtwarza, wchodze na serw i nic nie leci.
a cvary : restart_time "50"
restart_weapondelay "1"
restart_spawndelay "3" cvary wrzucilem do amxx.cfg.
Użytkownik m4ciekpl edytował ten post 25.03.2010 17:41
#4
Napisano 26.03.2010 15:54
Muzyka jest w cstrike/sound/misc ? I jest w formacie .mp3?
26 marzec 2010 - 15:54:
A dałeś muzyce nazwę sarestart ??
26 marzec 2010 - 15:54:
A dałeś muzyce nazwę sarestart ??
#5
Napisano 27.03.2010 21:22
Tak, dałem wszystko działa..
Myślałem że to na 1 os. też działa ale to działa jak są 2 os. na serwerze. Super Plugin Pozdrawiam!
(do zamknięcia)
Myślałem że to na 1 os. też działa ale to działa jak są 2 os. na serwerze. Super Plugin Pozdrawiam!
(do zamknięcia)
Użytkownicy przeglądający ten temat: 0
0 użytkowników, 0 gości, 0 anonimowych