Vice City Multiplayer

VC:MP 0.3 => mIRC/pawn Scripting => Topic started by: mrockxkingbutt on March 06, 2013, 02:48:34 pm

Title: Bots System ( By Me ) ( Pawn )
Post by: mrockxkingbutt on March 06, 2013, 02:48:34 pm
here is fake bots
Code: [Select]
new RandomMSG[][]=
{

    "[BOT] : Is Online Now",
    "[BOT] : Is Active Now",
    "[BOT] : Is Now Going",
    "[BOT] : Irc admin Active",
    "[BOT] : Server Protector Online",
    "[BOT] : Help Center Online",
    "[BOT] : Server Is Online"

};
forward SendMSG();
new RandomMSG2[][]=
{

    "[BOT] : HELLO VCMP",
    "[BOT] : How Are You All",
    "[BOT] : Dont HAck Or Get Ban",
    "[BOT] : Dont Abuse Or Ban",
    "[BOT] : use /c getcar and get any vehicle",
    "[BOT] : I Am Created By Spider",
    "[BOT] : Server Is Created By Spider"

};
forward SendMSG2();

Code: [Select]
public SendMSG()
{
    new randMSG = random(sizeof(RandomMSG));
    SendClientMessageToAll(0xFF007FFF, RandomMSG[randMSG]); // Replace the "COLOR" with your defined color.
}
public SendMSG2()
{
    new randMSG2 = random(sizeof(RandomMSG2));
    SendClientMessageToAll(0xFF007FFF, RandomMSG2[randMSG2]); // Replace the "COLOR" with your defined color.
}

Code: [Select]
SetTimer("SendMSG", 10000, true);
SetTimer("SendMSG2", 10000, true);
SetTimer("DisplayBots",1000*60*1,1);
SetTimer("timechange", 10000, false);

Code: [Select]
else if ( strcmp( cmd, "botoff", true ) == 0 )
{
if ( !IsLoggedIn( playerid ) ) SendClientMessage( playerid, COLOR_RED, "Please log-in to your account." );
else if ( !IsAuthorized( playerid, cmd ) ) SendClientMessage( playerid, COLOR_RED, "You don't have access to use this command!" );
else
{
 KillTimer(1);
 KillTimer(2);
 KillTimer(3);
 KillTimer(4);
}
return 1;
}
else if (strcmp(cmd, "setbot", true) == 0) {
new setbots[256];
tmp = strtok(cmdtext, idx);
if(!IsPlayerAdmin(playerid)) SendClientMessage(playerid, COLOR_RED, "You need to Rcon login first!");
else if (!strlen(tmp)) SendClientMessage(playerid,COLOR_RED,"USAGE: /c setbot text");
else {
format(file, sizeof(file), "/Bots/Bots.ini", "Bots");
   format(setbots,sizeof(setbots),"Bot %s : %s",gPlayers[playerid],cmdtext[7]);
dini_Set(file, "Bots", setbots);
}
return 1;
}
else if ( strcmp( cmd, "boton", true ) == 0 )
{
if ( !IsLoggedIn( playerid ) ) SendClientMessage( playerid, COLOR_RED, "Please log-in to your account." );
else if ( !IsAuthorized( playerid, cmd ) ) SendClientMessage( playerid, COLOR_RED, "You don't have access to use this command!" );
else
{
SetTimer("SendMSG", 10000, true);
SetTimer("SendMSG2", 10000, true);
}
return 1;
}

Code: [Select]
//=========BOT REPLY
else if (strcmp(cmd, "f9-n-u", true) == 0 )
{
 SendClientMessage(playerid, RED," [BOT] I AM ALSO FINE");
    return 1;
}
else if (strcmp(cmd, "f9-and-u", true) == 0 )
{
 SendClientMessage(playerid, RED," [BOT] I AM ALSO FINE");
    return 1;
}
else if (strcmp(cmd, "fine-and-you", true) == 0 )
{
 SendClientMessage(playerid, RED," [BOT] I AM ALSO FINE");
    return 1;
}
else if (strcmp(cmd, "thanks", true) == 0 )
{
 SendClientMessage(playerid, RED," [BOT] your welcome");
    return 1;
}
else if (strcmp(cmd, "are-you-a-bot", true) == 0 )
{
 SendClientMessage(playerid, RED," [BOT] Yes i am a bot");
    return 1;
}
else if (strcmp(cmd, "is-this-server-is-sq", true) == 0 )
{
 SendClientMessage(playerid, RED," [BOT] no");
    return 1;
}
else if (strcmp(cmd, "is-this-server-is-pawn", true) == 0 )
{
 SendClientMessage(playerid, RED," [BOT] yes");
    return 1;
}
else if (strcmp(cmd, "id", true) == 0 )
{
 SendClientMessage(playerid, RED," [BOT] our account on fb mrockx mani");
    return 1;
}

