Screen neišnykimas

Šiame forume rašomi vartotojų klausimai/problemos su kuriomis jie susidūrė kuriant pluginus.
Post Reply
Spag
Gana aktyvus vartotojas
Posts: 269
Joined: 2012 Dec 31 15:39

Screen neišnykimas

Post by Spag »

Kaip padaryti, kad jeigu pvz.: momentas[id] = true, tau pasidaro mėlynas screen ir nedingsta, būna mėlynas screen... O su momentas[id] = false tau dingtų mėlynas screen ir pasidarytų viskas default?

Man reiki screen pačio kodo kad neišnyktų

Code: Select all

public momentas(id){         momentas[id] = true          // duoda zaidejui melyna screen ir jis būna visa laika kol momentas[id] = true} public baigiam(id){         momentas[id] = false                  // panaikina melyna screen}

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

Re: Screen neišnykimas

Post by hleV »

Susirask UTIL_ScreenFade().
Image ← RIP best userbar
DISKUSIJA: KIETAS PLUGIN'O UŽSAKOVAS
Privačios pagalbos neteikiu!

Spag
Gana aktyvus vartotojas
Posts: 269
Joined: 2012 Dec 31 15:39

Re: Screen neišnykimas

Post by Spag »

hleV wrote:Susirask UTIL_ScreenFade().

tipo taip:

Code: Select all

#include <amxmodx>#include "screenfade_util.inc" new g_pCvarType public plugin_init(){    register_plugin("screen", "0.1", "Spag/Alliedmodders")     g_pCvarType = register_cvar("color_type", "0 0 255")     register_clcmd("say /screen", "melynas_screen")} public melynas_screen( id ){    UTIL_ScreenFade(id, get_cvar_color2(g_pCvarType2), 10.0, 10.0, 250)    return PLUGIN_HANDLED}  /*****STOCKAI*****\  stock get_cvar_color2( g_pCvar ) // 8 natives // 5 if don't use clamp{    new Color[3]     new szColor[12] // "RRR GGG BBB"    get_pcvar_string(g_pCvar, szColor, charsmax(szColor))     new szRed[4], szGreen[4], szBlue[4]    parse(szColor, szRed, charsmax(szRed), szGreen, charsmax(szGreen), szBlue, charsmax(szBlue))    Color[0] = clamp(str_to_num(szRed), 0, 255)    Color[1] = clamp(str_to_num(szGreen), 0, 255)    Color[2] = clamp(str_to_num(szBlue), 0, 255)     return Color}  
aš nerišu... kaip turi būt kad neišnyktų screen'as


Padėkit kas nors yra man rimta šita problema.

User avatar
aurimasko
Flooderis arba specialistas
Posts: 736
Joined: 2010 Sep 04 08:45

Re: Screen neišnykimas

Post by aurimasko »

Code: Select all

 #define FFADE_IN            0x0000      // Just here so we don't pass 0 into the function#define FFADE_OUT           0x0001      // Fade out (not in)#define FFADE_MODULATE      0x0002      // Modulate (don't blend)#define FFADE_STAYOUT       0x0004      // ignores the duration, stays faded out until new ScreenFade message received 
FFADE_STAYOUT naudok ir nesibaigs kol tu nepabaigsi.

Spag
Gana aktyvus vartotojas
Posts: 269
Joined: 2012 Dec 31 15:39

Re: Screen neišnykimas

Post by Spag »

aurimasko wrote:

Code: Select all

 #define FFADE_IN            0x0000      // Just here so we don't pass 0 into the function#define FFADE_OUT           0x0001      // Fade out (not in)#define FFADE_MODULATE      0x0002      // Modulate (don't blend)#define FFADE_STAYOUT       0x0004      // ignores the duration, stays faded out until new ScreenFade message received 
FFADE_STAYOUT naudok ir nesibaigs kol tu nepabaigsi.
Ačiū, padėjai, tik kilo keli taip klausimukai,
FFADE_IN baigia, o FFADE_STAYOUT pradeda, o ką daro _OUT ir _MODULATE ?

User avatar
aurimasko
Flooderis arba specialistas
Posts: 736
Joined: 2010 Sep 04 08:45

Re: Screen neišnykimas

Post by aurimasko »

tie fade in ir fade out tai po truputį didini (fade in) ar mažini (fade out) ryškumą to screenfade.

o modulate, nežinau

Tetusis

Re: Screen neišnykimas

Post by Tetusis »

aurimasko wrote:

Code: Select all

 #define FFADE_IN            0x0000      // Just here so we don't pass 0 into the function#define FFADE_OUT           0x0001      // Fade out (not in)#define FFADE_MODULATE      0x0002      // Modulate (don't blend)#define FFADE_STAYOUT       0x0004      // ignores the duration, stays faded out until new ScreenFade message received 
FFADE_STAYOUT naudok ir nesibaigs kol tu nepabaigsi.

dekui, o as beverti task naudojau .___.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests