Mialbym bardzo duza prosbe o poprawienie kodu sma,poniewaz gdy daje opcje FreeRun to ustawia sie Deathrun.
Tutaj daje kod:
#include <amxmodx> #include <fun> #include <fakemeta> #include <colorchat> #include <hamsandwich> #include <cstrike> #define PLUGIN "DeathOrFree" #define VERSION "2.1" #define AUTHOR "SeeK" new a new c = 0 public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_cvar("dr_frmenu_time","20"); register_cvar("dr_free_onof","1"); register_logevent("Poczatek_Rundy", 2, "1=Round_Start") register_forward(FM_PlayerPreThink, "MAX_HP") RegisterHam(Ham_Use, "func_button","Dotyk_buttona"); RegisterHam(Ham_Use, "func_rot_button","Dotyk_buttona"); RegisterHam(Ham_Use, "button_target","Dotyk_buttona"); RegisterHam(Ham_Spawn, "player", "fwHamPlayerSpawnPost", 1) } public Poczatek_Rundy() { c = 0 } public MAX_HP(id){ new Float:Health; pev(id, pev_health, Health); if(Health < 101) return; set_pev(id, pev_health, 100.0); } public Dotyk_buttona(this, idcaller, idactivator, use_type, Float:value){ c = 1 } public fwHamPlayerSpawnPost(id){ if (!is_user_alive(id)) return; new CsTeams:name name = cs_get_user_team(id) if ( name == CS_TEAM_CT ) set_user_health(id, 25) if(cs_get_user_team(id) == CS_TEAM_T) { menu(id) } } public menu(id) { a = get_systime() new menu = menu_create("\yWybierz mod:", "wybieranie") new Szare = menu_makecallback("zablokowane") menu_additem(menu, "\rDeathRun", "1", 0,Szare) menu_additem(menu, "\wFreeRun", "2", 0,Szare) menu_setprop(menu, MPROP_EXIT, MEXIT_NEVER) menu_setprop(menu, MPROP_NUMBER_COLOR, "\y") menu_display(id, menu, 0) } public wybieranie(id, menu, item) { new Czas = get_cvar_num("dr_frmenu_time"); // Ustawienie długości czasu - w sekundach - do wpisania FreeRun new data[6], iName[64] new acces, callback menu_item_getinfo(menu, item, acces, data,5, iName, 63, callback) new key = str_to_num(data) switch(key) { case 1:{ ColorChat(0, RED, "Gramy normalny >>DeathRun<<") menu_destroy(menu) return PLUGIN_CONTINUE } case 2:{ new b = get_systime() if(b - a < Czas) { if(c == 0) { ColorChat(0, GREY, "Gramy mod >>FreeRun<<") client_cmd(id, "say /plugindeathorfree") set_user_health(id, 25) } else { ColorChat(0, RED, "Gramy normalny >>DeathRun<<") client_print(id, print_chat, "Nacisnales juz przycisk") } } else { ColorChat(0, RED, "Gramy normalny >>DeathRun<<") client_print(id, print_chat, "Czas wyboru minal") } menu_destroy(menu) return PLUGIN_CONTINUE } } menu_destroy(menu) return PLUGIN_CONTINUE } public zablokowane(id, menu, item){ if(item==1) { if(get_cvar_num("dr_free_onof") == 0) { return ITEM_DISABLED; } } return ITEM_ENABLED; } /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1045\\ f0\\ fs16 \n\\ par } */Bardzo proszę o szybka pomoc, jesli ktos juz mial taki problem i byl post na ten temat proszę o link OCZYWISCIE LECI KARMA !!!
Użytkownik Kaceper1 edytował ten post 15.03.2012 15:02