Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Plugin generated by AMXX-Studio */
- #include <amxmodx>
- #include <amxmisc>
- #include <fakemeta>
- #define PLUGIN "Blocare Multipla"
- #define VERSION "1.0"
- #define AUTHOR "KENNY."
- #define kennyprefix "[BLOCK]"
- #define timp 10.0
- new NameUnLock[33]
- public plugin_init() {
- register_plugin(PLUGIN, VERSION, AUTHOR)
- register_clcmd ( "radio1", "cmdBlock" ) // 'z'
- register_clcmd ( "radio2", "cmdBlock" ) // 'x'
- register_clcmd ( "radio3", "cmdBlock" ) // 'c'
- server_cmd("sv_voiceenable 0") // 'k'
- register_message( get_user_msgid( "TextMsg" ), "TextMsgHandler" )
- register_forward(FM_ClientUserInfoChanged, "KENNY_NICKSPAM")
- }
- public cmdBlock ( ) return PLUGIN_HANDLED
- public TextMsgHandler( msgid, dest, receiver ) {
- static const szFireInTheHole[] = "#Fire_in_the_hole"
- static szMsg[18]
- if(get_msg_arg_int(1) != 5)
- return PLUGIN_CONTINUE
- get_msg_arg_string(5, szMsg, charsmax(szMsg))
- if(!strcmp(szMsg, szFireInTheHole))
- return PLUGIN_HANDLED
- return PLUGIN_CONTINUE
- }
- public KENNY_NICKSPAM(id) {
- new LastName[32],
- NewName[32]
- pev(id,pev_netname,LastName,charsmax(LastName))
- if(LastName[0]) {
- get_user_info(id,"name", NewName, charsmax(NewName))
- if(!equal(LastName,NewName)) {
- if (NameUnLock[id] == 1) {
- ColorChat(id,"^4%s^1 Iti poti schimba numele din nou in^4 10 secunde.",kennyprefix)
- set_user_info(id,"name",LastName)
- return FMRES_HANDLED
- }
- NameUnLock[id] = 1
- set_task(10.0, "ResetNick", id + 552)
- }
- }
- return FMRES_SUPERCEDE
- }
- public ResetNick(id) {
- id - 552
- if(!is_user_connected(id)) return
- NameUnLock[id] = 0
- }
- stock ColorChat(const id, const input[], any:...) {
- new count = 1, players[32];
- static msg[191];
- vformat(msg, 190, input, 3);
- replace_all(msg, 190, "!g", "^4");
- replace_all(msg, 190, "!y", "^1");
- replace_all(msg, 190, "!t", "^3");
- if(id) players[0] = id;
- else get_players(players, count, "ch"); {
- for(new i = 0; i < count; i++) {
- if(is_user_connected(players[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