create bots with this plugin

habi

  • Sr. Member
  • Posts: 285
create bots with this plugin
«  »Last edited
This is a squirrel plugin to create bots in the server.
Quote
Download plugins

actor32.dll

actor64.dll

Installation  ( very easy )

Copy the actor64.dll into plugins folder. Open server.cfg find the line plugins, add 'actor64' to the last. see pic below



Functions
Only two functions now,
create_actor(name, skinId, x, y, z, angle), set_actor_angle

Examples
Code: [Select]
function onScriptLoad()
{
create_actor( "medic", 5, -656, 756, 11.2, 1.5 );  //5 == ambulance man
create_actor( "emma", 65, -660, 758, 11.2, -1.5 ); 
}

create_actor("john");

create_actor("kevin",5); will spawn a medic with name 'kevin'

create_actor("Edward",1,-656,756,11.2,0); will spawn a cop at downtown facing north.

setport("8193"); ( in case your port is not 8192, but 8193 );

Notes
1. actorid and playerid are different.
2. create_actor returns an integer which is 0 for 1st bot, 1 for 2nd bot and so on. We can call it actor id. 
3. create_actor function will take a little time to create bots.
4. If your server has registration system, you must add the bots name to database. Otherwise the bots cannot spawn.

For detailed documentation, see click Source code below and view readme file.

Note: This project was built with Visual Studio 2019.           Source code


Linux Version

64 bit  actor64.so

32 bit  actor32.so

Source code

Functions are same except set_port. The parameter inside set_port must be integer. eg. set_port( 8193 ). Default is 8192.

MEGAMIND

  • Hero Member
  • Developer of Webnet Official
  • Posts: 787
Re: create bots with this plugin
« Reply #2,  »Last edited
perfection implemented feels like samp bots but with no anims, Finally vcmp is somewhat going towards implementation of bots, nice work habi
Re: create bots with this plugin
« Reply #3,  »
@habi when anims? or any procedure to make them do anything as we want such as performing a drift on a track which makes bot do it repeatedly such as loop?, would be a greate feature ik its too early to ask but was a great possibility in nodejs :)..Good luck

habi

  • Sr. Member
  • Posts: 285
Re: create bots with this plugin
« Reply #4,  »
i think anims already there  megamind. These actors are actually players. Just do player.SetAnim

Sebastian

  • VC:MP Beta Tester
  • Something like this: hga hga hga
  • Posts: 1,091
Re: create bots with this plugin
« Reply #6,  »Last edited




Yep, they work indeed.
Looks great, @habi !

PS: Now it is posible to make some good looking videos

habi

  • Sr. Member
  • Posts: 285

Eva

  • Full Member
  • Posts: 167
Re: create bots with this plugin
« Reply #8,  »
How does this work? i have it so far the actor connects but then it times out and my console spammed :D

habi

  • Sr. Member
  • Posts: 285
Re: create bots with this plugin
« Reply #9,  »Last edited
Quote from Eva on May 11th, 05:27 PM
How does this work? i have it so far the actor connects but then it times out and my console spammed
Eva, post a screenshot

Eva

  • Full Member
  • Posts: 167
Re: create bots with this plugin
« Reply #10,  »Last edited
i did set_port("2005");
then create_actor("Edward",1,-656,756,11.2,0);


habi

  • Sr. Member
  • Posts: 285
Re: create bots with this plugin
« Reply #11,  »
Oh. there is a case I avoided, because of some reasons. Your server is pushing this case. Try on blank server for time being.

Razor.

  • Jr. Member
  • Posts: 80

Alpays

  • Newbie
  • Posts: 27
Re: create bots with this plugin
« Reply #13,  »
Quote from Eva on May 11th, 06:29 PM
i did set_port("2005");
then create_actor("Edward",1,-656,756,11.2,0);

Happened to me moved store folder and fixed but Bot didnt spawned deleted some of my codes and bot spawned

MEGAMIND

  • Hero Member
  • Developer of Webnet Official
  • Posts: 787
Re: create bots with this plugin
« Reply #14,  »
Quote from Alpays on May 12th, 01:01 PM
Quote from Eva on May 11th, 06:29 PM
i did set_port("2005");
then create_actor("Edward",1,-656,756,11.2,0);

Happened to me moved store folder and fixed but Bot didnt spawned deleted some of my codes and bot spawned
Idk where and what your guy are trying to do but for a basic server or ur server why not try using
Code: [Select]
//commands
case "npc":
{
        create_actor("Edward",45,-656,756,11.2,0);
        set_port("5192");
FindPlayer(1).SetAnim(0,2);
}
        break;
first create the actor then set ports and do whatever u like well this works for me