/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <codmod> #include <amxmisc> new opcja, gracz_id[33], wybrany; new ilosc[33], name[33], nazwa_perku[256], nazwa_klasy[256]; public plugin_init() { register_plugin("COD Admin Menu by MieTeK", "1.5", "MieTeK"); register_clcmd("say /codadmin", "AM", ADMIN_LEVEL_H); register_clcmd("ile","pobierz"); } public AM(id) { if(!(get_user_flags(id) & ADMIN_LEVEL_H)) return PLUGIN_HANDLED; new tytul[64]; format(tytul, 63, "\rCOD Admin Menu \wby MieTeK"); new menu = menu_create(tytul, "AM_handler"); menu_additem(menu, "Dodaj \rEXP");//1 menu_additem(menu, "Ustaw \rLVL");//2 menu_additem(menu, "Daj \rItem");//3 menu_additem(menu, "Przenies \rEXP");//4 menu_additem(menu, "Zamien \rEXP");//5 menu_additem(menu, "Zsumuj \rEXP");//6 menu_display(id, menu); return PLUGIN_HANDLED; } public AM_handler(id, menu, item) { if(!is_user_connected(id)) return PLUGIN_CONTINUE; if(item == MENU_EXIT) { menu_destroy(menu); return PLUGIN_CONTINUE; } switch(item) { case 0: { Gracz(id); opcja = 1; } case 1: { Gracz(id); opcja = 2; } case 2: { Gracz(id); opcja = 3; } case 3: { Gracz(id); opcja = 4; } case 4: { Gracz(id); opcja = 5; } case 5: { Gracz(id); opcja = 6; } } return PLUGIN_CONTINUE; } public Gracz(id) { new menu = menu_create("Wybierz gracza:", "Gracz_handler"); for(new i=0, n=0; i<=32; i++) { if(!is_user_connected(i)) continue; gracz_id[n++] = i; new nazwa_gracza[64]; get_user_name(i, nazwa_gracza, 63) menu_additem(menu, nazwa_gracza, "0", 0); } menu_display(id, menu); } public Gracz_handler(id, menu, item) { if(item == MENU_EXIT) { menu_destroy(menu); return PLUGIN_CONTINUE; } wybrany = gracz_id[item]; get_user_name(wybrany, name, 32); if(opcja == 3) wybierz_perk(id); else if(opcja == 4 || opcja == 5 || opcja == 6) wybierz_klase(id); else console_cmd(id, "messagemode ile"); return PLUGIN_HANDLED; } public pobierz(id) { new text[192] read_argv(1,text,191) format(ilosc, charsmax(ilosc), "%s", text); dawaj(id) } public dawaj(id) { if(opcja == 1) { cod_set_user_xp(wybrany, cod_get_user_xp(wybrany)+str_to_num(ilosc)); client_print(id, print_chat, "Ustawiles graczowi %s %i EXP", name, str_to_num(ilosc)); } if(opcja == 2) { new potrzeba; potrzeba = cod_get_level_xp(str_to_num(ilosc)-1); cod_set_user_xp(wybrany, potrzeba); client_print(id, print_chat, "Ustawiles graczowi %s %i LVL", name, str_to_num(ilosc)); } } public wybierz_klase(id) { new tytul[64]; format(tytul, sizeof(tytul), "\rNa jaka klase :"); new menu = menu_create(tytul, "wybierz_klase_handler"); for(new i=1; i<=cod_get_classes_num(); i++) { cod_get_class_name(i, nazwa_klasy, 255) menu_additem(menu, nazwa_klasy) } menu_display(id, menu); } public wybierz_klase_handler(id, menu, item) { if(item++ == MENU_EXIT) { menu_destroy(menu) return PLUGIN_CONTINUE; } new klasa[2][65]; if(opcja == 4) { new exp = cod_get_user_xp(wybrany); cod_get_class_name(cod_get_user_class(wybrany), klasa[0], 64); cod_set_user_xp(wybrany, 0); cod_set_user_class(wybrany, item, 1); cod_get_class_name(cod_get_user_class(wybrany), klasa[1], 64); cod_set_user_xp(wybrany, exp); client_print(id, print_chat, "Przeniosles EXP graczowi %s z klasy %s na klase %s", name, klasa[0], klasa[1]); } if(opcja == 5) { new exp = cod_get_user_xp(wybrany); new oldclass = cod_get_user_class(wybrany) cod_get_class_name(cod_get_user_class(wybrany), klasa[0], 64); cod_set_user_class(wybrany, item, 1); new exp2 = cod_get_user_xp(wybrany); cod_set_user_xp(wybrany, exp); cod_get_class_name(cod_get_user_class(wybrany), klasa[1], 64); cod_set_user_class(wybrany, oldclass, 1); cod_set_user_xp(wybrany, exp2); cod_set_user_class(wybrany, item, 1); client_print(id, print_chat, "Zamieniles EXP graczowi %s miedzy klasa %s a klasa %s", name, klasa[0], klasa[1]); } if(opcja == 6) { new exp = cod_get_user_xp(wybrany); cod_set_user_xp(wybrany, 0); cod_get_class_name(cod_get_user_class(wybrany), klasa[0], 64); cod_set_user_class(wybrany, item, 1); cod_get_class_name(cod_get_user_class(wybrany), klasa[1], 64); cod_set_user_xp(wybrany, cod_get_user_xp(wybrany)+exp); client_print(id, print_chat, "Zsumowales EXP graczowi %s z klasy %s na klase %s", name, klasa[0], klasa[1]); } return PLUGIN_CONTINUE; } public wybierz_perk(id) { new tytul[64]; format(tytul, 63, "\rWybierz perk :"); new menu = menu_create(tytul, "wybierz_perk_handler"); for(new i=1; i<=cod_get_perks_num(); i++) { cod_get_perk_name(i, nazwa_perku, 255) menu_additem(menu, nazwa_perku); } menu_display(id, menu); } public wybierz_perk_handler(id, menu, item) { if(item++ == MENU_EXIT) { menu_destroy(menu); return PLUGIN_CONTINUE; } cod_set_user_perk(wybrany, item, -1, 0); cod_get_perk_name(item++, nazwa_perku, 255); client_print(id, print_chat, "Dales graczowi %s perk %s", name, nazwa_perku); return PLUGIN_HANDLED; } /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1045\\ f0\\ fs16 \n\\ par } */
- AMXX.pl: Support AMX Mod X i SourceMod
- > Przeglądanie profilu: Tematy: kewin0912
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
kewin0912
Rejestracja: 05.01.2012Aktualnie: Nieaktywny
Poza forum Ostatnio: 13.07.2012 13:11
Statystyki
- Grupa: Użytkownik
- Całość postów: 10
- Odwiedzin: 964
- Tytuł: Początkujący
- Wiek: Wiek nie został ustalony
- Urodziny: Data urodzin nie została podana
-
Imię
kewin
-
Płeć
Mężczyzna
-
Lokalizacja
kielce
Moje tematy
Prosba o przerobienie cod admin menu
07.07.2012 12:44
Witam! proszę o przerobienie pluginu, aby komenda działała tylko dla adminów z flagą "A" immunited.
Problem z klasa CodMod
04.07.2012 07:47
Witam! Chciałbym wiedziec co ja tu zle robie.. Podaję sma:
Oto błędy kompilacji:
#include <amxmodx> #include <hamsandwich> #include <codmod> #include <engine> #define DMG_BULLET (1<<1) new const nazwa[] = "Skoczek"; new const opis[] = "Zmniejszona grawitacja,1/2 na natychmiastowe zabicie z HE."; new const bronie = 1<<CSW_AK47 | 1<<CSW_Hegrenade; new const zdrowie = 10; new const kondycja = 30; new const inteligencja = 6; new const wytrzymalosc = 10; public plugin_init() RegisterHam(Ham_TakeDamage, "player", "TakeDamage"); public TakeDamage(this, idinflictor, idattacker, Float:damage, damagebits) { if(!is_user_connected(idattacker)) return HAM_IGNORED; if(!ma_perk[idattacker]) return HAM_IGNORED; if(get_user_team(this) != get_user_team(idattacker) && get_user_weapon(idattacker) == CSW_HEGRENADE && damagebits & DMG_BULLET && random_num(1, 2) == 1) cod_inflict_damage(idattacker, this, float(get_user_health(this))-damage+1.0, 0.0, idinflictor, damagebits); return HAM_IGNORED; } register_event("ResetHUD", "ResetHUD", "abe"); } public cod_class_enabled(id) { entity_set_float(id, EV_FL_gravity, 200.0/800.0); ma_klase[id] = true; } public cod_class_disabled(id) { entity_set_float(id, EV_FL_gravity, 800.0/800.0); ma_klase[id] = false; } public ResetHUD(id) { if(ma_klase[id]) entity_set_float(id, EV_FL_gravity, 200.0/800.0); }
Oto błędy kompilacji:
Welcome to the AMX Mod X 1.8.1-300 Compiler. Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team Skoczek.sma(26) : error 017: undefined symbol "ma_perk" Skoczek.sma(26) : warning 215: expression has no effect Skoczek.sma(26) : error 001: expected token: ";", but found "]" Skoczek.sma(26) : error 029: invalid expression, assumed zero Skoczek.sma(26) : fatal error 107: too many error messages on one line Compilation aborted. 4 Errors.
Bf2 rank jak usunac scouta na...
05.05.2012 22:06
Jak usunac scouta na mapie he_duster ?. Posiadam BF2 rank mod 2.0.0 48 odznak.
AMXBans nie dodaje adminów! HELP!
01.05.2012 08:43
Witam! Problem polega na tym, że zainstalowałem amxbans 5.1, amx mod x mam najnowsza wersje. Wczoraj wszystko działało a teraz wchodzę i d*pa! Nie dodaje adminów na serwer!. mam ustawione , że adminów czyta ze sql.cfg.
Ostatnie logi:
sql.cfg:
i AmxBans.cfg:
proszę pomóżcie !
Ostatnie logi:
-------- Mapchange to de_dust2 -------- L 05/01/2012 - 09:40:58: Invalid multi-lingual line (file "cstrike/addons/amxmodx/data/lang/amxbans.txt" line 1) L 05/01/2012 - 09:40:59: [amxbans_main.amxx] [AMXBans] ML_NOTFOUND: SQL_BANMOD_ONLINE L 05/01/2012 - 09:41:00: [amxbans_main.amxx] [AMXBans] ML_NOTFOUND: SQL_LOADED_STATIC_REASONS
sql.cfg:
// SQL configuration file // File location: $moddir/addons/amxmodx/configs/sql.cfg // *NOTE* Linux users may encounter problems if they specify "localhost" instead of "127.0.0.1" // We recommend using your server IP address instead of its name // *NOTE* amx_sql_type specifies the DEFAULT database type which admin.sma will use. amx_sql_host "46.105.111.234" amx_sql_user "moja nazwa usera" amx_sql_pass "haslo" amx_sql_db "moja nazwa bazy" amx_sql_table "amx" amx_sql_type "mysql"
i AmxBans.cfg:
// [En] AMXBans Configuration File // [En] File location: $moddir/addons/amxmodx/configs/amxbans.cfg echo [AMXBans] Запуск amxbans.cfg // [En] your sql database prefix // [En] NOTE: The Prefix defined in your sql.cfg is NOT used for AMXBans anymore!!! amx_sql_prefix "amx" // [En] Use the flagging only for this Server, or for all servers? amxbans_flagged_all_server 1 // [En] How AMXBans should handle the admins // [En] 0=sql, 1=users.ini, 2=load no admins amxbans_use_admins_file 0 // [En] AMXBans trys to get the address from the server automatically. // [En] You can set a different one here - ex. "<ip>:<port>" amxbans_server_address "kielecki-cs.xaa.pl" // [En] Number of players in the Disconnected Menu amxbans_discon_players_saved 10 // [En] Bantime to use for custom banreasons, if a user has static bantime <minutes> // [En] -1 to disable custom reasons amxbans_custom_statictime 1 // [En] Set this cvar to what the adminname should be on the webpages, if the server make the ban. // [En] Ie. amxbans_servernick "My Great server" // [En] Leave emty if you want to use the default hostname from server.cfg amxbans_servernick "" // [En] Set this to 1 / 2 / 3 to enable debug messages from amxbans to amxx logs. // [En] with debug 3 you get the most output, but a bug can flood your logs. 2 should be ok normally amxbans_debug 0 // [En] Don't use http:// in this cvar. The url will be shown to banned players in the console. amxbans_complain_url "Kielecki-cs.xaa.pl" // [En] Set this to 1 if you want the map name to show in the DB. amxbans_add_mapname_in_servername 1 // [En] If you want to see ban announcments in the HLSW chat, set this to 1 amxbans_show_in_hlsw 1 // [En] Print green hudmessages on the top left when banning amxbans_show_hud_messages 1 // [En] What flag should admins have to get the high ban times. amxbans_higher_ban_time_admin "d" // [En] What flag should admins have to NOT get their Nick printed when banning/Unbanning amxbans_admin_mole_access "d" // [En] If an admin has the admin_mole_access, should his name be shown when he bans? amxbans_show_name_evenif_mole 1 // [En] Show if a player has been banned before as amx_chat to admins. 0 to disable amxbans_show_prebanned 0 // [En] How many previous offences does the player needs, to be notified in the amx_chat? amxbans_show_prebanned_num 2 // [En] Currently not known amxbans_default_ban_reason unknown // [En] To be able to ban players not in the server. 1 enabled and 0 disabled. amxbans_ban_evenif_disconnected 1 // [En] Flagtimes, like the bantimes below amx_setflagtimes "1 h" "4 h" "10 h" "1 d" "1 w" "4 w" "12 w" "0" // [En] Ban times for admins with d-flag, set the highest time in minutes they can ban with "amxbans_consolebanmax" // [En] IMPORTANT: Put the lowest value first and the highest value last. You can have 1 to 12 values // [En] "0 m" = permanent ban! // [En] Values you can use: // [En] 1 - 59 with the flag m is for minutes // [En] 1 - 23 with the flag h is for hours // [En] 1 - 6 with the flag d is for days // [En] The w flag is for weeks // [En] // [En] Example: // [En] "5 m" is 5 minutes // [En] "1 h" is 1 hour // [En] "1 d" is 1 day // [En] "1 w" is 1 week amx_setlowbantimes "5 m" "30 m" "1 h" "3 h" "10 h" "1 d" // [En] Ban times for admin with n-flag and d-flag // [En] IMPORTANT: Put the lowest value first and the highest value last. You can have 1 to 12 values // [En] "0 m" = permanent ban! // [En] Values you can use: // [En] 1 - 59 with the flag m is for minutes // [En] 1 - 23 with the flag h is for hours // [En] 1 - 6 with the flag d is for days // [En] The w flag is for weeks // [En] // [En] Example: // [En] "5 m" is 5 minutes // [En] "1 h" is 1 hour // [En] "1 d" is 1 day // [En] "1 w" is 1 week amx_sethighbantimes "5 m" "30 m" "1 h" "4 h" "1 d" "1 w" "0 m" /************* Another AMXBans plugins: Start config ******************************/ // [En] 3rd party amxbans plugins // [En] needs the amxbans_freeze plugin // // "a" = freeze // "b" = strip weapons // "c" = block chat // "d" = player glow red (not testet) amxbans_freeze_mode "abc" /************* AMXBans: SSBan ***********************************************/ // [En] needs the amxbans_ssban plugin // [En] How many screens are the admins allowed to take? amx_maxscreens "10" // [En] How much time between each screenshot? amx_interval "1.0" // 0: disabled. // 1: administrator receives a message that the screen was taken. // 2: the player is superimposed hud in the lower left corner // 3: both amx_stamptype "3" // [En] Message when amx_stamptype = 2/3 amx_hudtext "Cheese :)" // [En] Count of screens in menu amx_screenscount "1 2 3 4 5" // [En] Ban time amx_ssbantime "0" // [En] Ban reason amx_ssbanreason "Screenshoty na Kielecki-cs.xaa.pl" /************* Another AMXBans plugins: End config ******************************/ // [En] AMXBans configuration file echo echo [AMXBans] amxbans.cfg успешно выполнен!
proszę pomóżcie !
problem z roundsoundem
19.04.2012 16:33
Witam! Wgrywam roundsounda a on nie działa, tzn. muzyki sie sciagaja przy wejsciu na serwer, ale gdy minie runda, one nie graja, moze jakis cvar czy cos? HELP ME.
.sma:
.sma:
#include <amxmodx> public plugin_init() { register_plugin("RoundSound","1.0","PaintLancer") register_event("SendAudio", "t_win", "a", "2&%!MRAD_terwin") register_event("SendAudio", "ct_win", "a", "2&%!MRAD_ctwin") } public t_win(id) { new rand = random_num(0,2) client_cmd(id,"stopsound") switch(rand) { case 0: client_cmd(id,"spk misc/1") case 1: client_cmd(id,"spk misc/2") case 2: client_cmd(id,"spk misc/3") case 3: client_cmd(id,"spk misc/4") } return PLUGIN_HANDLED } public ct_win(id) { new rand = random_num(0,2) client_cmd(id,"stopsound") switch(rand) { case 0: client_cmd(id,"spk misc/5") case 1: client_cmd(id,"spk misc/6") case 2: client_cmd(id,"spk misc/7") case 3: client_cmd(id,"spk misc/8") } return PLUGIN_HANDLED } public plugin_precache() { precache_sound("misc/1.mp3") precache_sound("misc/2.mp3") precache_sound("misc/3.mp3") precache_sound("misc/4.mp3") precache_sound("misc/5.wav") precache_sound("misc/6.mp3") precache_sound("misc/7.mp3") precache_sound("misc/8.mp3") return PLUGIN_CONTINUE }
- AMXX.pl: Support AMX Mod X i SourceMod
- > Przeglądanie profilu: Tematy: kewin0912
- Regulamin