This is a squirrel plugin to create bots in the server.
Quote(https://i.imgur.com/hUrcdoN.png)
Download pluginsactor32.dll (https://drive.google.com/file/d/1OHjTU2tuxVMTn5fnevnHG_e_CwLKmry-/view?usp=sharing)
actor64.dll (https://drive.google.com/file/d/1jCuL_K1SuxUyqgmLUviB02WjzIT_zBMy/view?usp=sharing)
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
(https://i.imgur.com/Liq09aJ.jpg)
(https://i.imgur.com/lYArFKR.jpg)
FunctionsOnly two functions now,
create_actor(name, skinId, x, y, z, angle), set_actor_angle
Examplesfunction 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 (https://github.com/habi498/actor-plugin)
Linux Version
64 bit actor64.so (https://drive.google.com/file/d/16yIFZ7KWuQk7DnuWS18J_6mJJ6gdlUSG/view?usp=sharing)
32 bit actor32.so (https://drive.google.com/file/d/118kaSJEGPBAYe5Vbs8cisaGqFhX5bFNd/view?usp=sharing)
Source code (https://github.com/habi498/linux-actor)
Functions are same except set_port. The parameter inside set_port must be integer. eg. set_port( 8193 ). Default is 8192.
The bots will have ping 1 or 2.
perfection implemented feels like samp bots but with no anims, Finally vcmp is somewhat going towards implementation of bots, nice work habi
@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
i think anims already there megamind. These actors are actually players. Just do player.SetAnim
https://youtu.be/rGWaiE5bh-U
(https://i.imgur.com/7RaZHlu.png)
(https://i.imgur.com/FZWo47f.png)
Yep, they work indeed.
Looks great,
@habi !
PS: Now it is posible to make some good looking videos
QuoteYep, they work indeed.
Looks great, @habi !
Thanks, mate
How does this work? i have it so far the actor connects but then it times out and my console spammed :D
Quote from: Eva on May 11, 2020, 04:27 PMHow does this work? i have it so far the actor connects but then it times out and my console spammed
Eva, post a screenshot
i did set_port("2005");
then create_actor("Edward",1,-656,756,11.2,0);
(https://i.imgur.com/50dPfrW.png)
Oh. there is a case I avoided, because of some reasons. Your server is pushing this case. Try on blank server for time being.
Good work!
Quote from: Eva on May 11, 2020, 05:29 PMi did set_port("2005");
then create_actor("Edward",1,-656,756,11.2,0);
(https://i.imgur.com/50dPfrW.png)
Happened to me moved store folder and fixed but Bot didnt spawned deleted some of my codes and bot spawned
Quote from: Alpays on May 12, 2020, 12:01 PMQuote from: Eva on May 11, 2020, 05:29 PMi did set_port("2005");
then create_actor("Edward",1,-656,756,11.2,0);
(https://i.imgur.com/50dPfrW.png)
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
//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
This problem is finally fixed. New file in main post.
Quote from: Alpays on May 12, 2020, 12:01 PMQuote from: Eva on May 11, 2020, 05:29 PMi 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
yes, the store had something to do with it. fixed now.
Also, Thanks to Eva's Server, which was used for testing.
hey what ever skin i try it just doesnt work, it just load my first skin in server which is philcasdy, how do i assign it a playermodel or skin?, ive tried changing skin to custom skin values too but it just loadsup philcasy
Quote from: MEGAMIND on May 12, 2020, 09:53 PMhey what ever skin i try it just doesnt work, it just load my first skin in server which is philcasdy, how do i assign it a playermodel or skin?, ive tried changing skin to custom skin values too but it just loadsup philcasy
Okay megamind do you have x64 system. I made some changes to fix skin, here is 64 bit plugin
actor64 (https://drive.google.com/file/d/1jCuL_K1SuxUyqgmLUviB02WjzIT_zBMy/view?usp=sharing)
Try and tell me if it works.
Here now it connects but it stays in spawnscreen position and is invisible
I will PM you the secret :D
it was because the server won't allow actor to spawn without registering. I had hidden a command in module. it is used to send a command to server ( /cmd text).
So he can use send_cmd( 0, "register pass" ) to make the actor with id 0, registered.
Quote from: habi on May 13, 2020, 04:43 AMQuote from: MEGAMIND on May 12, 2020, 09:53 PMhey what ever skin i try it just doesnt work, it just load my first skin in server which is philcasdy, how do i assign it a playermodel or skin?, ive tried changing skin to custom skin values too but it just loadsup philcasy
Okay megamind do you have x64 system. I made some changes to fix skin, here is 64 bit plugin
actor64 (https://drive.google.com/file/d/1jCuL_K1SuxUyqgmLUviB02WjzIT_zBMy/view?usp=sharing)
Try and tell me if it works.
yes im using x64 plugin and tried this plugin too same nothing changed
megamind, i updated it
actor64 (https://drive.google.com/file/d/1jCuL_K1SuxUyqgmLUviB02WjzIT_zBMy/view?usp=sharing)
Try it.
PS: Is your server online
Quote from: habi on May 13, 2020, 10:50 AMmegamind, i updated it
actor64 (https://drive.google.com/file/d/1jCuL_K1SuxUyqgmLUviB02WjzIT_zBMy/view?usp=sharing)
Try it.
PS: Is your server online
server is online & npc skin still hasnt changed
To connect with me in a more freindly environment catch-me-up on Discord MEGAMIND#8033
vcmp peds/bots (https://www.youtube.com/watch?v=gpiu2VKTqWA)
nice Eva :) let us see if we can reduce their health
Quote from: habi on May 15, 2020, 11:19 AMnice Eva :) let us see if we can reduce their health
That would be pretty hard to be implemented honestly, if you know how the sync in VCMP works. You will have to use the script to decrease it.
@ Xmair, we will discuss that later.
Now something
https://youtu.be/gNMDxUgg06E
It is recording and replay. I have been working on this past 4 days.
I will post the details very soon.( Need to sleep)
btw, today is my birthday ! Thanks.
Quote from: habi on May 17, 2020, 08:15 PM@ Xmair, we will discuss that later.
Now something
https://youtu.be/gNMDxUgg06E
It is recording and replay. I have been working on this past 4 days.
I will post the details very soon.( Need to sleep)
btw, today is my birthday ! Thanks.
@habi Happy birthday..
Nice. Very nice. GOOD STUFF HABI
Happy Birthday habi!
Happy Birthday
@habi !!
Wish you the best!
Post deleted.
hey guys not working for anybody?
You have to put double \\ sometimes.
Also, I will post the source code soon
Quote from: habi on May 20, 2020, 12:32 PMhey guys not working for anybody?
You have to put double \\ sometimes.
Also, I will post the source code soon
hey
@habi sometimes videos help alot why not a quick video?
hi friends, i am back.
Between i found a way to record player actions.i will be posting it these days.
First, to make this work, we must remove anticheat 0 in server.cfg
Then you need to download EasyHook64.dll and place in server directory( same folder as server.exe and NOT inside plugins folder )
When you want to record player actions, you hook the server, get data, write to file.
Later, while playing we not need to hook server, since hooking server everytime leads to crashing it.
I am working on the codes and the codes are working.
Personally, simply spawning an actor by using a function is all I need. Don't know about the others need though
But (again, personally) since I can apply anims to it, teleport it where i want, put it in a car, I have all I need.
:)
MoveTo function would be something, but i believe it's harder than it sounds, since you are struggling with this packets recording
So, all I can say is: Bravo!
awsome
Quote from: Sebastian on May 29, 2020, 03:51 PMPersonally, simply spawning an actor by using a function is all I need. Don't know about the others need though
But (again, personally) since I can apply anims to it, teleport it where i want, put it in a car, I have all I need.
MoveTo function would be something, but i believe it's harder than it sounds, since you are struggling with this packets recording
So, all I can say is: Bravo!
hi seby, thanks for the reply.
however, we can't put bots in vehicle now.
Move to function is difficult, but it is in my to-do list( which do not exists :P )
Now, i am releasing linux version of our same old module ( which has been a dream )
Linux 64 bit actor64.so (https://drive.google.com/file/d/16yIFZ7KWuQk7DnuWS18J_6mJJ6gdlUSG/view?usp=sharing)
Linux 32 bit actor32.so (https://drive.google.com/file/d/118kaSJEGPBAYe5Vbs8cisaGqFhX5bFNd/view?usp=sharing)
Source code ( a little updated ) https://github.com/habi498/linux-actor
Quote(from first page of this topic)Now, the functions
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.
Also, set_port( 8193 ); // if your port is not 8192, but 8193. Note that linux version has no quotes like "8193".
i myself has a linux system and needed this. so created this plugin for linux.
Quote from: habi on Jun 01, 2020, 06:28 PMhowever, we can't put bots in vehicle now.
Quote from: Sebastian on May 11, 2020, 03:06 PM(https://i.imgur.com/FZWo47f.png)
We can FindPlayer( bot ).Vehicle=somevehicle
Quote from: Sebastian on Jun 02, 2020, 03:01 PMQuote from: habi on Jun 01, 2020, 06:28 PMhowever, we can't put bots in vehicle now.
Quote from: Sebastian on May 11, 2020, 03:06 PM(https://i.imgur.com/FZWo47f.png)
We can FindPlayer( bot ).Vehicle=somevehicle
cool. I thought we could not.
90% completed.
https://youtu.be/dFDqhqHZwT4
here it is actor64.dll (https://drive.google.com/file/d/1m_csnuqSzkYCjF-3kAN3jb_Odfk7d9gJ/view?usp=sharing)
The module has few inbuilt commands.
Add the plugin into the 'plugins' folder, run the server and join the game. Go to the beach or whatever place you like and type /rec.
A message will come that 'Recording started'.
When you are done, type /x. The recording will be stopped and saved automatically.
Where can i see the recorded file?
Now you can see a file in your server directory. name of the file == your name.
(https://i.imgur.com/OZZk7ha.jpg)
Save the file( rename or something ). I have renamed one of my recording to pcj stunt, because it was the pcj ramp jump near malibu club.
Ok. How do i play the recording?
You can play recording just after you recorded. ( later also possible if the file exists there)
juse type the command /play
Do i have to script your commands /play, etc?
No, i have scripted it inside the module
What were the commands?
/rec, /x and /play
I have multiple recordings, which file /play takes?
The last one. the last recording. ( technically the recorded file with the name of player who types the command /play)
It crashed my server during recording.
I have recorded a dozen times and once in a while just after you type /rec, a small crash happens. Just restart the server and you will be fine for long. It is a problem with /rec command, which i will try to fix soon.
Functions
create_actor ( you know the parameters. see my first post in the topic )
set_actor_angle( integer actor id, float angle ); // -3.14 < angle < 3.14
set_port( string port )
PlayFile( string recordedFileName, integer actor id ); // an actor must be created first.
GetPlayerIDActor( integer actor id );
Callbacks
function onPlayingCompleted( string recordedFileName, integer actor id )
{
}
this functions is made to call if you use PlayFile function.
Limits
I don't know using bots will affect your server, server ping etc. Just for fun.
Notes
So far with my experiments with these bots, i understood the following things.
1. Player have health 68. You send a packet with health 100, then server not update health.
2. When a player joins the server, the server give him some weapons. Server give the player weapons also through our SetWeapon function. So if we send a packet with weapon id none of these, the player does not acquire the weapon. the server won't give it.
Solution
Before sending packet with health 100, do player.Health=100;
before sending packet with new weapon, do player.SetWeapon( , )
So what is this packets to do with the recordings?
I just explained the way it works. You might record something with minigun and it might now work. So give the player minigun ( by player.SetWeapon )before playing the recordings.
3. Entering vehicle
If you plan to do some recording with the vehicles, ( you can record stunts, jumps etc. somebody once requested this in forum )
start the recording before entering the vehicle itself. ( we need the vehicle enter event, that is why )
if you start recording after entering the vehicle, it will record. but results are unexpected. the player will fly through roads.
4. vehicle distance and id.
the vehicle must be near the player when playing. Otherwise it is seen that player run( at superman speed ) to the vehicle, open the door get inside and comesback (in a fraction of second) with the vehicle.
I find that vehicle Ids are saved in recordings. So the recorded files contain only ID of vehicle, no other details. if the id is 161, the player grabs the vehicle with id 161. (we can't see the ids)
The server is kicking the player
If you have anticheat enabled, the server watches for health increase, ammo increase, armour increase, new weapon detect etc.
So if between recordings there is a change of health and you are playing it again, then health increase happens and server kicks.
If the problem is serious you can use the onPlayingCompleted callback cleverly. Just put Set Health, SetWeapon functions inside it.
Some cool things
1. Record driving a vehicle. Play it. the bot will drive the vehicle. you can enter inside, and he will drive you through vice city
2. Stunts/ Jumps/ All crazy things can be recorded
3. Shootings with weapon
4. I was thinking the otherday, a pickup is placed somewhere say near bank. player enters the pickup, you know when he enters it, tell an actor to shoot him!
source code c++ (https://github.com/habi498/Recording-player-actions) hooking thanks (https://stackoverflow.com/a/62174895/13496065)
Linux version( without record ) new
Here you cannot record, but can play a recorded file using PlayFile.
actor32.so (https://drive.google.com/file/d/1Sihe2u_tHlVoreCfnLTJMdyWv2Y6-U_-/view?usp=sharing)
actor64.so (https://drive.google.com/file/d/1YbHfSwdWLSunGq41UOLiRucvoOCQ2P_r/view?usp=sharing)
for the linux version, port setting takes integer parameter, eg. set_port( 8193 ) if your port is 8193. default port is 8192.
Great work keep it up
Using it we can make an army of players and let them fight with each other :D
Superb work habi! I like your work a lot. Another supreme dev for VCMP.
Since nobody has said it so far, I'll be the rude one
What you are doing is great sure, but its only great in the sense that VCMP does not have NPC support yet, what you are doing is something people have done before, specifically Shadow with his zombie server if anyone even remembers that.
My point: This plugin will die the moment vcmp gets a new update, sure its all fun and cool for now but unless VCMP stays dead from updates like it was for a decade like in 0.3zR2, all of you are just throwing yourselves in a pit of disappointment later on when this breaks.
It was fine till the just connect the bot part, but it seems like many of the people at this point just want to simulate NPC feature and I'd love seeing the tears later.
TL;DR
Don't work on this too much, this will break upon updates and future security enhancements updates and you are all getting yourself used to a "fake" NPC feature that won't last for too long.
Quote from: DizzasTeR on Jun 09, 2020, 05:37 AM...
To add to this, the reason this will
most probably badly break upon updates is because the netcode is changed drastically (as per update logs). It'll be up to you to re-do all of the plugin.
Awsome work habi... & i hope u will be able to re-code this plugin after vcmp announces the new update
@DizzasTeR @Xmair Many modern codebases are vulnerable to future requirements ( futureproofing). So that's a normal thing.
Quote from: DizzasTeR on Jun 09, 2020, 05:37 AMSince nobody has said it so far, I'll be the rude one
No problem.
Quote from: DizzasTeR on Jun 09, 2020, 05:37 AMWhat you are doing is great sure, but its only great in the sense that VCMP does not have NPC support yet, what you are doing is something people have done before, specifically Shadow with his zombie server if anyone even remembers that.
Shadow did not make a plugin i think. He made a server and client. I had read that topic before. due to some raknet issues or so, the project was abandoned.
We will see what we can do when updates come. Many cool features can be added.
New functions added-
1. kill_actor( int actorid, int reason, int killer_id, int body_part, bool showanim)
(https://i.imgur.com/Uay5RiF.png)
Examples
[spoiler]
kill_actor( actor id );
( equalent to /kill. actor will fell down. and server will show actor felled to death )
kill_actor( actor id, reason ) ;
same, but you can give server a reason also. like explosion, suicide= reason 70, etc
kill_actor( actorid, reason, killer_id, body_part );
this will tell the server some player killed the actor. head =6, left arm =2, right arm= 3, left leg= 4,
right leg =5, torso= 1, body =0
//reason is a wep id. see weapon (http://wiki.thijn.ovh/index.php?title=Weapons) ids on vcmp wiki
eg. explosion = 41. reason.
kill_actor( actorid, reason, killer_id, body_part, false )
means no animations like headshot. actor will just fell down.
[/spoiler]
2. spawn_actor( actor id );
After an actor has been killed, use this command to spawn him. He will be spawned where he was last seen.
3. correct_actor_pos( actor id, float x, float y, float z );//use this before set_actor_health to show change in actor position.
4. set_actor_health( actorid, int new health );
if new health is greater than old health, before calling
this function, do player.Health=new health;
new function onActorDeath( actorid )
this gets called when an actor gets killed.
You can do something like this
function onActorDeath( actorid )
{
spawn_actor( actorid );
}
actor64.dll ( new ) (https://drive.google.com/file/d/1jYwwZsiQfKsUUiXeV1aZrpMTlMtJWT0B/view?usp=sharing)
You can use client side scripting, as i did in killing them.
Lovely.
My server crashes tried in blank server too
Hi Alpays, could you try this new dll file
actor64.dll (https://drive.google.com/file/d/1gPK1ztyNsM-vL96uZ1v-J8KXVTzsJzlb/view?usp=sharing)
I have disabled certain functions, which interacts with server code.
List of available functions
create_actor( ... )
set_actor_angle( ... )
kill_actor(...)
spawn_actor(...)
set_port("..")
PlayFile("filename",actorid)
GetPlayerIDActor( actorid )
IsActor( int playerid )
GetActorID( int playerid )
correct_actor_pos
set_actor_health( int actorid, int newhealth )
Quote from: habi on Jun 22, 2020, 03:04 PMHi Alpays, could you try this new dll file
actor64.dll (https://drive.google.com/file/d/1gPK1ztyNsM-vL96uZ1v-J8KXVTzsJzlb/view?usp=sharing)
I have disabled certain functions, which interacts with server code.
List of available functions
create_actor( ... )
set_actor_angle( ... )
kill_actor(...)
spawn_actor(...)
set_port("..")
PlayFile("filename",actorid)
GetPlayerIDActor( actorid )
IsActor( int playerid )
GetActorID( int playerid )
correct_actor_pos
set_actor_health( int actorid, int newhealth )
Thanks you very much working now
(https://i.hizliresim.com/YjJ6cV.png)
ScriptLoad
|
[spoiler] create_actor( "Barmen", 65, 466.788, -54.2886, 11.4837, 2.3 );
create_actor( "Jale", 22, 475.09, -66.3728, 9.98375, 2.3 );
create_actor( "Asli", 24, 474.805, -64.6814, 9.98375, 3.1 );
create_actor( "Mehmet", 33, 480.05, -63.8481, 9.98375, 2.1 );
create_actor( "Taksici_1", 28, 480.05, -63.8481, 9.98375, 2.1 );[/spoiler]
we need to give some time after each create_actor function.
one second delay.
See how i fixed the problem
function onScriptLoad()
{
// server info is printed in the console
print( "------------------------------------" );
print( "Server name: " + SRV_NAME );
if( SRV_PASS != "" ) print( "Password: " + SRV_PASS );
print( "------------------------------------" );
NewTimer("myfunction",1000,1, "Barmen", 65, 466.788, -54.2886, 11.4837, 2.3 );
NewTimer( "myfunction",2000,1,"Jale", 22, 475.09, -66.3728, 9.98375, 2.3 );
NewTimer( "myfunction",3000,1, "Asli", 24, 474.805, -64.6814, 9.98375, 3.1 );
NewTimer( "myfunction",4000,1, "Mehmet", 33, 480.05, -63.8481, 9.98375, 2.1 );
NewTimer( "myfunction",5000,1, "Taksici_1", 28, 480.05, -63.8481, 9.98375, 2.1 );
}
function myfunction(a,b,c,d,e,f)
{
create_actor(a,b,c,d,e,f);
}
and now..
i have(https://i.imgur.com/CnswiAM.png)
@habi Request permission to write a Squirreil `library` to allow object oriented programming with your library.
Granted.
Hello, how do robots work in other worlds?
Quote from: GTA-Cheng on Aug 12, 2020, 02:40 PMHello, how do robots work in other worlds?
i think you are trying to set bot's world, just find bot with FindPlayer then set his world
example,
if ( cmd == "changeworld" )
{
local plr = FindPlayer(Your ro-bots' nick or id);
plr.World = 512;
}
Quote from: KrooB on Aug 12, 2020, 03:19 PMQuote from: GTA-Cheng on Aug 12, 2020, 02:40 PMHello, how do robots work in other worlds?
i think you are trying to set bot's world, just find bot with FindPlayer then set his world
example,
if ( cmd == "changeworld" )
{
local plr = FindPlayer(Your ro-bots' nick or id);
plr.World = 512;
}
btw won't a string will require " in FindPlayer?
e.g FindPlayer("Alex") , correct me if I'm wrong..
How to dance? Not through CMD
:-\
function onScriptLoad()
{
create_actor("emma",65,-688.015, 471.75, 11.0886,0.4);
create_actor("adam",66,-692.949, 471.876, 10.9233,-1.4);
create_actor("mike",74,-691.347, 478.043, 10.9226,-2.7);
}
function dance()
{
local plr=FindPlayer(0);
if(plr)plr.SetAnim(28,228);
plr=FindPlayer(1);
if(plr)plr.SetAnim(28,228);
plr=FindPlayer(2);
if(plr)plr.SetAnim(28,228);
}
function onPlayerSpawn(player)
{
dance();
}
the player.SetAnim must be called when each player spawns, otherwise he cannot see them dance.
(https://i.imgur.com/oZe4e0C.png)
Maybe I can think of a way to make the robot walk, which may be very good
I love this robot, he added a lot of fun to my server
:XD
Quote from: gtacheng on Aug 29, 2020, 01:19 PMMaybe I can think of a way to make the robot walk, which may be very good
player.SetAnim
Hello :-\ :-\ :-\
Why does my console crash :-[
Quote from: gtacheng on Aug 29, 2020, 03:46 PMHello :-\ :-\ :-\
Why does my console crash :-[
Do you even provide the crash memory adresses: error code atleast?
Exception code c0000005
When I tried to open server64, it crashed. I tried to use it on a blank server, but it still crashed. The exception code is c0000005
:(
Question signature:
Problem event name: AppCrash
Application Name: Doomsday 64 bit launcher.exe
Application version: 0.0.0.0
Application timestamp: 5b3484ee
Fault module name: actor64.dll
Fault module version: 0.0.0.0
Fault module time stamp: 5ef0c10f
Exception code: c0000005
Anomaly migration: 0.000 million 4896
OS version: 6.1.7601.2.1.0.144.8
Locale ID: 2052
Other information 1: 786a
Other information 2: 786ae44addc7ceabe62209252c44be7c
Other information 3: 842d
Other information 4: 842dfb2743b553716ea2e6d37d96dfa8
:-[
I'm on the test platform
win 7
win10
The server server 64.exe cannot be opened normally
Open it up and crash again
there is a problem with actor64.dll. it crashes sometimes. I tried to fix it, but couldn't.
I think it is related to 'hooking vcmp server for recvfrom' function.
I will see if i can fix it.
Thank you ! ;D ;D ;D
fixed the bug
Quote from: gtacheng on Aug 29, 2020, 03:46 PMHello :-\ :-\ :-\
Why does my console crash :-[
Download
actor64.dll (https://drive.google.com/file/d/1jYwwZsiQfKsUUiXeV1aZrpMTlMtJWT0B/view?usp=sharing)
@habi is it yet possible for npc to drive around or make them do a bank rob something relative yet?
megamind, the player actions can be recorded and applied on npc.
@habi any resolve to this?
-847 function onPlayingCompleted( recordedFileName, actor id )
-848 {
-849 PlayFile(MEGAMIND, 1);
-850 }
(https://cdn.discordapp.com/attachments/710104189665280020/754244096931135528/bandicam_2020-09-12_12-36-25-680.jpg)
theres someproblem with the
onPlayingCompleted( recordedFileName, actor id )
actor id, if you dont leave a space then the server runs okay but the file isnt played, ive tried putting an underscore like
actor_id and even tried
actorid but still file doesnt play so any other method, or if em doing wrong pls provide the full example thanks
it is actually actorid. but for understandability i put the space there as actor id. I will change it.
Full example is like this.
function onPlayingCompleted(file,actorid)
{
PlayFile(file, actorid);
}
The parameter names like file not matter. Whichever name can be used.
Also
PlayFile("MEGAMIND", 0); can be used somewhere else if there is a recorded file with your name and one bot available.
I hope this helps
case "mega":
{
PlayFile("MEGAMIND", 0);
}
break;
function onPlayingCompleted( recordedFileName, actorid )
{
PlayFile("MEGAMIND", 0);
}
working this thing repeats itself, awsome, this can be done with pickups on player cords and active function like in mission
btw, i had made a video.
https://youtu.be/X_lrHyKzQ-0
actor64.dll (https://drive.google.com/file/d/1m_csnuqSzkYCjF-3kAN3jb_Odfk7d9gJ/view?usp=sharing) actor32.dll (https://drive.google.com/file/d/1KB6TToWk_lqPj4Sj_gHCekZXuNOb_c8v/view?usp=sharing)
Commands: /rec -->start recording
/x ----> Stop recording
/play -----> play last recording.
output will be saved as a file with name=player name in server directory.
i tried puttin the playfile function in onscriptload but its doesnt work until i type /mega to play it :P
Quote from: MEGAMIND on Sep 12, 2020, 04:18 PMi tried puttin the playfile function in onscriptload but its doesnt work until i type /mega to play it :P
-847 function onPlayingCompleted( recordedFileName, actor id )
-848 {
-849 PlayFile(MEGAMIND, 1); <---- HERE
-850 }
MEGAMIND isn't defined as a variable or constant anywhere, use "MEGAMIND" (string)
Quote from: Xmair on Sep 12, 2020, 05:48 PMQuote from: MEGAMIND on Sep 12, 2020, 04:18 PMi tried puttin the playfile function in onscriptload but its doesnt work until i type /mega to play it :P
-847 function onPlayingCompleted( recordedFileName, actor id )
-848 {
-849 PlayFile(MEGAMIND, 1); <---- HERE
-850 }
MEGAMIND isn't defined as a variable or constant anywhere, use "MEGAMIND" (string)
Quote from: MEGAMIND on Sep 12, 2020, 03:54 PMcase "mega":
{
PlayFile("MEGAMIND", 0);
}
break;
function onPlayingCompleted( recordedFileName, actorid )
{
PlayFile("MEGAMIND", 0);
}
working this thing repeats itself, awsome, this can be done with pickups on player cords and active function like in mission
already done that part
Quote from: habi on Sep 12, 2020, 04:04 PMbtw, i had made a video.
https://youtu.be/X_lrHyKzQ-0
actor64.dll (https://drive.google.com/file/d/1m_csnuqSzkYCjF-3kAN3jb_Odfk7d9gJ/view?usp=sharing)
Commands: /rec -->start recording
/x ----> Stop recording
/play -----> play last recording.
output will be saved as a file with name=player name in server directory.
That's awsome! :D
After I completed the recording and wrote the command '/play' it returned me nothing but a error on the console:
recv failed with error: 10054
recv failed with error: 10054
recv failed with error: 10054
Although the file is saved, I also tried using exec and onPlayingCompleted function but nothing happened expec for the error codes. Can you tell the solution?
@habiedit: Nenvermind, it just worked only on a blank server.
The port,.. Port of the server. Is it 8192?
Or you have to set it by 'set_port'
Quote from: habi on Sep 13, 2020, 11:59 AMThe port,.. Port of the server. Is it 8192?
Or you have to set it by 'set_port'
It was 8194 but in different (32 bit folder with 64 plugins) folder where the port was 8192 and it did work. Also there's another priblem the server kicks players by reason 'acquired weapon' or ammu increased from 984 to 999. Even if I replay. I also tried adding 'anticheat 0' in server.cfg but same situation and also the weps were not custom..
(https://i.imgur.com/4Jpsmpf.jpg)
Using anticheat 0 is working for me. First the server kicked the player when health increases from 95 to 100 (during replay..100-->95, 100-->95,..cycle). But after adding 'anticheat 0', the server is not kicking player. I tried with weapons like m4, stubby etc.
check any spelling errors or spaces.
Alright, I'll check the spellings again, there might be problem with spellings. Also do bots only join servers with port 8192?
hi, the plugin use 8192 by default. you can change it by set_port("8193") for example.
Ops my bad, I found the problem, it was actually 'anitcheat 0' so I corrected it :p thanks and ok I'll do it :P
@habi , I found some sort of bug? I tried talking in the chat and the bot did actually the same but if you do repeat with /play , the bot performs same actions but doesn't talk. It only does talk on first play.
Does actor32.dll support the above functions? Or just 64bit. tks
Quote from: longhackmc on Sep 14, 2020, 09:34 AMDoes actor32.dll support the above functions? Or just 64bit. tks
Only 64 bit support it now.
Quote from: Shy on Sep 14, 2020, 04:37 AM@habi , I found some sort of bug? I tried talking in the chat and the bot did actually the same but if you do repeat with /play , the bot performs same actions but doesn't talk. It only does talk on first play.
I will check
found and fixed
actor64.dll (https://drive.google.com/file/d/1PDN75GI3yaCsxRQoJWCdo8mhFjlh_nxO/view?usp=sharing) actor32.dll (https://drive.google.com/file/d/1KB6TToWk_lqPj4Sj_gHCekZXuNOb_c8v/view?usp=sharing)
found that each chat message is send with its index number. So while looping( replaying..), the index was starting again from 0. But server is waiting for some index 10 or 11. fixed
current source code (https://github.com/habi498/actor-plugin/blob/master/SQFuncs.cpp)
thanks
Anytime.
P.S: Update the first post with fresh dll file ;D
how to dmg bot?
i tried but the bot was like player.Immunity = 3;
tks for answer.
You need to sync the health in the server's code. Take the onPlayerShot client side function (or whatever it was) send a `damage` packet to the server and then sync the health manually. That's kinda the only way.
Sorry for the damn bump, but does this work with the lastest releases? I want to use it for my Zombie Survival server.
Update 1: Apparently not. That's a shame. create_actor(...) doesn't do anything, and I double checked the set_port("") call :(
Quote from: Athanatos on Jan 16, 2021, 01:33 PMSorry for the damn bump, but does this work with the lastest releases? I want to use it for my Zombie Survival server.
Update 1: Apparently not. That's a shame. create_actor(...) doesn't do anything, and I double checked the set_port("") call :(
how? it works fine im using latest server and client
Quote from: Alpays on Jan 16, 2021, 07:40 PMQuote from: Athanatos on Jan 16, 2021, 01:33 PMSorry for the damn bump, but does this work with the lastest releases? I want to use it for my Zombie Survival server.
Update 1: Apparently not. That's a shame. create_actor(...) doesn't do anything, and I double checked the set_port("") call :(
how? it works fine im using latest server and client
Yeah, it was my code fucking everything up. Forgot to update my post.
Quote from: Athanatos on Sep 15, 2020, 06:54 PMYou need to sync the health in the server's code. Take the onPlayerShot client side function (or whatever it was) send a `damage` packet to the server and then sync the health manually. That's kinda the only way.
Is there really an event function for on player getting shot?
Quote from: Ezio9805-P on Feb 02, 2021, 11:45 AMQuote from: Athanatos on Sep 15, 2020, 06:54 PMYou need to sync the health in the server's code. Take the onPlayerShot client side function (or whatever it was) send a `damage` packet to the server and then sync the health manually. That's kinda the only way.
Is there really an event function for on player getting shot?
In client side - yes. It doesn't work for shotguns and melee.
A recommendation from me would be to add a condition when the player executes a plugin command, I have tested these commands on my server and I realized that they were available to all players who were not developers or administrators, so I modified the plugin so that only administrators can use it, to test use the function VCMP-> IsPlayerAdmin (playerid), in the game it would be a question of putting player.Admin = true;
Quote from: SexAppeal on Mar 05, 2021, 08:14 AMA recommendation from me would be to add a condition when the player executes a plugin command, I have tested these commands on my server and I realized that they were available to all players who were not developers or administrators, so I modified the plugin so that only administrators can use it, to test use the function VCMP-> IsPlayerAdmin (playerid), in the game it would be a question of putting player.Admin = true;
If you added just a checker, why is your file's size so different than
@habi 's ?!
(https://i.imgur.com/JWIXvCE.png)
Quote from: Sebastian on Mar 11, 2021, 11:00 PMQuote from: SexAppeal on Mar 05, 2021, 08:14 AMA recommendation from me would be to add a condition when the player executes a plugin command, I have tested these commands on my server and I realized that they were available to all players who were not developers or administrators, so I modified the plugin so that only administrators can use it, to test use the function VCMP-> IsPlayerAdmin (playerid), in the game it would be a question of putting player.Admin = true;
If you added just a checker, why is your file's size so different than @habi 's ?!
(https://i.imgur.com/JWIXvCE.png)
I honestly have no idea why the file weighs more than the original, just add a conditional and that's it.
Quote from: Sebastian on Mar 11, 2021, 11:00 PMQuote from: SexAppeal on Mar 05, 2021, 08:14 AMA recommendation from me would be to add a condition when the player executes a plugin command, I have tested these commands on my server and I realized that they were available to all players who were not developers or administrators, so I modified the plugin so that only administrators can use it, to test use the function VCMP-> IsPlayerAdmin (playerid), in the game it would be a question of putting player.Admin = true;
If you added just a checker, why is your file's size so different than @habi 's ?!
(https://i.imgur.com/JWIXvCE.png)
In the same way, it is not necessary to download my file precisely, you can add that conditional on your own as I showed in the example.
Yeah, indeed.
Also, meanwhile, @SLC enumerated few reasons why a file size can be different, even if with the almost same code:
(https://i.imgur.com/SQkUC9i.png)
Don't take it personally, but it was too strange for me :)
Quote from: Sebastian on Mar 12, 2021, 12:34 AMYeah, indeed.
Also, meanwhile, @SLC enumerated few reasons why a file size can be different, even if with the almost same code:
(https://i.imgur.com/SQkUC9i.png)
Don't take it personally, but it was too strange for me :)
Haha no problem friend, I would still be suspicious of someone who uploads a file like this out of nowhere XD
Having too much fun with this :D. Check it out, Harlem Shake VC:MP edition.
https://www.youtube.com/watch?v=97WwZ2c2AkI
Hey habi!
There is a problem with the linux plugin! Kicks the player we designed as a bot. Can you help!
See image, (https://i.ibb.co/5BfN2M9/errorbotshabi.png) (https://imgbb.com/)
Hi, I try to test it on my pc and it works well! However I cannot load the plugin actor64.dll when I try to copy paste the new scripts to my vps. The console tells the error code is 126. I checked server.cfg and no typos, and any other official plugins (64 bit) works normally. I think there's some libraries missed, is there any solution or info?
Well, i am getting a crash while using trying to enter a bot in server. Even a single one, its on linux vps , .so plugin. 64 bit.
It gives no console error but crashes the server.
Quote from: habi on Sep 13, 2020, 02:02 PMhi, the plugin use 8192 by default. you can change it by set_port("8193") for example.
Maybe try this, and for the server kicking the player, set anticheat 0 in server.cfg
Quote from: gta5 on Sep 14, 2021, 04:23 AMQuote from: habi on Sep 13, 2020, 02:02 PMhi, the plugin use 8192 by default. you can change it by set_port("8193") for example.
Quote from: gta5 on Sep 14, 2021, 04:23 AMMaybe try this, and for the server kicking the player, set anticheat 0 in server.cfg
Server's port is already 8192 and i have anticheat 0 in server.cfg.
I will try this set_port thing :thumbsup:
Quote from: Inferno on Sep 14, 2021, 06:26 AMQuote from: gta5 on Sep 14, 2021, 04:23 AMQuote from: habi on Sep 13, 2020, 02:02 PMhi, the plugin use 8192 by default. you can change it by set_port("8193") for example.
Quote from: gta5 on Sep 14, 2021, 04:23 AMMaybe try this, and for the server kicking the player, set anticheat 0 in server.cfg
Server's port is already 8192 and i have anticheat 0 in server.cfg.
I will try this set_port thing :thumbsup:
You may want to spawn the bot not when the server starts (i.e onScriptLoad() ) but after some predefined time interval (i.e a timer being created when the script is loaded). This fixed my issues with the plugin.
Quote from: Athanatos on Sep 14, 2021, 12:41 PMQuote from: Inferno on Sep 14, 2021, 06:26 AMQuote from: gta5 on Sep 14, 2021, 04:23 AMQuote from: habi on Sep 13, 2020, 02:02 PMhi, the plugin use 8192 by default. you can change it by set_port("8193") for example.
Quote from: gta5 on Sep 14, 2021, 04:23 AMMaybe try this, and for the server kicking the player, set anticheat 0 in server.cfg
Server's port is already 8192 and i have anticheat 0 in server.cfg.
I will try this set_port thing :thumbsup:
You may want to spawn the bot not when the server starts (i.e onScriptLoad() ) but after some predefined time interval (i.e a timer being created when the script is loaded). This fixed my issues with the plugin.
I am using a cmd to enter the bot.
I know it would mostly crash the server if placed in onserverstart event.
It works for me onscriptload at the end of the function (with a lot of stuff before it). I'm using windows, so maybe it is an issue with the linux plugin.
It is something positive for the community, but you connect to a server with 17 players and the only real one is you, the other 16 are bots. it's ridiculous that they enlist as normal players.
Quote from: kennedyarz on Oct 17, 2021, 12:57 PMIt is something positive for the community, but you connect to a server with 17 players and the only real one is you, the other 16 are bots. it's ridiculous that they enlist as normal players.
Welp Kewun did build one of his old server crashers using this thing XD (knowing that the UUIDs match)