Raised This Month: $51 Target: $400
 12% 

[Solved] CleverBot problems...


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Freezo Begin
BANNED
Join Date: Mar 2014
Location: Morocco
Old 08-13-2015 , 18:18   [Solved] CleverBot problems...
Reply With Quote #1

Well this is my script :

Code:
#include <amxmodx> #include <http2> #include <ColorChat> #pragma semicolon 1 new const Version[] = "0.1"; new buffer[HTTP2_BUFFER_SIZE]; new g_Name[32]; public plugin_init() {     register_plugin("Clever Bot", Version, "Freezo");         register_clcmd("say", "hook_Say");     register_clcmd("say_team", "hook_Say"); } public hook_Say(id) {         new _argGet[212];     read_args(_argGet, charsmax(_argGet));     remove_quotes(_argGet);         if(_argGet[0] == 0)         return PLUGIN_HANDLED;         get_user_name(id , g_Name, charsmax(g_Name));         new urlSet[128];     formatex(urlSet, charsmax(urlSet), "http://spawner-best.esy.es/test.php?text=%s", _argGet);         HTTP2_Download(urlSet, _, _, "ProcessDl");         return PLUGIN_CONTINUE; } public ProcessDl(id) {         new iLen;     HTTP2_getData(buffer, charsmax(buffer), iLen);         new const szPub[][] = { "Clevermessage" , "app" , "chat" , "Android" , "IOS"  };     new const szRand[][] = { "Oo What?" , "Shut up man, wait !!" , "please i come here to play !" , ":(" , "Wait..."  };         for(new i = 0;i < sizeof( szPub ); i++){         if(containi(buffer, szPub[i]) != -1){             ColorChat( 0 , TEAM_COLOR , "^4[Clever Bot] ^3Freezo ^1: ^4%s?",szRand[random_num(0,5)]);             return PLUGIN_HANDLED;         }     }         new szText[64];     formatex(szText, charsmax(szText), "Hello %s!", g_Name);         replace(buffer, charsmax(buffer) , "Hello", szText);     replace(buffer, charsmax(buffer) , "Hi", szText);         ColorChat( 0 , TEAM_COLOR , "^4[Clever Bot] ^3Freezo ^1: ^4%s",buffer);         return PLUGIN_HANDLED;     }

  • ProcessDl(id) it doesn't return my index !!
  • In the Freeze time, the HTTP2_Download doesn't execute.

EDIT: Sorry this thread must be in Scripting help ...

Last edited by Freezo Begin; 08-14-2015 at 10:12.
Freezo Begin is offline
SpeeDeeR
Veteran Member
Join Date: Mar 2010
Location: Bulgaria
Old 08-14-2015 , 09:02   Re: CleverBot problems...
Reply With Quote #2

HTTP2_Download() doesn't return player index. Read the include file or the related thread.
SpeeDeeR is offline
Old 08-14-2015, 10:11
Freezo Begin
This message has been deleted by Freezo Begin.
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:19.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode