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
5 odpowiedzi w tym temacie
#1
Napisano 17.01.2009 13:09
Poszukuje pluginu umocnienie z workow w zalaczniku dodaje go ale on jest tylko dla Admina wiec jezeli ktos moze moglby przerobic go dla wszystkich graczy i nie trzeba by bylo szukac
#2
Napisano 17.01.2009 13:14
/* AMXX PLUGIN Pallets with Bags Version : 0.2c Author : SAMURAI Have a nice day now */ #include <amxmodx> #include <amxmisc> #include <fakemeta> #include <xs> #define PLUGIN_NAME "Pallets with Bags" #define PLUGIN_VERSION "0.2c" #define PLUGIN_AUTHOR "SAMURAI" // The sizes of models #define PALLET_MINS Float:{ -27.260000, -22.280001, -22.290001 } #define PALLET_MAXS Float:{ 27.340000, 26.629999, 29.020000 } // from fakemeta util by VEN #define fm_find_ent_by_class(%1,%2) engfunc(EngFunc_FindEntityByString, %1, "classname", %2) #define fm_remove_entity(%1) engfunc(EngFunc_RemoveEntity, %1) // this is mine #define fm_drop_to_floor(%1) engfunc(EngFunc_DropToFloor,%1) // cvars new pnumplugin, remove_nrnd, maxpallets, phealth; // num of pallets with bags new palletscout = 0; /* Models for pallets with bags . Are available 2 models, will be set a random of them */ new g_models[][] = { "models/pallet_with_bags.mdl", "models/pallet_with_bags2.mdl" } /************************************************************* ************************* AMXX PLUGIN ************************* **************************************************************/ public plugin_init() { /* Register the plugin */ register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR) /* Register the cvars */ pnumplugin = register_cvar("pallets_wbags","1"); // 1 = ON ; 0 = OFF remove_nrnd = register_cvar("pallets_wbags_nroundrem","0"); maxpallets = register_cvar("pallets_wbags_max","64"); // max number of pallets with bags phealth = register_cvar("pallets_wbags_health","0"); // set the health to a pallet with bags /* Game Events */ register_event("HLTV","event_newround", "a","1=0", "2=0"); // it's called every on new round /* This is for menuz: */ register_menucmd(register_menuid("yPallets with Bags:"), 1023, "menu_command" ); register_clcmd("say pallets_menu","show_the_menu"); } public plugin_precache() { for(new i;i < sizeof g_models;i++) engfunc(EngFunc_PrecacheModel,g_models[i]); } public show_the_menu(id,level,cid) { // check if the plugin cvar is turned off if( ! get_pcvar_num( pnumplugin ) ) return PLUGIN_HANDLED; // check if user isn't alive if( ! is_user_alive( id ) ) { client_print( id, print_chat, "[AMXX] You can't place a pallet with bags because you are dead" ); return PLUGIN_HANDLED; } new szMenuBody[256]; new keys; new nLen = format( szMenuBody, 255, "yPallets with Bags:^n" ); nLen += format( szMenuBody[nLen], 255-nLen, "^nw1. Place a pallet with bags" ); nLen += format( szMenuBody[nLen], 255-nLen, "^nw2. Remove a pallet with bags" ); nLen += format( szMenuBody[nLen], 255-nLen, "^nw3. Remove all pallets with bags" ); nLen += format( szMenuBody[nLen], 255-nLen, "^n^nw0. Exit" ); keys = (1<<0|1<<1|1<<2|1<<3|1<<4|1<<5|1<<6|1<<9) show_menu( id, keys, szMenuBody, -1 ); // depends what you want, if is continue will appear on chat what the admin sayd return PLUGIN_HANDLED; } public menu_command(id,key,level,cid) { switch( key ) { // place a pallet with bags case 0: { place_palletwbags(id); show_the_menu(id,level,cid); } // remove a pallet with bags case 1: { new ent, body, class[32]; get_user_aiming(id, ent, body); if (pev_valid(ent)) { pev(ent, pev_classname, class, 31); if (equal(class, "amxx_pallets")) { fm_remove_entity(ent); } else client_print(id, print_chat, "[AMXX] You are not aiming at a pallet with bags"); } else client_print(id, print_chat, "[AMXX] You are not aiming at a valid entity !"); show_the_menu(id,level,cid); } // remove all pallets with bags case 2: { remove_allpalletswbags(); client_print(id,print_chat,"[AMXX] You removed all pallets with bags !"); show_the_menu(id,level,cid); } } return PLUGIN_HANDLED; } public place_palletwbags(id) { if( palletscout == get_pcvar_num(maxpallets) ) { client_print(id,print_chat,"You can't place more than %d pallets with bags",get_pcvar_num(maxpallets)); return PLUGIN_HANDLED; } // create a new entity new ent = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "func_wall")); // set a name to the entity set_pev(ent,pev_classname,"amxx_pallets"); // set model engfunc(EngFunc_SetModel,ent,g_models[random(sizeof g_models)]); // register a new var. for origin static Float:xorigin[3]; get_user_hitpoint(id,xorigin); // check if user is aiming at the air if(engfunc(EngFunc_PointContents,xorigin) == CONTENTS_SKY) { client_print(id,print_chat,"[AMXX] You can't place a pallet with bags on the air"); return PLUGIN_HANDLED; } // set sizes static Float:p_mins[3], Float:p_maxs[3]; p_mins = PALLET_MINS; p_maxs = PALLET_MAXS; engfunc(EngFunc_SetSize, ent, p_mins, p_maxs); set_pev(ent, pev_mins, p_mins); set_pev(ent, pev_maxs, p_maxs ); set_pev(ent, pev_absmin, p_mins); set_pev(ent, pev_absmax, p_maxs ); // set the rock of origin where is user placed engfunc(EngFunc_SetOrigin, ent, xorigin); // make the rock solid set_pev(ent,pev_solid,SOLID_BBOX); // touch on edge, block // set the movetype set_pev(ent,pev_movetype,MOVETYPE_FLY); // no gravity, but still collides with stuff // now the damage stuff, to set to take it or no // if you set the cvar "pallets_wbags_health" 0, you can't destroy a pallet with bags // else, if you want to make it destroyable, just set the health > 0 and will be // destroyable. new Float:p_cvar_health = get_pcvar_float(phealth); switch(p_cvar_health) { case 0.0 : { set_pev(ent,pev_takedamage,DAMAGE_NO); } default : { set_pev(ent,pev_health,p_cvar_health); set_pev(ent,pev_takedamage,DAMAGE_YES); } } static Float:rvec[3]; pev(id,pev_v_angle,rvec); rvec[0] = 0.0; set_pev(ent,pev_angles,rvec); // drop entity to floor fm_drop_to_floor(ent); // num .. palletscout++; // confirm message client_print(id,print_chat,"[AMXX] You placed a Pallet with Bags !"); return PLUGIN_HANDLED; } /* ==================================================== get_user_hitpoin stock . Was maked by P34nut, and is like get_user_aiming but is with floats and better <img src='https://amxx.pl/public/style_emoticons/<#EMO_DIR#>/ohmy.gif' class='bbc_emoticon' alt=':o' /> ====================================================*/ stock get_user_hitpoint(id, Float:hOrigin[3]) { if ( ! is_user_alive( id )) return 0; new Float:fOrigin[3], Float:fvAngle[3], Float:fvOffset[3], Float:fvOrigin[3], Float:feOrigin[3]; new Float:fTemp[3]; pev(id, pev_origin, fOrigin); pev(id, pev_v_angle, fvAngle); pev(id, pev_view_ofs, fvOffset); xs_vec_add(fOrigin, fvOffset, fvOrigin); engfunc(EngFunc_AngleVectors, fvAngle, feOrigin, fTemp, fTemp); xs_vec_mul_scalar(feOrigin, 9999.9, feOrigin); xs_vec_add(fvOrigin, feOrigin, feOrigin); engfunc(EngFunc_TraceLine, fvOrigin, feOrigin, 0, id); global_get(glb_trace_endpos, hOrigin); return 1; } /* ==================================================== This is called on every round, at start up, with HLTV logevent. So if the "pallets_wbags_nroundrem" cvar is set to 1, all placed pallets with bugs will be removed. ====================================================*/ public event_newround() { if( get_pcvar_num ( remove_nrnd ) == 1) remove_allpalletswbags(); } /* ==================================================== This is a stock to help for remove all pallets with bags placed . Is called on new round if the cvar "pallets_wbags_nroundrem" is set 1. ====================================================*/ stock remove_allpalletswbags() { new pallets = -1; while((pallets = fm_find_ent_by_class(pallets, "amxx_pallets"))) fm_remove_entity(pallets); palletscout = 0; }
Powinno być ok przekompiluj sobie
#3
Napisano 17.01.2009 13:28
Działa więc pozostaje mi dać tylko +pomógł aha i może wiesz bo żeby postawiać te worki trzeba w say'u wpisać pallets_menu a dało by się jakoś szybciej tzn. jakiś bind na to ?
#4
Napisano 17.01.2009 13:30
Normalnie robisz binda. Wpisujesz w konsoli:
bind "klawisz" "say pallets_menu"
#5
Napisano 17.01.2009 13:31
No to zrób sobie binda np:
Edit: @up wizu byłeś szybszy ;>
bind "n" "say pallets_menu"Po naciśnięciu Klawisza n otworzy ci się menu
Edit: @up wizu byłeś szybszy ;>
#6
Napisano 17.01.2009 15:25
A dało by się tak przerobić ten plugin żeby te worki były dla każdego gracza z osobna? bo teraz jak ustawiłem 5 worków to myślałem że to będzie dla każdego gracza z osobna, patrze a te worki są dla TT i CT czyli 5 worków dla wszystkich graczy z obydwóch teamów i jeżeli 1 gracz użyje 5 worków inny już nie może, i żeby dało się zbierać tylko swoje worki jak coś ...
Również z jednym lub większą ilością słów kluczowych: Modyfikacja
Inny
Dodanie Broni do PaintBallNapisany przez One ShooT, 05.02.2024 inny, modyfikacja |
|
||||
Modyfikacja
prośba o przerobienie pluginuprośba Napisany przez bili, 06.02.2021 modyfikacja |
|
||||
Modyfikacja
Prośba o dodanie modelu do vipa z generatoraNapisany przez Vanilla, 01.02.2021 modyfikacja |
|
||||
Modyfikacja
Plugin na przenikanie/spadochron pod komendąNapisany przez Polonez, 22.01.2021 modyfikacja |
|
||||
|
[ROZWIĄZANE] Modyfikacja pluginuNapisany przez _.-*`PaniQ*-._, 11.01.2021 modyfikacja |
|
Użytkownicy przeglądający ten temat: 0
0 użytkowników, 0 gości, 0 anonimowych