katoryje

Šiame forume vartotojai gali prašyti jiems reikiamo plugino.
Forum rules
Šiame forume galite siūlyti idėjas ar prašyti jums reikalingų pluginų. Jei kas nors pradės jį kurti, tai pasirašys Jūsų sukurtoje temoje. Niekada nepykite, jei niekas neatsako į Jūsų prašymą. Gal tai tiesiog per sudėtinga, arba reikalauja per daug darbo.
Post Reply
KamiN
Gana aktyvus vartotojas
Posts: 227
Joined: 2011 Apr 23 13:17

katoryje

Post by KamiN »

reik man kažko
Last edited by KamiN on 2012 May 24 20:43, edited 2 times in total.

User avatar
psychical
Viršininkas
Posts: 2094
Joined: 2011 Mar 12 22:19
Skype: tautvydas11
Location: Linksmakalnis
Contact:

Re: jail_open

Post by psychical »

Netrauksiu, geriau duosiu kita:

Code: Select all

 #include <amxmodx>#include <hamsandwich>#include <engine>#include <cstrike>#include <fakemeta>#include <amxmisc> #define CELL_RADIUS Float:500.0 new g_Buttons[10], Trie:g_CellManagers public plugin_precache(){    g_CellManagers = TrieCreate()} public plugin_init(){    register_plugin("JailBreak: daysmenu", "0.1", "rez.lt")    register_clcmd("say /open", "jail_open");    setup_buttons()} public jail_open(){    static i    for(i = 0; i < sizeof(g_Buttons); i++)    {        if(g_Buttons[i])        {            ExecuteHamB(Ham_Use, g_Buttons[i], 0, 0, 1, 1.0)            entity_set_float(g_Buttons[i], EV_FL_frame, 0.0)        }    }} public setup_buttons(){    new ent[3]    new Float:origin[3]    new info[32]    new pos        while((pos <= sizeof(g_Buttons)) && (ent[0] = engfunc(EngFunc_FindEntityByString, ent[0], "classname", "info_player_deathmatch")))    {        pev(ent[0], pev_origin, origin)        while((ent[1] = engfunc(EngFunc_FindEntityInSphere, ent[1], origin, CELL_RADIUS)))        {            if(!is_valid_ent(ent[1]))                continue                        entity_get_string(ent[1], EV_SZ_classname, info, charsmax(info))            if(!equal(info, "func_door"))                continue                        entity_get_string(ent[1], EV_SZ_targetname, info, charsmax(info))            if(!info[0])                continue                        if(TrieKeyExists(g_CellManagers, info))            {                TrieGetCell(g_CellManagers, info, ent[2])            }            else            {                ent[2] = engfunc(EngFunc_FindEntityByString, 0, "target", info)            }                        if(is_valid_ent(ent[2]) && (in_array(ent[2], g_Buttons, sizeof(g_Buttons)) < 0))            {                g_Buttons[pos] = ent[2]                pos++                break            }        }    }    TrieDestroy(g_CellManagers)} stock in_array(needle, data[], size){    for(new i = 0; i < size; i++)    {        if(data[i] == needle)            return i    }    return -1}
Bandyk jail_dust, jei neveiks, parasyk... Jei veiks, tai veiks beveik visuose map, kuriuose mygtukas arciau kameru o ne uz puskilometrio...
Attachments
jail_open.sma
(1.75 KiB) Downloaded 757 times
Last edited by psychical on 2011 Jun 25 19:26, edited 2 times in total.

KamiN
Gana aktyvus vartotojas
Posts: 227
Joined: 2011 Apr 23 13:17

Re: jail_open

Post by KamiN »

dekui
Last edited by KamiN on 2012 May 24 20:43, edited 2 times in total.

User avatar
psychical
Viršininkas
Posts: 2094
Joined: 2011 Mar 12 22:19
Skype: tautvydas11
Location: Linksmakalnis
Contact:

Re: jail_open

Post by psychical »

Srr mano klaida, istryniau include, galvojau jog nereik... :D Edited, turi veikt...

KamiN
Gana aktyvus vartotojas
Posts: 227
Joined: 2011 Apr 23 13:17

Re: jail_open

Post by KamiN »

aciu
Last edited by KamiN on 2012 May 24 20:43, edited 3 times in total.

User avatar
psychical
Viršininkas
Posts: 2094
Joined: 2011 Mar 12 22:19
Skype: tautvydas11
Location: Linksmakalnis
Contact:

Re: jail_open

Post by psychical »

ten speju bus kitaip padaryta, kad tipo jei tas map spaustu ta mygtuka ir t.t.

Pukuotukas951
Gana aktyvus vartotojas
Posts: 445
Joined: 2011 Aug 27 09:29

Re: jail_open

Post by Pukuotukas951 »

Įmanoma šitą vietą kodo

Code: Select all

public plugin_precache(){    g_CellManagers = TrieCreate()}
šitą:

Code: Select all

    g_CellManagers = TrieCreate()
įkišti kur nors, bet ne į precache? Nes man dėl jo pjaunasi kitas pluginas ir nepajungia map.

Fly3r
Jau po truputį tampa savu
Posts: 138
Joined: 2011 Nov 06 11:35

Re: jail_open

Post by Fly3r »

Pukuotukas951 wrote:Įmanoma šitą vietą kodo

Code: Select all

public plugin_precache(){    g_CellManagers = TrieCreate()}
šitą:

Code: Select all

    g_CellManagers = TrieCreate()
įkišti kur nors, bet ne į precache? Nes man dėl jo pjaunasi kitas pluginas ir nepajungia map.
Gali kur nori.

User avatar
hleV
AMX Mod X ekspertai
Posts: 875
Joined: 2011 Apr 02 11:23
Skype: hlev.lt
Location: Šiauliai

Re: katoryje

Post by hleV »

Mano toks variantas. Norint atidaryt kameras reikia panaudot OpenCells().

Code: Select all

#define MAX_BUTTONS 32#define CELL_RADIUS 200.0 new Buttons[MAX_BUTTONS];new ButtonCount; public plugin_init()    GatherButtons(); GatherButtons(){    new spawn, door, target, Float:origin[3], className[32], i;     while (ButtonCount < sizeof Buttons && (spawn = find_ent_by_class(spawn, "info_player_deathmatch")))    {        entity_get_vector(spawn, EV_VEC_origin, origin);         while ((door = find_ent_in_sphere(door, origin, CELL_RADIUS)))        {            entity_get_string(door, EV_SZ_classname, className, charsmax(className));             if (!equal(className, "func_door"))                continue;             entity_get_string(door, EV_SZ_targetname, className, charsmax(className));             if (className[0] == EOS)                continue;             target = find_ent_by_target(0, className);             if (!target)                continue;             for (i = 0; i < ButtonCount; i++)                if (target == Buttons[i])                    continue;             Buttons[ButtonCount++] = target;             break;        }         door = 0;    }} OpenCells(){    for (new i, ent; i < ButtonCount; i++)    {        ent = Buttons[i];         ExecuteHamB(Ham_Use, ent, 0, 0, 1, 1.0);        entity_set_float(ent, EV_FL_frame, 0.0);    }     CellsOpened = true;}
Image ← RIP best userbar
DISKUSIJA: KIETAS PLUGIN'O UŽSAKOVAS
Privačios pagalbos neteikiu!

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests