AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   [Solved] CleverBot problems... (https://forums.alliedmods.net/showthread.php?t=270022)

Freezo Begin 08-13-2015 18:18

[Solved] CleverBot problems...
 
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 ...

SpeeDeeR 08-14-2015 09:02

Re: CleverBot problems...
 
HTTP2_Download() doesn't return player index. Read the include file or the related thread.


All times are GMT -4. The time now is 08:31.

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