How to start at certain veh ID
#1

When i use this FS (AVS cardealership etc) https://sampforum.blast.hk/showthread.php?tid=276887

how can i make it so the ID it starts counting from is for example 160.
So you create a vehicle and its ID 160 2nd vehicle is ID 161 etc etc.

Thx in Advance!

Underneath are the first 100 lines.

PHP код:
//==========================================================
//       Advanced Vehicle System version 1.0 by MadeMan
//==========================================================
#define FILTERSCRIPT
#include <a_samp>
//=========================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"
//==========================================================
#define COLOR_BLACK 0x000000FF
#define COLOR_RED 0xEE0000FF
#define COLOR_GREEN 0x00CC00FF
#define COLOR_BLUE 0x0000FFFF
#define COLOR_ORANGE 0xFF6600FF
#define COLOR_YELLOW 0xFFFF00FF
#define COLOR_LIGHTBLUE 0x00FFFFFF
#define COLOR_PURPLE 0xC2A2DAFF
#define COLOR_GREY 0xC0C0C0FF
#define COLOR_WHITE 0xFFFFFFFF
#define VEHICLE_DEALERSHIP 1
#define VEHICLE_PLAYER 2
#define DIALOG_NONE 12345
#define DIALOG_ERROR 12346
#define DIALOG_VEHICLE 500
#define DIALOG_VEHICLE_BUY 501
#define DIALOG_VEHICLE_SELL 502
#define DIALOG_FINDVEHICLE 503
#define DIALOG_TRUNK 504
#define DIALOG_TRUNK_ACTION 505
#define DIALOG_VEHICLE_PLATE 507
#define DIALOG_FUEL 510
#define DIALOG_EDITVEHICLE 606
#define CMD:%1(%2)          \
            
forward cmd_%1(%2); \
            public 
cmd_%1(%2)
#define ShowErrorDialog(%1,%2) ShowPlayerDialog(%1, DIALOG_ERROR, DIALOG_STYLE_MSGBOX, "ERROR", %2, "OK", "")
new maintimer;
new 
speedotimer;
new 
savetimer;
new 
SaveVehicleIndex;
new 
RefuelTime[MAX_PLAYERS];
new 
TrackCar[MAX_PLAYERS];
new 
DialogReturn[MAX_PLAYERS];
new 
Text:SpeedoBox;
new 
Text:SpeedoText[MAX_PLAYERS];
new 
Float:Fuel[MAX_VEHICLES] = {100.0, ...};
new 
VehicleSecurity[MAX_VEHICLES];
new 
VehicleCreated[MAX_DVEHICLES];
new 
VehicleID[MAX_DVEHICLES];
new 
VehicleModel[MAX_DVEHICLES];
new 
Float:VehiclePos[MAX_DVEHICLES][4];
new 
VehicleColor[MAX_DVEHICLES][2];
new 
VehicleInterior[MAX_DVEHICLES];
new 
VehicleWorld[MAX_DVEHICLES];
new 
VehicleOwner[MAX_DVEHICLES][MAX_PLAYER_NAME];
new 
VehicleNumberPlate[MAX_DVEHICLES][16];
new 
VehicleValue[MAX_DVEHICLES];
new 
VehicleTrunk[MAX_DVEHICLES][5][2];
new 
VehicleMods[MAX_DVEHICLES][14];
new 
VehiclePaintjob[MAX_DVEHICLES] = {255, ...};
new 
Text3D:VehicleLabel[MAX_DVEHICLES];
new 
DealershipCreated[MAX_DEALERSHIPS];
new 
Float:DealershipPos[MAX_DEALERSHIPS][3];
new 
Text3D:DealershipLabel[MAX_DEALERSHIPS];
new 
FuelStationCreated[MAX_FUEL_STATIONS];
new 
Float:FuelStationPos[MAX_FUEL_STATIONS][3];
new 
Text3D:FuelStationLabel[MAX_FUEL_STATIONS]; 
Reply
#2

I don't understand what you mean, sorry.
Reply
#3

When you create a vehicle, /addv it will be given ID 1.

I want it to be given ID 160 and counting, So start at 160.

You understand?
Reply
#4

Is there already the code that it creates Vehicle ID 1 after ID 2 and so on..?
Reply
#5

Quote:
Originally Posted by Kostas'
Посмотреть сообщение
Is there already the code that it creates Vehicle ID 1 after ID 2 and so on..?
Not sure what u mean by that, u mean that it does create ID 1 and 2? if so, yes it works ig.
Reply
#6

I mean, is the Advanced Vehicle System version 1.0 by MadeMan already contains a command that it creates ID 1 and then ID 2 ..?
Reply
#7

Quote:
Originally Posted by Kostas'
Посмотреть сообщение
I mean, is the Advanced Vehicle System version 1.0 by MadeMan already contains a command that it creates ID 1 and then ID 2 ..?
ah like that, yeah.

I did /addv etc etc first i got id 1 then id 2 etc etc.
Reply
#8

Just edit it and change the vehicles IDs to that you want!
Reply
#9

Quote:
Originally Posted by Kostas'
Посмотреть сообщение
Just edit it and change the vehicles IDs to that you want!
That wont work..

the cmd is /addv dealerid) modelid) color1) color2) price) it auto created 1 and 2, i cant choose the ID for it.

THats what i want to know how to change in the script that it starts @ 160
Reply
#10

I am not magician to guess. Would you like to show us this code, to change the IDs
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)