Simple problem please help
#21

Please somebody, I will +rep
Reply
#22

Quote:
Originally Posted by friezakinght
Посмотреть сообщение
Hi, I tried making a variable that reads a car value from the file
pawn Код:
new vv = format(file, sizeof(file), VEH_FILE, VehicleInfo[v][vValue]);
The problem is it gives 1 instead of 2000000, please help.
Upload the INI file and show it to us.
Reply
#23

Every vehicle has it's own file, the define:
pawn Код:
#define VEH_FILE "FRICNR/Vehicles/%d.ini"
The .ini vehicle file
Код:
Model = 411
Color1 = 1
Color2 = 0
Price = 2000000
Owner = [AOD]Bogdi
PosX = 1729.681030
PosY = 1856.973999
PosZ = 10.651900
PosA = 1.703299
Plate = FriCNR
PaintJob = 0
Locked = 0
Neons = -1
Fuel = 100
Health = 1000.000000
Mod1 = 0
Mod2 = 0
Mod3 = 0
Mod4 = 0
Mod5 = 0
Mod6 = 0
Mod7 = 0
Mod8 = 0
Mod9 = 0
Mod10 = 0
Mod11 = 0
Mod12 = 0
Value = 2000000
EDIT: I tried using another code but still the value and the price is 0 even though the value and the price is set to 2.000.000 on the vehicle ini file
pawn Код:
new v = GetPlayerVehicleID(playerid);
new vfile[40];
format(vfile, sizeof(vfile), VEH_FILE, v);
INI_Load(vfile, true, playerid);
new smsg[100];
format(smsg, sizeof(smsg), "Vehicle value: %d  | Vehicle Price: %d", VehicleInfo[v][vValue], VehicleInfo[v][vPrice]);
SendClientMessage(playerid, WHITE, smsg);
Reply
#24

Pls help me, I really have to fix this.
Reply
#25

Someone? I will +rep
Reply
#26

For making this you have to understand how YSI_ini works.
Basically, you have to Load the INI file and create a function that 'reads' this file.
Reply
#27

How can I create that function?
Reply
#28

Please help...
Reply
#29

learn basic pawn first
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)