Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <amxmodx>
- new num1
- public plugin_init()
- {
- register_clcmd( "say /test", "ClientCommand_Test" );
- register_clcmd("say /q", "ClCmdTest");
- }
- public ClCmdTest(pId)
- {
- set_hudmessage(255, 255, 255, 0.01, 0.4, 0, 0.0, 0.0, 0.6, 1.0, false);
- num1 = random_num(1, 100);
- show_hudmessage(pId, "qfgyjhyuhf = 1341+444444+ %d ?",num1);
- }
- /*blue - Количество синего цвета;
- x - Координата X, идёт слева направо, 0.0 слева, 1.0 справа, -1.0 по центру;
- y - Координата Y, идёт сверху вниз, 0.0 сверху, 1.0 снизу, -1.0 по центру;
- effects - Эффект сообщения:
- 0 - Появление -> Простой -> Пропадание (Затухание),
- 1 - (Появление -> Простой -> Пропадание (Затухание)) + Мигание,
- 2 - Печатание букв -> Простой -> Пропадание (Затухание);
- fxtime - Время отставания блеска от печатания букв во 2-ом эффекте ("Скользящий блеск");
- holdtime - Время простоя сообщения;
- fadeintime - Время появления сообщения, во 2-ом эффекте скорость печатания (1 буква в % секунд);
- fadeouttime - Время пропадания сообщения (Затухание);
- channel - канал сообщения, при -1 ищет следующий канал (Существует ограничение в 4 канала, т.е. не может быть больше 4 сообщений одновременно.*/
- public ClientCommand_Test( client )
- {
- sendHudMessage
- (
- .index = client,
- .message = "Welcome to our server,^n111111111111111111",//no matter
- .red = 255,
- .green = 120,
- .blue = 0,
- .x = 0.05,
- .y = 0.2,
- .effect = 2,
- .fxTime = 17.0,
- .holdTime = 15.0,
- .fadeInTime = 0.1,
- .fadeOutTime = 3.0
- );
- }
- sendHudMessage( const index, const message[], const red=255, const green=120, const blue=0,
- const Float:x, const Float:y, const effect, const Float:fxTime,
- const Float:holdTime, const Float:fadeInTime, const Float:fadeOutTime)//also and here i changed
- {
- #define pack_color(%0,%1,%2) ( %0 + ( %1 << 8 ) + ( %2 << 16 ) )
- #define write_float(%0) ( write_byte( ( _:%0 & 0xFF ) ), \
- write_byte( ( _:%0 >> 8 ) & 0xFF ), \
- write_byte( ( _:%0 >> 16 ) & 0xFF ), \
- write_byte( ( _:%0 >> 24 ) & 0xFF ) )
- message_begin( MSG_ONE, SVC_DIRECTOR, .player = index );
- {
- write_byte( strlen( message ) + 31 ); // size of write_*
- write_byte( DRC_CMD_MESSAGE );
- write_byte( effect );
- write_long( pack_color( red, green, blue ) );
- write_float( x );
- write_float( y );
- write_float( fadeInTime );
- write_float( fadeOutTime );
- write_float( holdTime );
- write_float( fxTime );
- write_string( message );
- }
- message_end();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement