Code: Select all
public Request(id) { new szName[33] get_user_name(id, szName, 32); new szMessage[128] formatex(szMessage, charsmax(szMessage), "%s^nchange the command", szName); sendHudMessage ( .index = id, .message = szMessage, .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) ( %2 + ( %1 << 8 ) + ( %0 << 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(); }