[FilterScript] AVS - Advanced Vehicle System
#1

AVS - Advanced Vehicle System
Features
  • Dynamic vehicles - add/edit in-game
  • Ownable vehicles - tune, park, sell to other players, edit license plate
  • Dynamic vehicle dealerships - add/edit in-game
  • Fuel system
  • Dynamic fuel stations - add/edit in-game
  • User-friendly dialogs
  • Full vehicle control - engine, lights, lock, alarm, trunk
  • Vehicle trunk - store weapons (5 slots)
  • Vehicle dashboard - including GPS, health, fuel, engine/alarm/lock status, speedometer (kph or mph)
  • Vehicle mods/paintjob saves
  • Vehicle tracking system - see where your vehicle is on your minimap
Commands

/avshelp - access all the commands available

Player commands:
Code:
/v  /vlock  /fix  /flip  /tow  /eject  /ejectall
/valarm  /fuel  /trunk  /kph  /mph  /clearmods  /sellv  /givecarkeys  /trackcar
Admin commands:
Code:
/addv  /editv  /setfuel  /rac (respawnallcars)  /rtc (respawnthiscar)
/adddealership  /deletedealership  /movedealership  /gotodealership
/addfuelstation  /deletefuelstation  /movefuelstation  /gotofuelstation
Installing

1. Download avs.amx file and put it to your server filterscripts folder
2. Add it to server.cfg

Code:
filterscripts avs
3. Create these folders to scriptfiles

Code:
<server>\scriptfiles\AVS\Vehicles\
<server>\scriptfiles\AVS\Dealerships\
<server>\scriptfiles\AVS\FuelStations\
4. Change the settings in the avs.pwn script (if you want)

pawn Code:
//=========================SETTINGS=========================

#undef MAX_PLAYERS
#define MAX_PLAYERS 100

#define MAX_DVEHICLES 200
#define MAX_DEALERSHIPS 10
#define MAX_FUEL_STATIONS 10

#define VEHICLE_FILE_PATH "AVS/Vehicles/"
#define DEALERSHIP_FILE_PATH "AVS/Dealerships/"
#define FUEL_STATION_FILE_PATH "AVS/FuelStations/"

#define MAX_PLAYER_VEHICLES 3
#define FUEL_PRICE 5
#define GAS_CAN_PRICE 500
#define ALARM_TIME 10000  // alarm duration in milliseconds (1 second = 1000 milliseconds)
#define DEFAULT_NUMBER_PLATE "123 ABC"

//==========================================================
5. Link this FS with your admin system (if you want)

Just add this function to the admin script

pawn Code:
public GetPlayerAVSAdmin(playerid)
{
    return PlayerInfo[playerid][pAdmin];
}
You must use YOUR admin system variable. PlayerInfo[playerid][pAdmin] is just EXAMPLE.

Notes

You need at least SA-MP 0.3c R3 server - https://sampforum.blast.hk/showthread.php?tid=271586

If you want to restart your gamemode (gmx), first unload AVS, restart the gamemode and then load AVS again. Else your vehicles might be bugged.

Common Problems

P: Nothing happens when I click a button in dialog.
S: This is most likely caused by ANOTHER filterscript. Quick fix for it is to remove all other filterscripts from server.cfg and try then. If you want to keep them, you must EDIT OTHER FILTERSCRIPTS and make sure the LAST return in OnDialogResponse is 0.

P: I can drive with engine off.
S: Use ManualVehicleEngineAndLights in your GAMEMODE script - https://sampwiki.blast.hk/wiki/ManualVehicleEngineAndLights

P: I can drive with a dealership vehicle.
S: Admins can drive them, so if you are admin, there is nothing wrong.

P: Server shuts down after adding a vehicle, dealership or fuel station.
S: Make sure you have created the AVS folder inside scriptfiles and also another 3 folders inside AVS (shown above in Installing section step 3)

P: Money doesn't decrease when I buy a vehicle.
S: You are probably using a server-side money for anti-cheat purposes. There is no simple fix for it. You need some scripting knowledge to hook AVS money functions with server-side script.

Credits

****** - sscanf
ZeeX - zcmd

Screenshots

See the attachments

Download

See the attachments
Reply
#2

This is epic! Thank you for this.

Good job.
Reply
#3

OHHH YEAH.
Reply
#4

Nice work you added everything on this vehicle system, its awesome.
I will post here if i will find any bugs, thanks mate.
Reply
#5

pawn Code:
C:\Users\Ashwin\Desktop\SAMP Server\filterscripts\avs.pwn(576) : error 017: undefined symbol "GetPlayerDistanceFromPoint"
C:\Users\Ashwin\Desktop\SAMP Server\filterscripts\avs.pwn(568) : warning 203: symbol is never used: "playerid"
C:\Users\Ashwin\Desktop\SAMP Server\filterscripts\avs.pwn(1311) : error 017: undefined symbol "GetPlayerDistanceFromPoint"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.
Reply
#6

Quote:
Originally Posted by DutchWings
View Post
pawn Code:
C:\Users\Ashwin\Desktop\SAMP Server\filterscripts\avs.pwn(576) : error 017: undefined symbol "GetPlayerDistanceFromPoint"
C:\Users\Ashwin\Desktop\SAMP Server\filterscripts\avs.pwn(568) : warning 203: symbol is never used: "playerid"
C:\Users\Ashwin\Desktop\SAMP Server\filterscripts\avs.pwn(1311) : error 017: undefined symbol "GetPlayerDistanceFromPoint"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.
Download latest SA-MP server

