Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* CSO Print Color
- *
- *
- * This file is provided as is (no warranties).
- */
- #if defined _print_included
- #endinput
- #endif
- #define _print_included
- #define CHAT_TAG "^x04[Points SQLx]^x01"
- stock print_message(const Player, const Message[], any:...)
- {
- // Some information
- new i_CountPlayer = 1, i_MsgSayText, a;
- new i_PlayersNum[32], i_FinalMsgString[191], i_MsgVFormat[191];
- vformat(i_MsgVFormat, charsmax (i_MsgVFormat), Message, 3);
- // Formatting last message send
- replace_all(i_MsgVFormat, charsmax(i_MsgVFormat), "^x01", "");
- formatex(i_FinalMsgString, charsmax(i_FinalMsgString), "%s %s", CHAT_TAG, i_MsgVFormat);
- // Send message info
- i_MsgSayText = get_user_msgid("SayText");
- // Sending message to one or more players?
- if(Player)
- {
- message_begin(MSG_ONE_UNRELIABLE, i_MsgSayText, _, Player);
- write_byte(Player);
- write_string(i_FinalMsgString);
- message_end();
- }
- else
- {
- for(a = 0; a < i_CountPlayer; a++)
- {
- new i_Players = i_PlayersNum[a];
- if(!is_user_connected(i_Players))
- continue;
- message_begin(MSG_ONE_UNRELIABLE, i_MsgSayText, _, i_Players);
- write_byte(i_Players);
- write_string(i_FinalMsgString);
- message_end();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement