Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Script generated by Pawn Studio */
- #include <amxmodx>
- #include <amxmisc>
- #define PLUGIN "ConnectionMessages"
- #define AUTHOR "DragoNNNN"
- #define VERSION "1.0"
- public plugin_init() {
- register_plugin(PLUGIN, VERSION, AUTHOR)
- }
- public client_authorized(id) {
- if(is_user_bot(id)) {
- return PLUGIN_HANDLED
- }
- new name[33]
- get_user_name(id, name, 32)
- new playerid[33]
- get_user_authid(id, playerid, 32)
- client_printcolor(0, "!tPlayer !g%s !twith !nSteamID !g[!n%s!g]!t has connected.",name,playerid)
- }
- public client_disconnect(id) {
- if(is_user_bot(id)) {
- return PLUGIN_HANDLED
- }
- new name[33]
- get_user_name(id, name, 32)
- new playerid[33]
- get_user_authid(id, playerid, 32)
- client_printcolor(0, "!tPlayer !g%s !twith !nSteamID !g[!n%s!g]!t has disconnected.",name,playerid)
- }
- stock client_printcolor(const id, const input[], any:...)
- {
- new count = 1, players[32];
- static msg[191];
- vformat(msg, 190, input, 3);
- replace_all(msg, 190, "!g", "^x04"); // Green Color
- replace_all(msg, 190, "!n", "^x01"); // Default Color
- replace_all(msg, 190, "!t", "^x03"); // Team Color
- if(id)
- players[0] = id;
- else
- get_players(players, count, "ch");
- for (new i = 0; i < count; i++)
- {
- message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i]);
- write_byte(players[i]);
- write_string(msg);
- message_end();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement