create bots with this plugin

gtacheng

  • Newbie
  • Posts: 28

habi

  • Sr. Member
  • Posts: 285

MEGAMIND

  • Hero Member
  • Developer of Webnet Official
  • Posts: 787

habi

  • Sr. Member
  • Posts: 285

MEGAMIND

  • Hero Member
  • Developer of Webnet Official
  • Posts: 787
Re: create bots with this plugin
« Reply #79,  »Last edited
@habi any resolve to this?
Code: [Select]
-847 function onPlayingCompleted( recordedFileName, actor id )
-848 {
-849 PlayFile(MEGAMIND, 1);
-850 }

theres someproblem with the
Code: [Select]
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

  • Sr. Member
  • Posts: 285
Re: create bots with this plugin
« Reply #80,  »Last edited
it is actually actorid. but for understandability i put the space there as actor id. I will change it.
Full example is like this.
Code: [Select]
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

  • Hero Member
  • Developer of Webnet Official
  • Posts: 787
Re: create bots with this plugin
« Reply #81,  »
Code: [Select]
case "mega":
{
PlayFile("MEGAMIND", 0);
}
        break;
Code: [Select]
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

  • Sr. Member
  • Posts: 285

MEGAMIND

  • Hero Member
  • Developer of Webnet Official
  • Posts: 787
Re: create bots with this plugin
« Reply #83,  »
i tried puttin the playfile function in onscriptload but its doesnt work until i type /mega to play it :P

Xmair

  • Wiki Contributor
  • Posts: 930
Re: create bots with this plugin
« Reply #84,  »
Quote from MEGAMIND on September 12th, 05:18 PM
i tried puttin the playfile function in onscriptload but its doesnt work until i type /mega to play it :P
Code: [Select]
-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)
VU Full Member | VCCNR Developer | KTB Developer | EAD Ex-Scripter

MEGAMIND

  • Hero Member
  • Developer of Webnet Official
  • Posts: 787
Re: create bots with this plugin
« Reply #85,  »Last edited
Quote from Xmair on September 12th, 06:48 PM
Quote from MEGAMIND on September 12th, 05:18 PM
i tried puttin the playfile function in onscriptload but its doesnt work until i type /mega to play it :P
Code: [Select]
-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 September 12th, 04:54 PM
Code: [Select]
case "mega":
{
PlayFile("MEGAMIND", 0);
}
        break;
Code: [Select]
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^

  • Jr. Member
  • Don't dare to mess
  • Posts: 87
Re: create bots with this plugin
« Reply #87,  »Last edited
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

  • Sr. Member
  • Posts: 285
Re: create bots with this plugin
« Reply #88,  »
The port,.. Port of the server. Is it 8192?

Or you have to set it by 'set_port'

SHy^

  • Jr. Member
  • Don't dare to mess
  • Posts: 87
Re: create bots with this plugin
« Reply #89,  »
Quote from habi on September 13th, 12:59 PM
The 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..