RSSy MYGO.pl Opublikowano Maj 19, 2020 o 21:46 RSSy Udostępnij Opublikowano Maj 19, 2020 o 21:46 Hello everyone! well, i need help with this paintball script I do not want bullets to break entities on the map, at least not the base boxes, but I do want them to break glass or bars, I found a small solution to this, which is only allowing some entities to be affected by the painting and the rest not, however some entities are affected because their EntIDs are the same, I publish the part of the code that is what affects this. I wanted to know if it is possible to make that for each map, I can choose which entities can be broken PHP Code: #include <amxmodx> #include <fakemeta> #include <hamsandwich> #define PLUGIN "Paintball Gun" #define VERSION "3.4" #define AUTHOR "WhooKid" new const boxes []= { //de_nuke 111, 114, 115, 165, 166, 169, 172, 185, //de_inferno 179, //de_prodigy 86, 98, 99, 100, 125, 157, 158, //de_survivor 100, 146, 147, 148, 149, //de_cpl_mill 236, //de_mirage 69, 70, 71, 72, 77, 81 } public fw_touch(bullet, ent) { new bool:valid_surface = (is_ent_alive || containi(class2, "door") != -1) ? false : true; if (pev(ent, pev_health) && !is_ent_alive) // && pev(ent, pev_takedamage) != DAMAGE_NO) { new bool:isbox = true for(new i = 0; i < sizeof(boxes); i++) if(ent == boxes[i]) { isbox = false break } if(!isbox) ExecuteHam(Ham_TakeDamage, ent, owner, owner, float(pev(ent, pev_health)), 0); valid_surface = false; } if (valid_surface) { paint_splat(bullet); set_task(float(get_pcvar_num(blife)), "paint_reset", bullet+TASK_PB_RESET); } else paint_reset(bullet+TASK_PB_RESET); return FMRES_HANDLED; } return FMRES_IGNORED; } Przeczytaj cały wpis Odnośnik do komentarza Udostępnij na innych stronach Więcej opcji udostępniania...
Rekomendowane odpowiedzi