Author Topic: ConsoleChat by me (Moby)  (Read 4092 times)

0 Members and 1 Guest are viewing this topic.

Offline sseebbyy

  • VC:MP Veteran
  • *****
  • Posts: 774
  • Immortal VC:MP Player
    • View Profile
    • Zombie Invasion => Server Forum [DEAD PROJECT]
ConsoleChat by me (Moby)
« on: July 31, 2012, 01:28:00 am »
Console Chat

This system give you the possibility to talk from the server console.
When you typed something and press Enter, an message will be imediatly sent in server inside.

Download: [FS] Console Chat
Pastebin: http://pastebin.com/acG2WJG6

You have one simple command:
                          /say - Is used on RCON Console. Send a message to the server.

ATTENTION: The command is without "/c" and this system works only if is used as FilterScript !

How to enable this FilterScript for my server ?
               1. Download the [FS] Console Chat
               2. Extract files in "filterscripts" folder from server directory
               3. Add in "server.cfg" , at the "filterscripts" line:  ConsoleChat_ByMoby
               4. Run the server and test the system.

CREDITS:  Me (Moby)
« Last Edit: July 31, 2012, 11:44:23 pm by sseebbyy »

Quote
Painful/Noob scripters acts like: I Am The Best Scripter Because I Announce My Releases With Big Font Size Without Giving Too Much Info' In The Hope They All Will Download And Check It. I Ignore Bad Replies, Replies That I Could Learn From, And Replies With So Much Text.



Offline dynavolt71

  • Crime Boss
  • ****
  • Posts: 371
    • View Profile
    • My Blog
Re: ConsoleChat by me (Moby)
« Reply #1 on: October 31, 2012, 09:16:41 am »
:) Thx  ;D
[PAWNO]Fix Error " Failed to set data for "" " - http://forum.vicecitymultiplayer.com/index.php?topic=5743.0



:'(

Offline aledark24

  • Made Man
  • ***
  • Posts: 206
  • I am a scripter and you have celous of me....so you crashed my servers
    • View Profile
Re: ConsoleChat by me (Moby)
« Reply #2 on: October 31, 2012, 04:46:36 pm »
:) Thx  ;D
Another system to talk in the console

[pawn]//chat para usar en la consola incluye /dice /ann1 y /ann2 "no acepto copias" atte aledark24
#include <a_vcmp>
#include <dutils>

#define yellow 0xFFFF00AA

#define INACTIVE_PLAYER_ID 255
#define RED   0xFF0000aa
#define GREEN               0x24FF0AB9
#define WHITE            0xFFFDFDFF
#define ORANGE              0xE8941EFF
#define PURPLEE            0xD22FBCFF
#define DGREEN            0x04A36BFF
#define BLUE            0x377DFFFF
#define PINK                0xFF66FFAA

#pragma unused ret_memcpy


new gPlayers[MAX_PLAYERS][MAX_PLAYER_NAME+1];
//==============================================================================
public OnRconCommand(cmd[],playerid)
{
    new tmp[256];
    new idx;
    new cmdt[256];
   cmdt = strtok(cmd,idx);

    if(strcmp(cmdt,"/say",true) == 0)
    {
        tmp = strtok(cmd,idx);
        if (!strlen(tmp)) printf(">> Console error: /say [message]");
        else {
         new string[256];
         format(string,sizeof(string),"** Console >> Administrator: %s",cmd[5]);
         SendClientMessageToAll(yellow,string);
         printf(string);
      }
   return 1;


 }
   else if(strcmp(cmdt,"/ann1",true) == 0)
    {
        tmp = strtok(cmd,idx);
        if (!strlen(tmp)) printf(">>  console error: /ann1 [message]");
        else {
         new string[256];
         format(string,sizeof(string),"~y~%s",cmd[5]);
         GameTextForAll(string);
         printf(string);
      }
   return 1;


 }
   else if(strcmp(cmdt,"/ann2",true) == 0)
    {
        tmp = strtok(cmd,idx);
        if (!strlen(tmp)) printf(">> console error: /ann2 [message]");
        else {
         new string[256];
         format(string,sizeof(string),"~b~%s",cmd[5]);
            GameTextForAllBottom(string);
         printf(string);
      }
   return 1;



   }
    return 0;
}
//==============================================================================
public OnFilterScriptInit()
{
    print("+=====================================================================+");
   print("|Chat activado usa /dice /ann1 /ann2 desde consola                    |");
    print("|=======================Aledark24=====================================|");

   return 1;
}
//==============================================================================
public OnFilterScriptExit()
{
   return 1;
}

//==============================================================================
public FindPlayerIDFromString( string[] )
{
   new player = INACTIVE_PLAYER_ID;
   new p = 0;
   while ( p < MAX_PLAYERS){ if (strfind(gPlayers[p],string,true ) != -1 ) { player=p;break; } p++; }
   if ( player == INACTIVE_PLAYER_ID )
   {
      if ((strlen( string ) > 2) || (isnumeric( string ) == 0 ) ) { return INACTIVE_PLAYER_ID;
   }
      player = strval( string );//
   }
   if ( !IsPlayerConnected( player ) ) { return INACTIVE_PLAYER_ID; }
   return player;//
}

//==============================================================================
isnumeric( const string[] )
{
   for ( new i = 9999, j = strlen( string ); i < j; i++ ) { if ( string[ i ] > '9' || string[ i ] < '0' ) return 0; }
   return 1;
}
//==============================================================================[/pawn]
« Last Edit: November 01, 2012, 05:14:49 pm by aledark24 »
I am a great scripter and you are celous of my works
.....

Vice City Life Multiplayer By Saint

Offline dynavolt71

  • Crime Boss
  • ****
  • Posts: 371
    • View Profile
    • My Blog
Re: ConsoleChat by me (Moby)
« Reply #3 on: November 01, 2012, 08:59:46 am »
But, Im want Version English  :-\
[PAWNO]Fix Error " Failed to set data for "" " - http://forum.vicecitymultiplayer.com/index.php?topic=5743.0



:'(

Offline aledark24

  • Made Man
  • ***
  • Posts: 206
  • I am a scripter and you have celous of me....so you crashed my servers
    • View Profile
Re: ConsoleChat by me (Moby)
« Reply #4 on: November 01, 2012, 05:06:26 pm »
But, Im want Version English  :-\
change yourself in /dice = /say
In error de consola  = console error
in administrador = administrator
  8) and compile
I am a great scripter and you are celous of my works
.....

Vice City Life Multiplayer By Saint