[FilterScript] NPC Drivers - Citizen & Fully working Taxi script - (FS-Version)
#81

Quote:
Originally Posted by NaS
View Post
If you get the NPC exitting/reentering working I'd appreciate if you could PM me the code, that would speed things up a bit If you want to, of course.
I definitely will!
Reply
#82

Quote:
Originally Posted by hydewhyd
View Post
Yes the cars are try to moving.
The parking of these vehicles on this path is strange...
Were they parking on the street (the Police Cars)?

For the other pic, I will make it so Parking Lots are only occupied by one Driver at one time, after adding enough lots and fixing some existing ones.
And of course a define to completely disable that, expect that tomorrow I guess (+ Bikes).
Reply
#83

Quote:
Originally Posted by NaS
View Post
Were they parking on the street (the Police Cars)?
Police cars were driving, sometimes they collide causing this problem.
Reply
#84

Quote:
Originally Posted by NaS
View Post
Maybe we will continue the Peds after this, can't promise that though.
Once I have a better understanding how to correctly (and cleanly) reset bots on death so that they go back to their routine...I would be more than happy to work on a pedestrian system with you if you'd like. I'll have plenty of time in the weekday evenings next week (wife on business trip, its either this or smoke pot all night and hang out with the dog).

I've started drawing this out a few days ago anyways, as I planned on making a ped system using the driverfs script anyways. In a nutshell, I would work on them exiting/re-entering vehicles cleanly, then work on them resetting correctly after death, and once the basic look+feel of the peds are polished...THEN work on their AI behavior based on player conditions. I'd like to use an efficient OnStreamIn/Out routine that unloads the pedestrians in areas where no players are around, to try and reduce any lag experienced on the client-side.

I planned on customizing it so that you can set a percentage of bots to be overtly dick-heads to players (attack on sight), some that only get angry when provoked, and some who simply run/drive away. The anger levels would be customizable from a couple "potshots" from bots, all the way up to "hunt you down until you die", and specific aggro levels from "break off after 30 seconds" to "follow the player to the ends of the earth", and bots in 'gang' areas of the map would be much more prone to attacking than ones in the countryside or suburbs.

For ambiance Im throwing in random animations and pedestrian sound clips for the on-foot bots, and a selection of "are you fucking wtih me" type quotes for the bots that players piss off.

Anyways that was my plan for the FS on my server, so if you think I can help you out in any way, definitely let me know
Reply
#85

Quote:
Originally Posted by kaisersouse
View Post
Once I have a better understanding how to correctly (and cleanly) reset bots on death so that they go back to their routine...I would be more than happy to work on a pedestrian system with you if you'd like. I'll have plenty of time in the weekday evenings next week (wife on business trip, its either this or smoke pot all night and hang out with the dog).

I've started drawing this out a few days ago anyways, as I planned on making a ped system using the driverfs script anyways. In a nutshell, I would work on them exiting/re-entering vehicles cleanly, then work on them resetting correctly after death, and once the basic look+feel of the peds are polished...THEN work on their AI behavior based on player conditions. I'd like to use an efficient OnStreamIn/Out routine that unloads the pedestrians in areas where no players are around, to try and reduce any lag experienced on the client-side.

I planned on customizing it so that you can set a percentage of bots to be overtly dick-heads to players (attack on sight), some that only get angry when provoked, and some who simply run/drive away. The anger levels would be customizable from a couple "potshots" from bots, all the way up to "hunt you down until you die", and specific aggro levels from "break off after 30 seconds" to "follow the player to the ends of the earth", and bots in 'gang' areas of the map would be much more prone to attacking than ones in the countryside or suburbs.

For ambiance Im throwing in random animations and pedestrian sound clips for the on-foot bots, and a selection of "are you fucking wtih me" type quotes for the bots that players piss off.

Anyways that was my plan for the FS on my server, so if you think I can help you out in any way, definitely let me know
Sure we can work on a Ped script together, however I doubt the driverfs is good to use for peds.
Almost everything is based on vehicle stuff.
I'd put the vehicle driving functions into an include and then use the inc in the Ped FS.
So if a Ped enters a vehicle (or spawns in one), the driving would be handled by the include or basing on new callbacks for the FS to use. And once they exit they are in Ped mode, controlled by the FS again.
Furthermore I have code for working Ped movement (with ColAndreas and literally everywhere) in another FS, so combining those will be hard enough.

