[FilterScript] Chat Bot - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (
https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] Chat Bot (
/showthread.php?tid=316146)
Chat Bot -
JungleBook - 05.02.2012
Chat Bot v1
Hey Guys I Was Working Late Night On This Project Its Features Are Talk And Respond
And Random Messaging To The Server It Acts Like A Player But Its Not So It Wont Respond Back Always
It Only Responds On "Jack" "Hello" "Hey" And Does Random Messaging On The Rest
There Are Minor Bugs
But Its A Good Script If You Want A Preview Come To My Server Here's The Ip : 78.147.136.84:7777
Please Subscribe On My Videos Like This One
[ame]http://www.youtube.com/watch?v=iNPqvYv1iA8&context=C39f85e0ADOEgsToPDskLj JJMME6d6-tiaNrqvTd9M[/ame]
And Here's The Download Link If You Want To Edit Use Pawno:
http://www.mediafire.com/?dnslc32ilmrnl83
Re: Chat Bot -
Scenario - 05.02.2012
If you have minor bugs with a system that simple, you must be really horrible at coding. By the way, this isn't the server advertisement section so quit trying to advertise your server here!
Re: Chat Bot -
JungleBook - 05.02.2012
Dont Need To Be Rude About It If You Downloaded It And Checked For Your Self You May Be Surprised
Respuesta: Chat Bot -
[Nikk] - 07.02.2012
Nice, but prefer CleverBot xd
Re: Respuesta: Chat Bot -
Ballu Miaa - 07.02.2012
Quote:
Originally Posted by [Nikk]
Nice, but prefer CleverBot xd
|
Same or My work! GrannyBot!
pawn Код:
COMMAND:grannybot(playerid, params[])
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] >= 1)
{
new result[128],string[128];
if(sscanf(params, "s[128]",result)) return SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /grannybot(/gb) [Bot Message]");
format(string, sizeof(string), "* GrannyBot: %s **", result);
SendClientMessageToAll(0x66a2ff97, string);
}
}
return 1;
}
Re: Respuesta: Chat Bot -
Konstantinos - 07.02.2012
Quote:
Originally Posted by Ballu Miaa
Same or My work! GrannyBot!
pawn Код:
COMMAND:grannybot(playerid, params[]) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pAdmin] >= 1) { new result[128],string[128]; if(sscanf(params, "s[128]",result)) return SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /grannybot(/gb) [Bot Message]"); format(string, sizeof(string), "* GrannyBot: %s **", result); SendClientMessageToAll(0x66a2ff97, string); } } return 1; }
|
It doesn't need sscanf for this and check if the playerid is conencted because if player isn't connected of course he/she can't use the comamnd

Much easier:
pawn Код:
CMD:grannybot( playerid, params[ ] )
{
new string[ 128 ];
if( PlayerInfo[ playerid ][ pAdmin ] < 1) return SendClientMessage( playerid, -1, "You are not Admin!" );
if( isnull( params ) ) return SendClientMessage( playerid, COLOR_GRAD2, "USAGE: /grannybot(/gb) [Bot Message]" );
format( string, sizeof( string ), "* GrannyBot: %s **", params );
SendClientMessageToAll( 0x66a2ff97, string );
return 1;
}
CMD:gb( playerid, params[ ] )
{
return cmd_grannybot( playerid, params );
}
Re: Respuesta: Chat Bot -
Ballu Miaa - 07.02.2012
Quote:
Originally Posted by Dwane
It doesn't need sscanf for this and check if the playerid is conencted because if player isn't connected of course he/she can't use the comamnd 
Much easier:
pawn Код:
CMD:grannybot( playerid, params[ ] ) { new string[ 128 ]; if( PlayerInfo[ playerid ][ pAdmin ] < 1) return SendClientMessage( playerid, -1, "You are not Admin!" ); if( isnull( params ) ) return SendClientMessage( playerid, COLOR_GRAD2, "USAGE: /grannybot(/gb) [Bot Message]" ); format( string, sizeof( string ), "* GrannyBot: %s **", params ); SendClientMessageToAll( 0x66a2ff97, string ); return 1; }
CMD:gb( playerid, params[ ] ) { return cmd_grannybot( playerid, params ); }
|
Yeah not bad thats good. Thanks! But why do we use IsNull param basically? Can you explain bro? Thanks Homeboy
Re: Chat Bot -
Shadow_ - 08.02.2012
Thanks for giving me credits.
Re: Chat Bot -
KingHual - 08.02.2012
He posted his IP here hahahaha
Re: Chat Bot -
JungleBook - 08.02.2012
Thanks For Your Help And View Guys

My Ip Is A Fail So Dont Worry About it