Code: [Select]
public DisplayBots()
{
new Msg[256];
new xgv[256];
format(file, sizeof(file), "/Bots/Bots.ini");
xgv = dini_Get(file, "Bots");

    format(Msg,sizeof(Msg),"[BOT] %s Online You Can CHat Now",xgv);
SendClientMessageToAll(COLOR_YELLOW, Msg);
return 1;
}
all here
need any help ask here
any bug post here
Title: Re: Bots System + time change v1 by me (FAKE BOTS BUT BOTS)
Post by: sseebbyy on March 06, 2013, 05:03:56 pm
SetWorldTime is a bugged function !
Title: Re: Bots System + time change v1 by me (FAKE BOTS BUT BOTS)
Post by: aledark24 on March 06, 2013, 06:26:26 pm
wtf??

:P :P :P for people alone in the server :P :P :P "people whit not port forward"
 ;D ;D ;D ;D ;D ;D ;D ;D
 :o :o :o :o :o :o :o
Title: Re: Bots System + time change v1 by me (FAKE BOTS BUT BOTS)
Post by: mrockxkingbutt on March 06, 2013, 08:52:30 pm
TRUE SEBY

ALEDARK
BOTS ARE FAKE BECUZ BOTS ARE ONLY FOR ALONE GUYS LOL
But This is a tutorial how to make fake bots :D
Title: Re: Bots System + time change v1 by me (FAKE BOTS BUT BOTS)
Post by: sseebbyy on March 06, 2013, 09:49:55 pm
TRUE SEBY

So why you made the change time system if you knew that ?  :-X
It makes lag and is useless.
Title: Re: Bots System + time change v1 by me (FAKE BOTS BUT BOTS)
Post by: mrockxkingbutt on March 06, 2013, 10:05:14 pm
TRUE SEBY
Quote
I DONT KNOW THAT ABOUT WORLDTIME

But I Like Bot System ;)

Title: Re: Bots System + time change v1 by me (FAKE BOTS BUT BOTS)
Post by: stormeus on March 07, 2013, 02:20:41 am
It's not a bot when you have to tell the bot what to do.
Title: Re: Bots System + time change v1 by me (FAKE BOTS BUT BOTS)
Post by: USA.Ghost on March 08, 2013, 11:16:59 am
here is fake bots
[pawn]new RandomMSG[][]=
{

    "[BOT] : Is Online Now",
    "[BOT] : Is Active Now",
    "[BOT] : Is Now Going",
    "[BOT] : Irc admin Active",
    "[BOT] : Server Protector Online",
    "[BOT] : Help Center Online",
    "[BOT] : Server Is Online"

};
forward SendMSG();
new RandomMSG2[][]=
{

    "[BOT] : HELLO VCMP",
    "[BOT] : How Are You All",
    "[BOT] : Dont HAck Or Get Ban",
    "[BOT] : Dont Abuse Or Ban",
    "[BOT] : use /c getcar and get any vehicle",
    "[BOT] : I Am Created By Spider",
    "[BOT] : Server Is Created By Spider"

};
forward SendMSG2();[/pawn]

[pawn]public SendMSG()
{
    new randMSG = random(sizeof(RandomMSG));
    SendClientMessageToAll(0xFF007FFF, RandomMSG[randMSG]); // Replace the "COLOR" with your defined color.
}
public SendMSG2()
{
    new randMSG2 = random(sizeof(RandomMSG2));
    SendClientMessageToAll(0xFF007FFF, RandomMSG2[randMSG2]); // Replace the "COLOR" with your defined color.
}      [/pawn]

[pawn]SetTimer("SendMSG", 10000, true);
SetTimer("SendMSG2", 10000, true);
SetTimer("DisplayBots",1000*60*1,1);
SetTimer("timechange", 10000, false);[/pawn]

[pawn]         else if ( strcmp( cmd, "botoff", true ) == 0 )
   {
      if ( !IsLoggedIn( playerid ) ) SendClientMessage( playerid, COLOR_RED, "Please log-in to your account." );
      else if ( !IsAuthorized( playerid, cmd ) ) SendClientMessage( playerid, COLOR_RED, "You don't have access to use this command!" );
      else
      {
 KillTimer(1);
 KillTimer(2);
 KillTimer(3);
 KillTimer(4);
      }
      return 1;
   }
          else if (strcmp(cmd, "setbot", true) == 0) {
      new setbots[256];
      tmp = strtok(cmdtext, idx);
      if(!IsPlayerAdmin(playerid)) SendClientMessage(playerid, COLOR_RED, "You need to Rcon login first!");
      else if (!strlen(tmp)) SendClientMessage(playerid,COLOR_RED,"USAGE: /c setbot text");
      else {
         format(file, sizeof(file), "/Bots/Bots.ini", "Bots");
   format(setbots,sizeof(setbots),"Bot %s : %s",gPlayers[playerid],cmdtext[7]);
         dini_Set(file, "Bots", setbots);
      }
      return 1;
   }      
         else if ( strcmp( cmd, "boton", true ) == 0 )
   {
      if ( !IsLoggedIn( playerid ) ) SendClientMessage( playerid, COLOR_RED, "Please log-in to your account." );
      else if ( !IsAuthorized( playerid, cmd ) ) SendClientMessage( playerid, COLOR_RED, "You don't have access to use this command!" );
      else
      {
SetTimer("SendMSG", 10000, true);
SetTimer("SendMSG2", 10000, true);
      }
      return 1;
   }[/pawn]

[pawn]      //=========BOT REPLY
      else if (strcmp(cmd, "f9 n u", true) == 0 )
      {
 SendClientMessage(playerid, RED," [BOT] I AM ALSO FINE");
       return 1;
      }
      else if (strcmp(cmd, "f9 and u", true) == 0 )
      {
 SendClientMessage(playerid, RED," [BOT] I AM ALSO FINE");
       return 1;
      }
      else if (strcmp(cmd, "fine and you", true) == 0 )
      {
 SendClientMessage(playerid, RED," [BOT] I AM ALSO FINE");
       return 1;
      }
      else if (strcmp(cmd, "thanks", true) == 0 )
      {
 SendClientMessage(playerid, RED," [BOT] your welcome");
       return 1;
      }
      else if (strcmp(cmd, "are you a bot", true) == 0 )
      {
 SendClientMessage(playerid, RED," [BOT] Yes i am a bot");
       return 1;
      }
      else if (strcmp(cmd, "is this server is sq", true) == 0 )
      {
 SendClientMessage(playerid, RED," [BOT] no");
       return 1;
      }
      else if (strcmp(cmd, "is this server is pawn", true) == 0 )
      {
 SendClientMessage(playerid, RED," [BOT] yes");
       return 1;
      }
      else if (strcmp(cmd, "id", true) == 0 )
      {
 SendClientMessage(playerid, RED," [BOT] our account on fb mrockx mani");
       return 1;
      }[/pawn]

[pawn]public DisplayBots()
{
new Msg[256];
      new xgv[256];
   format(file, sizeof(file), "/Bots/Bots.ini");
   xgv = dini_Get(file, "Bots");
   
          format(Msg,sizeof(Msg),"[BOT] %s Online You Can CHat Now",xgv);
         SendClientMessageToAll(COLOR_YELLOW, Msg);

}
public timechange()
{
SetWorldTime(21,10);
SetTimer("timechange2", 100000, false);
}
public timechange2()
{
SetWorldTime(25,10);
SetTimer("timechange3", 100000, false);
}      
public timechange3()
{
SetWorldTime(1,10);
SetTimer("timechange4", 100000, false);
}      
public timechange4()
{
SetWorldTime(5,10);
SetTimer("timechange5", 100000, false);
}      
public timechange5()
{
SetWorldTime(10,10);
}         [/pawn]
all here
need any help ask here
any bug post here