Proper respawning is not a problem, working on my current version, I'll update it later.
Reply
#86

to make things smoother you could do that player choose destination when called taxi, and then do calculations for route, you'll achieve instant start and where to place start point so vehicle is in right angle

btw - decent job
Reply
#87

Quote:
Originally Posted by $Marco$
What happens if the taxi hits a player/NPC vehicle? does it react to the impact or just ignore it and keep driving like to the destination?

Do NPC vehicles "see" player vehicles and try to avoid hitting them?
They only react to other Drivers so far (brake to the speed of the NPC in front, avoid "getting stuck inside each other" and also build traffic jams pretty well).
Our plan is to add reactions to Players too in the next version when the driving itself is working well.

Quote:
Originally Posted by PT
I find an bug if you destroy NPC car the NPC bugs and dont "respawn". He just keeps death on his death pos..
Re-spawning is already added in the next version, when I fixed some problems with the new path calculations I'll upload it.
Also FCNPC 1.0.5 has some issues with shooting I believe, the server sometimes crashes if you shoot an NPC. However I guess that will be fixed soon.
Reply
#88

Never mind.
Reply
#89

Can someone pass me a whole folder with everything installed?
Reply
#90

problem driverfs.pwn(376) : warning 209: function "fcnpc0_OnGameModeInit" should return a value
Reply
#91

Quote:
Originally Posted by langit
Посмотреть сообщение
problem driverfs.pwn(376) : warning 209: function "fcnpc0_OnGameModeInit" should return a value
return 1; at the end.
Reply
#92

Quote:
Originally Posted by Astralis
Посмотреть сообщение
return 1; at the end.
after I add return 1;
i got:

