hlmod.hu https://hlmod.hu/ |
|
Zombie Nap https://hlmod.hu/viewtopic.php?f=10&t=3670 |
Oldal: 1 / 1 |
Szerző: | Elysium [2012.03.10. 01:17 ] |
Hozzászólás témája: | Zombie Nap |
Nem lehet átrakni amxx-re.Talán hibás?nézzétek meg pls [spoiler]#include <amxmodx> #include <fun> #include <cstrike> #include <hamsandwich> #include <fakemeta> #define PLUGIN "Plugin" #define VERSION "1.0" #define AUTHOR "aaarnas" #define USE_CC #if defined USE_CC #include <colorchat> #endif #define OFFSET_PRIMARYWEAPON 116 #define IsPlayer(%1) (1<=%1<=g_max_clients) ////////////////// // =New things= // ////////////////// #if defined USE_CC new const PREFIX[] = "[AMXX]^x04:" // Prefix #else new const PREFIX[] = "[AMXX]:" // Normal prefix #endif // Cvars new cvar_daysmenu // Enables the days menu new g_max_clients //client check new specialday[21] enum { DAY_NONE, DAY_MUSIC, DAY_GRAV, DAY_FREEDAY, DAY_ZOMBIE, DAY_LAVA, DAY_SHARK, DAY_CAGE, DAY_DM, DAY_NIGHT, DAY_SPARTAN } // Sounds new zombiesound[] = "sound/jailbreak/zombie_day.mp3" //////////////// // =Booleans= // //////////////// new bool: can_have_gun[33] // Can he have a gun? new bool: gravityday // Is today a gravity day? public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_clcmd("say /napmenu", "specialday_check") RegisterHam(Ham_Spawn, "player", "Event_Playerspawn", 1) register_logevent("Event_Roundend", 2, "1=Round_End") cvar_daysmenu = register_cvar("jb_enable_days", "1") g_max_clients = get_maxplayers() } public plugin_precache() { precache_generic(zombiesound) } /////////////////////////////////////////////////// //-------------PLAYER SPAWN----------------------// /////////////////////////////////////////////////// public Event_Playerspawn(id) { if(is_user_alive(id)) { can_have_gun[id] = true set_user_rendering(id) } specialday[20] = DAY_NONE return PLUGIN_HANDLED } //////////////////////////////////////////////////////////// //-----------------ROUND END/ ROUND START-----------------// //////////////////////////////////////////////////////////// public Event_Roundend() { if(gravityday) { server_cmd("sv_gravity 800") gravityday = false } if(specialday[20] == DAY_DM) server_cmd("mp_friendlyfire 0") client_cmd(0, "mp3 stop") client_cmd(0, "stopsound") } public specialday_check(id) { if(!get_pcvar_num(cvar_daysmenu)) { #if defined USE_CC ColorChat(id, RED, "%s Days are^x03 disabled", PREFIX) #else client_print(id, print_chat, "%s Days are disabled", PREFIX) #endif return PLUGIN_HANDLED } if(get_user_team(id) != 2) { #if defined USE_CC ColorChat(id, RED, "%s Only^x03 CT's^x04 can start a^x03 special day", PREFIX) #else client_print(id, print_chat, "%s Only CT's can start a special day", PREFIX) #endif return PLUGIN_HANDLED } if(!is_user_alive(id)) { #if defined USE_CC ColorChat(id, RED, "%s You have to be^x03 alive^x04 to start a^x03 special day", PREFIX) #else client_print(id, print_chat, "%s You have to be alive to start a special day", PREFIX) #endif return PLUGIN_HANDLED } if(specialday[20] != DAY_NONE) { #if defined USE_CC ColorChat(id, RED, "%s There is already a day chosen", PREFIX) #else client_print(id, print_chat, "%s There is already a day chosen", PREFIX) #endif return PLUGIN_HANDLED } specialday_menu(id) return PLUGIN_HANDLED } public specialday_menu(id) { new specialdaymenu = menu_create("\ySpecialis Napok:", "specialday_submenu") menu_additem(specialdaymenu, "\wZene Nap", "1", 0); menu_additem(specialdaymenu, "\wGRavitacio Nap", "2", 0); menu_additem(specialdaymenu, "\wSzabadnap", "3", 0); menu_additem(specialdaymenu, "\wZombi Nap", "4", 0); menu_additem(specialdaymenu, "\wLava Nap", "5", 0); menu_additem(specialdaymenu, "\wShark Nap", "6", 0); menu_additem(specialdaymenu, "\wCage Nap", "7", 0); menu_additem(specialdaymenu, "\wDeathMatch Nap", "8", 0); menu_additem(specialdaymenu, "\wNight Crawler Nap", "9", 0) menu_additem(specialdaymenu, "\wSpartan Nap", "10", 0) menu_setprop(specialdaymenu, MPROP_EXIT, MEXIT_ALL); menu_display(id, specialdaymenu, 0); } public specialday_submenu(id, specialdaymenu, item) { if (item == MENU_EXIT) { menu_destroy(specialdaymenu); return PLUGIN_HANDLED; } new Data[7], Name[64]; new Access, Callback; menu_item_getinfo(specialdaymenu, item, Access, Data,5, Name, 63, Callback); new Key = str_to_num(Data); switch (Key) { case 1: specialday[20] = DAY_MUSIC case 2: specialday[20] = DAY_GRAV case 3: specialday[20] = DAY_FREEDAY case 4: specialday[20] = DAY_ZOMBIE case 5: specialday[20] = DAY_LAVA case 6: specialday[20] = DAY_SHARK case 7: specialday[20] = DAY_CAGE case 8: specialday[20] = DAY_DM case 9: specialday[20] = DAY_NIGHT case 10: specialday[20] = DAY_SPARTAN } if(IsPlayer(id) && is_user_alive(id)) do_specialday(id) menu_destroy(specialdaymenu); return PLUGIN_HANDLED } public do_specialday(id) { for(new i = 0; i < g_max_clients; i++) { switch(specialday[20]) { case DAY_MUSIC: { new musicmenu = menu_create("\yZene Choice", "musicday_submenu") menu_additem(musicmenu, "\wPlay", "1", 0) menu_additem(musicmenu, "\wStop", "2", 0) menu_setprop(musicmenu,MPROP_EXIT, MEXIT_ALL) menu_display(id, musicmenu, 0) } case DAY_GRAV: { server_cmd("sv_gravity 200") #if defined USE_CC ColorChat(0, RED, "%s Today is^x03 Gravity day", PREFIX) #else client_print(0, print_chat, "%s Today is Gravity day", PREFIX) #endif gravityday = true } case DAY_FREEDAY: { if(IsPlayer(id) && is_user_alive(id)) { if(cs_get_user_team(i) == CS_TEAM_T) set_user_rendering(i, kRenderFxGlowShell, 255, 0, 0, kRenderNormal, 16) } #if defined USE_CC ColorChat(0, RED, "%s Today is^x03 Freeday", PREFIX) #else client_print(0, print_chat, "%s Today is Freeday", PREFIX) #endif } case DAY_ZOMBIE: { if(IsPlayer(i) && is_user_alive(i)) { switch(cs_get_user_team(i)) { case CS_TEAM_T: { set_user_health(i, 150) give_item(i, "weapon_ak47") give_item(i, "weapon_m4a1") cs_set_user_bpammo(i, CSW_AK47, 90) cs_set_user_bpammo(i, CSW_M4A1, 90) } case CS_TEAM_CT: { if(is_user_alive(i)) { set_user_health(i, 500) can_have_gun[i] = false } } } } client_cmd(0, "mp3 play ^"%s^"", zombiesound) #if defined USE_CC ColorChat(0, RED, "%s Today is^x03 Zombie Day", PREFIX) #else client_print(0, print_chat, "%s Today is Zombie day", PREFIX) #endif } case DAY_LAVA: { #if defined USE_CC ColorChat(0, RED, "%s Today is^x03 Lava Day,^x03 Stand on a^x03 spray at all times", PREFIX) #else client_print(0, print_chat, "%s Today is Lava day, Stand on a spray at all times", PREFIX) #endif } case DAY_SHARK: { if(IsPlayer(i) && is_user_alive(i)) { switch(cs_get_user_team(i)) { case CS_TEAM_T: { set_user_health(i, 200) give_item(i, "weapon_ak47") give_item(i, "weapon_m4a1") cs_set_user_bpammo(i, CSW_AK47, 90) cs_set_user_bpammo(i, CSW_M4A1, 90) } case CS_TEAM_CT: { if(is_user_alive(i)) { set_user_noclip(i, 1) set_user_health(i, 300) } } } #if defined USE_CC ColorChat(0, RED, "%s Today is^x03 Shark Day", PREFIX) #else client_print(0, print_chat, "%s Today is Shark day", PREFIX) #endif } } case DAY_CAGE: { #if defined USE_CC ColorChat(0, RED, "%s Today is cage day", PREFIX) #else client_print(0, print_chat, "%s Today is a cage day", PREFIX) #endif } case DAY_DM: { server_cmd("mp_friendlyfire 1") #if defined USE_CC ColorChat(0, RED, "%s Today is^x03 Deathmatch Day,^x04 Last survivor chooses lr", PREFIX) #else client_print(0, print_chat, "%s Today is Deathmatch Day, Last survivor chooses lr", PREFIX) #endif } case DAY_NIGHT: { if(IsPlayer(i) && is_user_alive(i)) { switch(cs_get_user_team(i)) { case CS_TEAM_T: { give_item(i, "weapon_m4a1") give_item(i, "weapon_deagle") cs_set_user_bpammo(i, CSW_M4A1, 90) cs_set_user_bpammo(i, CSW_DEAGLE, 35) } case CS_TEAM_CT: { strip_weapons(i) set_user_rendering(i, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, 0) can_have_gun[i] = false } } } #if defined USE_CC ColorChat(0, RED, "%s Today is a^x03 NightCrawler Day", PREFIX) #else client_print(0, print_chat, "%s Today is a NightCrawler Day", PREFIX) #endif } case DAY_SPARTAN: { if(IsPlayer(i) && is_user_alive(i)) { switch(cs_get_user_team(i)) { case CS_TEAM_T: { give_item(i, "weapon_shield") give_item(i, "weapon_deagle") cs_set_user_bpammo(i, CSW_DEAGLE, 35) } case CS_TEAM_CT: { give_item(i, "weapon_deagle") give_item(i, "weapon_m4a1") cs_set_user_bpammo(i, CSW_DEAGLE, 35) cs_set_user_bpammo(i, CSW_M4A1, 90) } } } #if defined USE_CC ColorChat(0, RED, "%s Today is^x03 Spartan Day", PREFIX) #else client_print(0, print_chat, "%s Today is Spartan Day", PREFIX) #endif } } } } stock strip_weapons(index) { strip_user_weapons(index) set_pdata_int(index, OFFSET_PRIMARYWEAPON, 0) give_item(index, "weapon_knife") }[/spoiler] |
Szerző: | Silent [2012.03.10. 07:20 ] |
Hozzászólás témája: | Re: Zombie Nap |
norbee.16 írta: erre adig nem fogsz választ kapni mig nem a megfelelő témákhoz írod! mert ez nem a scriptinghez tartozik... Ôôô....de.. Elysium: 1.Megoldás: Kód: #include <colorchat> Ezt a sort vedd ki. 2.Megoldás: Töltsd le az oldalról az amxx "tömörítõt". Tallózd be az sma fájlt és tallózd be a colorchat.inc fájlt. |
Szerző: | kiki [2012.03.10. 08:27 ] |
Hozzászólás témája: | Re: Zombie Nap |
#define USE_CC --> //#define USE_CC |
Oldal: 1 / 1 | Minden időpont UTC+02:00 időzóna szerinti |
Powered by phpBB® Forum Software © phpBB Limited https://www.phpbb.com/ |