SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts

Reply
 
Thread Tools Display Modes
Old 01/09/2015, 03:06 PM   #1
NaS
High-roller
 
NaS's Avatar
 
Join Date: Mar 2008
Posts: 1,553
Reputation: 457
Default NPC Drivers - Citizen & Fully working Taxi script - (FS-Version)

NPC Drivers (FS Version) v1.2.3 by AIped & NaS



[ame]www.*******.com/watch?v=jXdofiOuCYM[/ame]
(Kind of outdated)

> About

NPC Drivers are NPCs (created with FCNPC), which are driving around San Andreas like the ones you see in Singleplayer.

> Citizen

The crazy citizen just drive around, ignoring everything and everyone trying to stop them. Seriously.

> Taxis

Among the crazy citizen, there are also actual taxis driving around.
If you call one (using /Taxi), a taxi near your position will respond and pick you up.
But if there are no taxis around, you will have to wait.

> Notes

The NPCs still look quite laggy, and there are issues with their movement when they drive up/down steep roads or such.
This cannot be fixed (at least I tested everything I could imagine), it may be a FCNPC or SA-MP bug.

After the start the script needs to calculate new paths for all NPCs, which can take some time. You'll get notified as soon as it has finished.

If you find bugs that I can fix, please post them here. Also every suggestion is welcome!

You may also want to use the JIT Compiler if possible, it reduces the average path calculation time by about 7-10 times, however this may vary for different PCs and settings.

Also note that reloading the FS may lead to a crash, GMX is working well.

> Commands

/Taxi - Calls a taxi

Admin:

/ds [id] - Puts you in the car of a Driver
/DInfo - Prints debug info (containing general info and some data about performance) to the console/server log
/DriverFSExit - Exits and unloads the driver-script - Buggy because kicking many NPCs may lead to a crash - may be fixed with FCNPC 1.7.5+

> Download

Filterscript + Fixed GPS.dat (GitHub): Click!

Make sure to download the GPS.dat too, this Script uses the Parking Lots added in my version. If you do not do this, the FS may not start properly.

> Install

Click on the above link to GitHub and download the contents as ZIP.
Then open the archive and copy the filterscripts and scriptfiles folders into your SA-MP Server directory, after that compile driverfs.pwn.

Also make sure to download the newest versions of the plugins required (see below).

It's important that your maxnpc is adjusted to at least the total amount of Drivers and other NPCs on your server!

> Dependancies

You will need to download the following plugins:

- FCNPC Plugin (Click!)
- GPS Plugin (Click!) - Use the GPS.dat I linked above, it's a fixed version
- Rotations.inc by Nero_3D (Click!)
- ColAndreas Plugin (Click!)

> Changelog

Version 1.2.3
  • Removed dependancy on QuaternionStuff Plugin
  • Now uses Nero_3D's Rotations.inc (see Dependancies)
  • Fixed infinite loop when using /ds
  • Now using ZCMD for commands
  • Works with latest FCNPC Version

Version 1.2.4
  • Works with FCNPC 1.7.*
  • NPCs can now drive bikes (and also lean left/right in turns) - needs some more work though
  • NPCs rotate on all axes now, depending on terrain.
  • Taxi call will now be correctly aborted if the called Taxi gets killed by someone
  • Adjusted path smoothing to be more lightweight. Needs some more tweaking as well.

Version 1.2.2
  • Some small optimizations and bug fixes

Version 1.2.1
  • Added support for FCNPC 1.0.4
  • Added Cops (count as civilains) - They turn on the sirens sometimes to annoy their surroundings
  • Added Skin Arrays for different types (Civ, Cops, Taxis)
  • There is a very rough time measurement now when you choose your destination
  • Fixed stop'n'go (Using proper math instead of buggy distance checks)

Version 1.2
  • General performance improvements
  • Using ColAndreas for more precise rotations - If you need it to be MapAndreas, PM me for a MapAndreas version
  • Using Streamer for its simple and effective Area functions
  • Manually fixed hundreds of nodes
  • Reduction of path lengths (Node distance are now dynamic)
  • Streaming NPC-Movements (NPCs without players around will only calculate very rough movements)
  • NPCs brake when another NPC is in front of them (not yet perfect)

Version 1.1
  • Improved Start- and Endnode calculation
  • Shortened paths on recalculations (Improves performance)
  • Improved speed calculations, speed changes over time (based on steepness/turning angle)
  • Reworked some values (smoothing, paths, ...)

> Credits

AIped - Help, Support, Ideas, Scripting, ...
Gamer_Z - Testing, RouteConnector Plugin, QuaternionStuff Plugin and great help with some math-problems
OrMisicL & ZiGGi - FCNPC Plugin
DeathonaStick - Help with quaternions, testing
Pottus, Slice, Chris42O, uint32 - Greatest plugin of all times - ColAndreas
SA-MP Team - SA-MP

Last edited by NaS; 09/03/2018 at 04:48 PM. Reason: Updated to new FCNPC
NaS is offline   Reply With Quote
Old 01/09/2015, 03:09 PM   #2
Sellize
Gangsta
 
Sellize's Avatar
 
Join Date: Jan 2013
Location: (ง ͠ ͟ل͜ ͡)ง fight me irl
Posts: 902
Reputation: 293
Default Re: NPC Drivers - Citizen & Fully working Taxi script - (FS-Version)

Saw your video, good job mate.
__________________
dead
Sellize is offline   Reply With Quote
Old 01/09/2015, 03:46 PM   #3
Logofero
Huge Clucker
 
Join Date: Sep 2014
Posts: 397
Reputation: 39
Default Re: NPC Drivers - Citizen & Fully working Taxi script - (FS-Version)

Good work.
Create an extended video. It will be interesting to look at moving in city traffic
__________________
My channel
Logofero is offline   Reply With Quote
Old 01/09/2015, 04:17 PM   #4
AIped
Gangsta
 
AIped's Avatar
 
Join Date: Feb 2011
Location: Netherlands
Posts: 781
Reputation: 46
Default Re: NPC Drivers - Citizen & Fully working Taxi script - (FS-Version)

Yea i think its good finaly seeing this released. Looking forward to see other scripters make some good use of this.

Edit: by the way did our include and FCNPC still work well with sa-mp 0.3.7-R2 ?
__________________
Want some traffic?

http://forum.sa-mp.com/showthread.php?t=587634

Last edited by AIped; 01/09/2015 at 04:20 PM. Reason: edit
AIped is offline   Reply With Quote
Old 01/09/2015, 04:23 PM   #5
NaS
High-roller
 
NaS's Avatar
 
Join Date: Mar 2008
Posts: 1,553
Reputation: 457
Default AW: Re: NPC Drivers - Citizen & Fully working Taxi script - (FS-Version)

Quote:
Originally Posted by Sellize View Post
Saw your video, good job mate.
Thanks!

Quote:
Originally Posted by Logofero View Post
Good work.
Create an extended video. It will be interesting to look at moving in city traffic
I'm currently working on a video showing the whole script

Quote:
Originally Posted by AIped View Post
Yea i think its good finaly seeing this released. Looking forward to see other scripters make some good use of this.

Edit: by the way did our include and FCNPC still work well with sa-mp 0.3.7-R2 ?
Seems like I didn't try it with the newest version yet.
I will now and report back.

Edit: It's working without any problems for me.
NaS is offline   Reply With Quote
Old 01/09/2015, 04:28 PM   #6
JustinAn
Huge Clucker
 
JustinAn's Avatar
 
Join Date: Apr 2012
Location: stfu
Posts: 243
Reputation: 28
Default Re: NPC Drivers - Citizen & Fully working Taxi script - (FS-Version)

Amazing...just amazing
__________________
JustinAn is offline   Reply With Quote
Old 01/09/2015, 04:29 PM   #7
AIped
Gangsta
 
AIped's Avatar
 
Join Date: Feb 2011
Location: Netherlands
Posts: 781
Reputation: 46
Default Re: AW: Re: NPC Drivers - Citizen & Fully working Taxi script - (FS-Version)

Quote:
Originally Posted by NaS View Post



Seems like I didn't try it with the newest version yet.
I will now and report back.

Edit: It's working without any problems for me.
Great tellme if you need any help
__________________
Want some traffic?

http://forum.sa-mp.com/showthread.php?t=587634
AIped is offline   Reply With Quote
Old 01/09/2015, 06:06 PM   #8
Zues
Huge Clucker
 
Zues's Avatar
 
Join Date: Mar 2013
Posts: 330
Reputation: 37
Default Re: NPC Drivers - Citizen & Fully working Taxi script - (FS-Version)

Woa!! That's amazing. Good job!
Zues is offline   Reply With Quote
Old 01/09/2015, 06:18 PM   #9
Michael B
High-roller
 
Michael B's Avatar
 
Join Date: Oct 2014
Location: Romania
Posts: 1,179
Reputation: 127
Default Re: NPC Drivers - Citizen & Fully working Taxi script - (FS-Version)

This is one of the best NPCs filterscripts. It's simply amazing! I can realize how much effort you put in it.
__________________
Michael B is offline   Reply With Quote
Old 01/09/2015, 07:09 PM   #10
GustavoSouza
Big Clucker
 
Join Date: May 2015
Posts: 132
Reputation: 10
Default Re: NPC Drivers - Citizen & Fully working Taxi script - (FS-Version)

Aparee this in the log: [16:08:29] [sampgdk:error] Too many callback arguments (at most 32 allowed)
__________________
Copyright (c) 1997-2006, ITB CompuPhase
GustavoSouza is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[FilterScript] tAxI's XVM System (menu version) (Xtreme Vehicle Management) CJay9209 Filterscripts 2 05/08/2017 03:18 PM
command not working fully please help +rep given Crossfire1989 Scripting Help 0 22/01/2013 12:40 AM
Hamachi not fully working Torran Everything and Nothing 5 04/04/2010 10:50 PM
[Help] Not fully working trunk system Diablo1st Help Archive 1 04/06/2009 09:37 PM


All times are GMT. The time now is 02:32 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.