https://sampforum.blast.hk/showthread.php?tid=271586
Reply
#7

Quote:
Originally Posted by MadeMan
View Post
Whoops sorry! Everything is fine now, thanks!
Reply
#8

Sry, but how I use /adddealership and make ownable cars?

Edit: I found it.
10/10, great!
Reply
#9

Pro
Reply
#10

Quote:
Originally Posted by MadeMan
View Post
AVS - Advanced Vehicle System
Features
  • Dynamic vehicles - add/edit in-game
  • Ownable vehicles - tune, park, sell to other players, edit license plate
  • Dynamic vehicle dealerships - add/edit in-game
  • Fuel system
  • Dynamic fuel stations - add/edit in-game
  • User-friendly dialogs
  • Full vehicle control - engine, lights, lock, alarm, trunk
  • Vehicle trunks - store weapons (5 slots)
  • Vehicle dashboard - including GPS, health, fuel, engine/alarm/lock status, speedometer (kph or mph)
  • Vehicle mods/paintjob saves
  • Vehicle tracking system - see where your vehicle is on your radar
Commands

/avshelp - access all the commands available

Player commands:
Code:
/v  /vlock  /fix  /flip  /tow  /eject  /ejectall
/valarm  /fuel  /trunk  /kph  /mph  /clearmods  /sellv  /givecarkeys  /trackcar
Admin commands:
Code:
/addv  /editv  /setfuel  /rac (respawnallcars)  /rtc (respawnthiscar)
/adddealership  /deletedealership  /movedealership  /gotodealership
/addfuelstation  /deletefuelstation  /movefuelstation  /gotofuelstation
Installing

1. Download avs.amx file and put it to your server filterscripts folder
2. Add it to server.cfg

Code:
filterscripts avs
3. Create these folders to scriptfiles

Code:
<server>\scriptfiles\AVS\Vehicles\
<server>\scriptfiles\AVS\Dealerships\
<server>\scriptfiles\AVS\FuelStations\
4. Change the settings in the avs.pwn script (if you want)

pawn Code:
//=========================SETTINGS=========================

#undef MAX_PLAYERS
#define MAX_PLAYERS 100

#define MAX_DVEHICLES 200
#define MAX_DEALERSHIPS 10
#define MAX_FUEL_STATIONS 10

#define VEHICLE_FILE_PATH "AVS/Vehicles/"
#define DEALERSHIP_FILE_PATH "AVS/Dealerships/"
#define FUEL_STATION_FILE_PATH "AVS/FuelStations/"

#define MAX_PLAYER_VEHICLES 3
#define FUEL_PRICE 5
#define GAS_CAN_PRICE 500
#define ALARM_TIME 10000  // alarm duration in milliseconds (1 second = 1000 milliseconds)
#define DEFAULT_NUMBER_PLATE "123 ABC"

//==========================================================
5. Link this FS with your admin system (if you want)

Just add this function to the admin script

pawn Code:
public GetPlayerAVSAdmin(playerid)
{
    return PlayerInfo[playerid][pAdmin];
}
You must use YOUR admin system variable. PlayerInfo[playerid][pAdmin] is just EXAMPLE.

Notes

You need SA-MP 0.3c R3 server - https://sampforum.blast.hk/showthread.php?tid=271586

If you want to restart your gamemode (gmx), first unload AVS, restart the gamemode and then load AVS again. Else your vehicles might be bugged.

Credits

****** - sscanf
ZeeX - zcmd

Screenshots

See the attachments

Download

See the attachments
Oh My God.... Oh My God... Oh My Fucking Gooood! Man, You are my LIFE. Do you know how much i searched it? You are the next ainstain!!!!! Not like all the Scripter noob that saying i have a car ownership do Createvehicle and Ta da your first car in the system you are Genius!!!
(( I know you copied from Next Generation Roleplay))
Reply
#11

Good release. I love these. Thanks.
Reply
#12

Wow thats perfect! 10/10 ! Good work!!
Reply
#13

Awesome thanks!
Reply
#14

Good Job ,Nice Work Men!
Reply
#15

Yey, I love this ^^
Reply
#16

OMGGGGGGGGGGGGGGGGGGGGGGGGGG

ITS THE BEST

THANKS FOR REALESING IT!

sorry for bad EngliSh
Reply
#17

Hey.
How many cars you can have at one time and save it?
Reply
#18

good Job great release
Reply
#19

Quote:
Originally Posted by Hattrick
Посмотреть сообщение
Hey.
How many cars you can have at one time and save it?
You can have up to 3 cars.

EDIT: You can have how many you want by changing the "3" from:
pawn Код:
#define MAX_PLAYER_VEHICLES 3
to your desired number.
Reply
#20

Ok this is my question...

How Do i integrate the Cash system with my gamemode, My script is a GF edit and uses the function "PlayerInfo[playerid][pCash]" to edit a players Money. This way money cannot be hacked...When a player buys a car it uses the basic GivePlayerMoney function and the players money changes for a split second then returns to its previous amount..therefore my cars are free D:
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)