create bots with this plugin

Started by habi, May 11, 2020, 12:49 PM

Previous topic - Next topic

gtacheng


habi

#76
fixed the bug
Quote from: gtacheng on Aug 29, 2020, 03:46 PMHello :-\ :-\ :-\
Why does my console crash :-[

Download
actor64.dll

MEGAMIND

@habi is it yet possible for npc to drive around or make them do a bank rob something relative yet?

habi

megamind, the player actions can be recorded and applied on npc.

MEGAMIND

#79
@habi any resolve to this?
-847 function onPlayingCompleted( recordedFileName, actor id )
-848 {
-849 PlayFile(MEGAMIND, 1);
-850 }

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

habi

#80
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

MEGAMIND

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

habi

#82
btw, i had made a video.

https://youtu.be/X_lrHyKzQ-0

actor64.dll           actor32.dll

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.

MEGAMIND

i tried puttin the playfile function in onscriptload but its doesnt work until i type /mega to play it :P

Xmair

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)

Credits to Boystang!

VU Full Member | VCDC 6 Coordinator & Scripter | EG A/D Contributor | Developer of VCCNR | Developer of KTB | Ex-Scripter of EAD

MEGAMIND

#85
Quote from: Xmair on Sep 12, 2020, 05:48 PM
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: 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

SHy^

Quote from: habi on Sep 12, 2020, 04:04 PMbtw, i had made a video.

https://youtu.be/X_lrHyKzQ-0

actor64.dll
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

SHy^

#87
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? @habi

edit: Nenvermind, it just worked only on a blank server.

habi

The port,.. Port of the server. Is it 8192?

Or you have to set it by 'set_port'

SHy^

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..