←  Pluginy

AMXX.pl: Support AMX Mod X i SourceMod

»

Modyfikacja
Przeróbka Screen Fade

Locked

  • +
  • -
n.o.x's Photo n.o.x 25.07.2011

Witam

Prosiłbym o przerobienie tego pluginu tak aby podczas gdy ginę robił się czerwony ekran. Obecnie jest niebieski ekran podczas zabicia kogoś.



#include <amxmodx>

public plugin_init()
{
        register_plugin("?", "1.0", "No-One");
        register_event("DeathMsg", "DeathEvent", "a");
}

public DeathEvent()
{
        new id = read_data(1);
        if(!is_user_connected(id))
                return PLUGIN_CONTINUE;
        message_begin(MSG_ONE, get_user_msgid("ScreenFade"), {0,0,0}, id);
        write_short(5<<10); // fade lasts this long duration
        write_short(3<<5); // fade lasts this long hold time
        write_short(1<<1); // fade type (in / out)
        write_byte(0); // red
        write_byte(0); // green
        write_byte(250); // blue
        write_byte(90); // alpha
        message_end();
        return PLUGIN_CONTINUE;
Quote

  • +
  • -
DarkGL's Photo DarkGL 26.07.2011

Automatyczna wiadomość


Ten temat został przeniesiony z forum:
AMX Mod X -> Pluginy
do
Scripting -> Pluginy
Quote

  • +
  • -
DarkGL's Photo DarkGL 27.07.2011


#include <amxmodx>



public plugin_init()

{

        register_plugin("?", "1.0", "No-One");

        register_event("DeathMsg", "DeathEvent", "a");

}



public DeathEvent()

{

        new id = read_data(1);

        if(!is_user_connected(id))

                return PLUGIN_CONTINUE;

        message_begin(MSG_ONE, get_user_msgid("ScreenFade"), {0,0,0}, id);

        write_short(5<<10); // fade lasts this long duration

        write_short(3<<5); // fade lasts this long hold time

        write_short(1<<1); // fade type (in / out)

        write_byte(255); // red

        write_byte(0); // green

        write_byte(0); // blue

        write_byte(90); // alpha

        message_end();

        return PLUGIN_CONTINUE;

}

Quote

  • +
  • -
n.o.x's Photo n.o.x 08.08.2011

ehh nawet nie wiedziałem że jest odpowiedź :)

zaraz sprawdzę czy działa i dam znać.
Quote

  • +
  • -
speedkill's Photo speedkill 08.08.2011

Ja tylko dodam coś od siebie
w tych 3 linijkach zmieniasz kolor
write_byte(0); // red // czerwony
        write_byte(0); // green // zielony
        write_byte(250); // blue // niebieski
masz tu gotowe kolory w rbg
RGB to Color Name Mapping(Triplet and Hex)
Edited by speedkill123, 08.08.2011 08:49.
Quote

  • +
  • -
diablix's Photo diablix 08.08.2011

Dark poprawił kolor, ja poprawię żeby działało na ofiarę a nie zabójcę

#include <amxmodx>

public plugin_init()
{
register_plugin("?", "1.0", "No-One");
register_event("DeathMsg", "DeathEvent", "a");
}

public DeathEvent()
{
new id = read_data(2);
if(!is_user_connected(id))
return PLUGIN_CONTINUE;
message_begin(MSG_ONE, get_user_msgid("ScreenFade"), {0,0,0}, id);
write_short(5<<10); // fade lasts this long duration
write_short(3<<5); // fade lasts this long hold time
write_short(1<<1); // fade type (in / out)
write_byte(255); // red
write_byte(0); // green
write_byte(0); // blue
write_byte(90); // alpha
message_end();
return PLUGIN_CONTINUE;
}
Quote

  • +
  • -
n.o.x's Photo n.o.x 08.08.2011

No właśnie... miałem do niego pisać że w zasadzie plugin działa tak samo tylko zmienił się kolor... ale widzę że jesteście czujni ;)

Idę sprawdzić jak działa i niebawem się pojawię.


edit:

Plugin działa poprawnie. Dzięki za pomoc.

Pozdrawiam
Edited by n.o.x, 08.08.2011 13:47.
Quote
Locked