MAGNET Napisano 14 Lipca 2018 W tym poście umieszczane będą UserMessages, które zostały już przetestowane i znamy ich działanie. Na tej stronieHej! Skorzystałeś z linku lub pobrałeś załącznik? Uhonoruj naszą pracę poprzez rejestrację na forum i rośnij razem z nami! znajdziemy całą listę, jednak brak na niej opisów, co te wiadomości właściwie robią Przykład użycia: Spoiler UserMsg FadeMsg; public OnPluginStart() { FadeMsg = GetUserMessageId("Fade"); RegConsoleCmd("sm_fade", Fade); } public Action Fade(int client, int args) { PrintToChat(client, "Wysylam: Fade"); int clients[2]; clients[0] = client; int duration = 255; int holdtime = 255; int flags = 0x0002; int color[4] = { 0, 0, 0, 128 }; color[0] = GetRandomInt(0,255); color[1] = GetRandomInt(0,255); color[2] = GetRandomInt(0,255); Handle message = StartMessageEx(FadeMsg, clients, 1); PbSetInt(message, "duration", duration); PbSetInt(message, "hold_time", holdtime); PbSetInt(message, "flags", flags); PbSetColor(message, "clr", color); EndMessage(); } Fade - koloruje graczowi ekran Spoiler 1. [int] duration - określa jak długo ekran ma być "pokolorowany" 2. [int] hold_time - określa ile "kolorowanie" ma się utrzymywać 3. [int] flags - tryb: Spoiler #define FFADE_IN 0x0001 // Just here so we don't pass 0 into the function #define FFADE_OUT 0x0002 // Fade out (not in) #define FFADE_MODULATE 0x0004 // Modulate (don't blend) #define FFADE_STAYOUT 0x0008 // ignores the duration, stays faded out until new ScreenFade message received #define FFADE_PURGE 0x0010 // Purges all other fades, replacing them with this one 4. [CMsgRGBA] clr - Definiuje kolory RGBA (podajemy 4-elementową tablice intów) Shake - Trzęsie ekranem gracza Spoiler 1. [int] command - Jeden z 5 trybów (przeważnie używamy po prostu 0, żeby uruchomić trzęsienie): Spoiler #define SHAKE_START 0 // Starts the screen shake for all players within the radius. #define SHAKE_STOP 1 // Stops the screen shake for all players within the radius. #define SHAKE_AMPLITUDE 2 // Modifies the amplitude of an active screen shake for all players within the radius. #define SHAKE_FREQUENCY 3 // Modifies the frequency of an active screen shake for all players within the radius. #define SHAKE_START_RUMBLEONLY 4 // Starts a shake effect that only rumbles the controller, no screen effect. #define SHAKE_START_NORUMBLE 5 // Starts a shake that does NOT rumble the controller. 2. [float] local_amplitude - amplituda (jak mocno ma trząść) 3. [float] frequency - jak często ma trząść 4. [float] duration - jak długo ma trząść Cytuj Udostępnij tę odpowiedź Odnośnik do odpowiedzi Udostępnij na innych stronach