Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <amxmodx>
- #include <amxmisc>
- #define ADVERTISING_TIME 120.0 //Intervalul de timp la care sa apara mesajul(mesajele) dorit(e).//
- #define PLUGIN "Chat Redirect"
- #define VERSION "1.1"
- #define AUTHOR "xsider"
- stock const messages[] = "[eXtreamCS] Pentru a va conecta la serverul DeathRun tastati /eXtreamDR"; //Mesajul care doriti sa apara.
- new server[]="dr.extreamcs.com" //Adresa serverului pe care doriti sa va conectati.
- public plugin_init() {
- register_plugin(PLUGIN, VERSION, AUTHOR);
- register_clcmd("say /eXtreamCS","connect_server"); //In loc de /eXtreamCS puneti cuvantul care doriti sa-l tastati in chat pentru a va trimite pe serverul ales mai devreme.
- set_task(ADVERTISING_TIME, "show_messages", _, _, _,"b");
- }
- public connect_server(id)
- client_cmd(id,"connect %s",server);
- public show_messages() {
- new Buffer[256];
- formatex(Buffer, sizeof Buffer - 1, "^x04%s", messages[random(sizeof messages)]); //Setati culoarea cu care doriti sa apara mesajul(mesajele).
- new players[32], num, id;
- get_players(players, num);
- for(new i = 0 ; i < num ; i++)
- {
- id = players
- message_begin(MSG_ONE, get_user_msgid("SayText"), _, id);
- write_byte(id);
- write_string(Buffer);
- message_end();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement