Record and play NPC's in-game.
#1

Hi guys..

How can you create bots in-game? Like, you record yourself, and then you do /play (slot), and you get a bot that is doing that record. (my english sucks)
So, like you can record yourself, a bot is replaying, and then you can see it .

How can you make that ;o?
Reply
#2

you have to install a plugin onto your server that can move files, move to the correct folde and run the easy few lines that connect and run a npc...
but anyways i think it won't work because you need to compile the script in npc modes, however maybe you can compile a 'dynamic' script where you can do /play (slot) (type) etc..
Reply
#3

Quote:
Originally Posted by gamer_Z
you have to install a plugin onto your server that can move files, move to the correct folde and run the easy few lines that connect and run a npc...
but anyways i think it won't work because you need to compile the script in npc modes, however maybe you can compile a 'dynamic' script where you can do /play (slot) (type) etc..
i dunno lol. Thats why I'm asking ;o
Reply
#4

pawn Код:
#include <a_npc>
#include <strtok>

public OnPlayerText(playerid, text[]){
    new stext[256],idx;
    stext = strtok(text,idx);
    if(!strcmp(stext,"RUN_BOT",false)){
      new tmp[256],name[256];
      tmp = strtok(text,idx);
      name = strtok(text,idx);
      if(strlen(tmp) && strlen(name)){
        StartRecordingPlayback(strval(tmp),name);
      }
      return 0;
    }
    return 1;
}
now you just only have to make a command to move files with *.rec to npcmodes>recordings ... ;p i dunnop if it will work lol

btw u need a FILE PLUGIN
Reply
#5

Quote:
Originally Posted by gamer_Z
btw u need a FILE PLUGIN
Yes. Or ask Kye.
Reply
#6

you can create a hardlink from "scriptfiles/" to "npcmodes/recordings" directory, then a simple command will be able to save a recording with the players' name as filename.
Reply
#7

I know I'm bumping a very old topic atm.. I'm still very interested in what I just said on first post..

Well, does somebody got an idea to make this?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)