Nice mrockxxingbutt :P
however, samp (http://www.sa-mp.com) has real bots/npcs, that look like players
Title: Re: Bots System + time change v1 by me (FAKE BOTS BUT BOTS)
Post by: mrockxkingbutt on March 08, 2013, 12:29:32 pm
THANKS GHOST
Title: Re: Bots System + time change v1 by me (FAKE BOTS BUT BOTS)
Post by: dynavolt71 on March 08, 2013, 03:00:53 pm
-,- vcmp now cant create bots. It just auto msg. And if you join your server with 0 players, you still forever alone :.P
Title: Re: Bots System + time change v1 by me (FAKE BOTS BUT BOTS)
Post by: USA.Ghost on March 15, 2013, 10:47:56 am
here is fake bots
[pawn]new RandomMSG[][]=
{

    "[BOT] : Is Online Now",
    "[BOT] : Is Active Now",
    "[BOT] : Is Now Going",
    "[BOT] : Irc admin Active",
    "[BOT] : Server Protector Online",
    "[BOT] : Help Center Online",
    "[BOT] : Server Is Online"

};
forward SendMSG();
new RandomMSG2[][]=
{

    "[BOT] : HELLO VCMP",
    "[BOT] : How Are You All",
    "[BOT] : Dont HAck Or Get Ban",
    "[BOT] : Dont Abuse Or Ban",
    "[BOT] : use /c getcar and get any vehicle",
    "[BOT] : I Am Created By Spider",
    "[BOT] : Server Is Created By Spider"

};
forward SendMSG2();[/pawn]

[pawn]public SendMSG()
{
    new randMSG = random(sizeof(RandomMSG));
    SendClientMessageToAll(0xFF007FFF, RandomMSG[randMSG]); // Replace the "COLOR" with your defined color.
}
public SendMSG2()
{
    new randMSG2 = random(sizeof(RandomMSG2));
    SendClientMessageToAll(0xFF007FFF, RandomMSG2[randMSG2]); // Replace the "COLOR" with your defined color.
}      [/pawn]

[pawn]SetTimer("SendMSG", 10000, true);
SetTimer("SendMSG2", 10000, true);
SetTimer("DisplayBots",1000*60*1,1);
SetTimer("timechange", 10000, false);[/pawn]

[pawn]         else if ( strcmp( cmd, "botoff", true ) == 0 )
   {
      if ( !IsLoggedIn( playerid ) ) SendClientMessage( playerid, COLOR_RED, "Please log-in to your account." );
      else if ( !IsAuthorized( playerid, cmd ) ) SendClientMessage( playerid, COLOR_RED, "You don't have access to use this command!" );
      else
      {
 KillTimer(1);
 KillTimer(2);
 KillTimer(3);
 KillTimer(4);
      }
      return 1;
   }
          else if (strcmp(cmd, "setbot", true) == 0) {
      new setbots[256];
      tmp = strtok(cmdtext, idx);
      if(!IsPlayerAdmin(playerid)) SendClientMessage(playerid, COLOR_RED, "You need to Rcon login first!");
      else if (!strlen(tmp)) SendClientMessage(playerid,COLOR_RED,"USAGE: /c setbot text");
      else {
         format(file, sizeof(file), "/Bots/Bots.ini", "Bots");
   format(setbots,sizeof(setbots),"Bot %s : %s",gPlayers[playerid],cmdtext[7]);
         dini_Set(file, "Bots", setbots);
      }
      return 1;
   }      
         else if ( strcmp( cmd, "boton", true ) == 0 )
   {
      if ( !IsLoggedIn( playerid ) ) SendClientMessage( playerid, COLOR_RED, "Please log-in to your account." );
      else if ( !IsAuthorized( playerid, cmd ) ) SendClientMessage( playerid, COLOR_RED, "You don't have access to use this command!" );
      else
      {
SetTimer("SendMSG", 10000, true);
SetTimer("SendMSG2", 10000, true);
      }
      return 1;
   }[/pawn]

[pawn]      //=========BOT REPLY
      else if (strcmp(cmd, "f9 n u", true) == 0 )
      {
 SendClientMessage(playerid, RED," [BOT] I AM ALSO FINE");
       return 1;
      }
      else if (strcmp(cmd, "f9 and u", true) == 0 )
      {
 SendClientMessage(playerid, RED," [BOT] I AM ALSO FINE");
       return 1;
      }
      else if (strcmp(cmd, "fine and you", true) == 0 )
      {
 SendClientMessage(playerid, RED," [BOT] I AM ALSO FINE");
       return 1;
      }
      else if (strcmp(cmd, "thanks", true) == 0 )
      {
 SendClientMessage(playerid, RED," [BOT] your welcome");
       return 1;
      }
      else if (strcmp(cmd, "are you a bot", true) == 0 )
      {
 SendClientMessage(playerid, RED," [BOT] Yes i am a bot");
       return 1;
      }
      else if (strcmp(cmd, "is this server is sq", true) == 0 )
      {
 SendClientMessage(playerid, RED," [BOT] no");
       return 1;
      }
      else if (strcmp(cmd, "is this server is pawn", true) == 0 )
      {
 SendClientMessage(playerid, RED," [BOT] yes");
       return 1;
      }
      else if (strcmp(cmd, "id", true) == 0 )
      {
 SendClientMessage(playerid, RED," [BOT] our account on fb mrockx mani");
       return 1;
      }[/pawn]

[pawn]public DisplayBots()
{
new Msg[256];
      new xgv[256];
   format(file, sizeof(file), "/Bots/Bots.ini");
   xgv = dini_Get(file, "Bots");
   
          format(Msg,sizeof(Msg),"[BOT] %s Online You Can CHat Now",xgv);
         SendClientMessageToAll(COLOR_YELLOW, Msg);

}
public timechange()
{
SetWorldTime(21,10);
SetTimer("timechange2", 100000, false);
}
public timechange2()
{
SetWorldTime(25,10);
SetTimer("timechange3", 100000, false);
}      
public timechange3()
{
SetWorldTime(1,10);
SetTimer("timechange4", 100000, false);
}      
public timechange4()
{
SetWorldTime(5,10);
SetTimer("timechange5", 100000, false);
}      
public timechange5()
{
SetWorldTime(10,10);
}         [/pawn]
all here
need any help ask here
any bug post here


thnks for the msg code, now i can create even more advanced bot system