PHP код:
SA-MP Dedicated Server
----------------------
v0.3.7-R2, (C)2005-2015 SA-MP Team
[22:02:41
[
22:02:41Server Plugins
[22:02:41] --------------
[
22:02:41]  Loading pluginsscanf
[22:02:41
[
22:02:41]  ===============================
[
22:02:41]       sscanf plugin loaded.     
[
22:02:41]          Version:  2.8.2        
[22:02:41]    (c2012 Alex "Y_Less" Cole  
[22:02:41]  ===============================
[
22:02:41]   Loaded.
[
22:02:41]  Loading plugincrashdetect
[22:02:41]   CrashDetect v4.18.1 is OK.
[
22:02:41]   Loaded.
[
22:02:41]  Loading pluginstreamer
[22:02:41
*** 
Streamer Plugin v2.9.1 by Incognito loaded ***
[
22:02:41]   Loaded.
[
22:02:41]  Loading pluginFCNPC
[22:02:41
[
22:02:41] -------------------------------------------------
[
22:02:41]      FCNPC Fully Controllable NPC v1.7.6
[22:02:41]          Windows SA-MP 0.3.7 R2
[22:02:41]           Oct  7 2017 at 15:33:28
[22:02:41
[
22:02:41]   Author:       OrMisicL (2013 2015)
[
22:02:41]   Continued byziggi (2016 present)
[
22:02:41]   Contributorskurta999Neutralneu
[22:02:41] -------------------------------------------------
[
22:02:41
[
22:02:41Loading...
[
22:02:41]   Loaded.
[
22:02:41]  Loading pluginRouteConnectorPlugin
[22:02:42]   Loaded.
[
22:02:42]  Loading pluginQuaternionStuff
[22:02:42]   Loaded.
[
22:02:42]  Loading pluginMapAndreas
[22:02:42]   Loaded.
[
22:02:42]  Loading pluginmysql
[22:02:42]  >> plugin.mysqlR39-6 successfully loaded.
[
22:02:42]   Loaded.
[
22:02:42]  Loading pluginWhirlpool
[22:02:42]  
[
22:02:42]  ==================
[
22:02:42]  
[
22:02:42]   Whirlpool loaded
[22:02:42]  
[
22:02:42]  ==================
[
22:02:42]  
[
22:02:42]   Loaded.
[
22:02:42]  Loading pluginnativechecker
[22:02:42]   Loaded.
[
22:02:42]  Loading pluginColAndreas
[22:02:42] *********************
[
22:02:42] ** Created By:     **
[
22:02:42] ** [uL]Chris42O    **
[
22:02:42] ** [uL]Slice       **
[
22:02:42] ** [uL]Pottus      **
[
22:02:42] *********************
[
22:02:49Loaded collision data.
[
22:02:49] *********************
[
22:02:49]   ColAndreas Loaded
[22:02:49]    v1.4.0
[22:02:49] *********************
[
22:02:49]   Loaded.
[
22:02:49]  Loading pluginsocket
[22:02:49]  Socket plugin v0.2b loaded.
[
22:02:49]   Loaded.
[
22:02:49]  Loaded 12 plugins.
[
22:02:50
[
22:02:50Filterscripts
[22:02:50] ---------------
[
22:02:50]   Loading filterscript 'zone2.amx'...
[
22:02:55]   Loading filterscript 'driverfs.amx'...
[
22:02:56]    Error: Function not registered'CA_DestroyObject'
[22:02:56]    Error: Function not registered'CA_RayCastLine'
[22:03:38] [connection127.0.0.1:50058 requests connection cookie
Reply
#93

Quote:
Originally Posted by langit
Посмотреть сообщение
after I add return 1;
i got:

PHP код:
SA-MP Dedicated Server
----------------------
v0.3.7-R2, (C)2005-2015 SA-MP Team
[22:02:41
[
22:02:41Server Plugins
[22:02:41] --------------
[
22:02:41]  Loading pluginsscanf
[22:02:41
[
22:02:41]  ===============================
[
22:02:41]       sscanf plugin loaded.     
[
22:02:41]          Version:  2.8.2        
[22:02:41]    (c2012 Alex "Y_Less" Cole  
[22:02:41]  ===============================
[
22:02:41]   Loaded.
[
22:02:41]  Loading plugincrashdetect
[22:02:41]   CrashDetect v4.18.1 is OK.
[
22:02:41]   Loaded.
[
22:02:41]  Loading pluginstreamer
[22:02:41
*** 
Streamer Plugin v2.9.1 by Incognito loaded ***
[
22:02:41]   Loaded.
[
22:02:41]  Loading pluginFCNPC
[22:02:41
[
22:02:41] -------------------------------------------------
[
22:02:41]      FCNPC Fully Controllable NPC v1.7.6
[22:02:41]          Windows SA-MP 0.3.7 R2
[22:02:41]           Oct  7 2017 at 15:33:28
[22:02:41
[
22:02:41]   Author:       OrMisicL (2013 2015)
[
22:02:41]   Continued byziggi (2016 present)
[
22:02:41]   Contributorskurta999Neutralneu
[22:02:41] -------------------------------------------------
[
22:02:41
[
22:02:41Loading...
[
22:02:41]   Loaded.
[
22:02:41]  Loading pluginRouteConnectorPlugin
[22:02:42]   Loaded.
[
22:02:42]  Loading pluginQuaternionStuff
[22:02:42]   Loaded.
[
22:02:42]  Loading pluginMapAndreas
[22:02:42]   Loaded.
[
22:02:42]  Loading pluginmysql
[22:02:42]  >> plugin.mysqlR39-6 successfully loaded.
[
22:02:42]   Loaded.
[
22:02:42]  Loading pluginWhirlpool
[22:02:42]  
[
22:02:42]  ==================
[
22:02:42]  
[
22:02:42]   Whirlpool loaded
[22:02:42]  
[
22:02:42]  ==================
[
22:02:42]  
[
22:02:42]   Loaded.
[
22:02:42]  Loading pluginnativechecker
[22:02:42]   Loaded.
[
22:02:42]  Loading pluginColAndreas
[22:02:42] *********************
[
22:02:42] ** Created By:     **
[
22:02:42] ** [uL]Chris42O    **
[
22:02:42] ** [uL]Slice       **
[
22:02:42] ** [uL]Pottus      **
[
22:02:42] *********************
[
22:02:49Loaded collision data.
[
22:02:49] *********************
[
22:02:49]   ColAndreas Loaded
[22:02:49]    v1.4.0
[22:02:49] *********************
[
22:02:49]   Loaded.
[
22:02:49]  Loading pluginsocket
[22:02:49]  Socket plugin v0.2b loaded.
[
22:02:49]   Loaded.
[
22:02:49]  Loaded 12 plugins.
[
22:02:50
[
22:02:50Filterscripts
[22:02:50] ---------------
[
22:02:50]   Loading filterscript 'zone2.amx'...
[
22:02:55]   Loading filterscript 'driverfs.amx'...
[
22:02:56]    Error: Function not registered'CA_DestroyObject'
[22:02:56]    Error: Function not registered'CA_RayCastLine'
[22:03:38] [connection127.0.0.1:50058 requests connection cookie
ColAndreas was loaded successfully, maybe the Include version is different from the Plugin version (try to redownload and replace both your .dll/.so and the .inc).
Reply
#94

Quote:
Originally Posted by NaS
Посмотреть сообщение
ColAndreas was loaded successfully, maybe the Include version is different from the Plugin version (try to redownload and replace both your .dll/.so and the .inc).
where i can get include file
Reply
#95

Quote:
Originally Posted by langit
Посмотреть сообщение
where i can get include file
https://sampforum.blast.hk/showthread.php?tid=586068
Reply
#96

All fine, but.
Quote:

Loaded.
Loading plugin: nativechecker
Loaded.
Loaded 10 plugins.


Started server on port: 7777, with maxplayers: 1000 lanmode is ON.


Filterscripts
---------------
Loading filterscript 'driverfs.amx'...

Dont load the gamemode or filterscript, any help?
Reply
#97

Quote:
Originally Posted by GabrielBas
Посмотреть сообщение
All fine, but.

Dont load the gamemode or filterscript, any help?
Do you have all neccessary Plugins (successfully) loaded and also the GPS.dat from the repository? If you don't have that gps.dat the FS will probably enter an infinite loop.
Reply
#98

Quote:
Originally Posted by NaS
Посмотреть сообщение
Do you have all neccessary Plugins (successfully) loaded and also the GPS.dat from the repository? If you don't have that gps.dat the FS will probably enter an infinite loop.
Of course yes, i have this plugins in my server load
plugins crashdetect ColAndreas FCNPC QuaternionStuff streamer sscanf mysql RouteConnectorPlugin Whirlpool nativechecker
maxplayers are 1000
and maxnpc are 400

and, your GPS.dat...
Reply
#99

Quote:
Originally Posted by GabrielBas
Посмотреть сообщение
Of course yes, i have this plugins in my server load
plugins crashdetect ColAndreas FCNPC QuaternionStuff streamer sscanf mysql RouteConnectorPlugin Whirlpool nativechecker
maxplayers are 1000
and maxnpc are 400

and, your GPS.dat...
Did crashdetect detect any errors?

You might want to try an older FCNPC Version (just to see if it works). I didn't update the Driver script for a while, the FCNPC version back then was 1.0.5

https://github.com/ziggi/FCNPC/releases/tag/v1.0.5

The newer versions are obviously better, but I cannot remember if I had to fix something for it to work.

If it works with this version, I will see what's causing it and fix it.
I'm currently working on a new version which is a lot faster, so I don't think it's worth it updating the old one, unless it's broken.
Reply

Quote:
Originally Posted by NaS
Посмотреть сообщение
Did crashdetect detect any errors?

You might want to try an older FCNPC Version (just to see if it works). I didn't update the Driver script for a while, the FCNPC version back then was 1.0.5

https://github.com/ziggi/FCNPC/releases/tag/v1.0.5

The newer versions are obviously better, but I cannot remember if I had to fix something for it to work.

If it works with this version, I will see what's causing it and fix it.
I'm currently working on a new version which is a lot faster, so I don't think it's worth it updating the old one, unless it's broken.
Yes, thx for the FCNPC, but now i have this error

Код:
[npc:join] DRIVER000 has joined the server (999:127.0.0.1)
[pause] DRIVER000 (id: 999) has paused
[debug] Run time error 5: "Invalid memory access"
[debug] AMX backtrace:
[debug] #0 000001cc in ?? () from driverfs.amx
[debug] #1 00000620 in public OnFilterScriptInit () from driverfs.amx
  Filterscript 'driverfs.amx' loaded.
psd: thanks for your time and help!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)