Problem saving vehicle damage
#1

Hi. I'm trying to save the damage on faction vehicles but instead of "0000" or "0101" this is what I'm getting on my .ini files:

"Doors0 = 33554432"

This is my code for saving:

Код:
new panel, door, light, tire;
GetVehicleDamageStatus(FactionInfo[i][Veh][veh], panel, door, light, tire);
FactionInfo[i][DmgPanel][veh] = panel;
FactionInfo[i][DmgDoors][veh] = door;
FactionInfo[i][DmgLights][veh] = light;
FactionInfo[i][DmgTires][veh] = tire;

format(str8, sizeof(str1), "Panels%d", veh);
format(str9, sizeof(str1), "Doors%d", veh);
format(str10, sizeof(str1), "Lights%d", veh);
format(str11, sizeof(str1), "Tires%d", veh);

INI_WriteInt(File,str8, FactionInfo[i][DmgPanel][veh]);
INI_WriteInt(File,str9, FactionInfo[i][DmgDoors][veh]);
INI_WriteInt(File,str10, FactionInfo[i][DmgLights][veh]);
INI_WriteInt(File,str11, FactionInfo[i][DmgTires][veh]);
I've seen only one other topic with similar problems but they didn't have a solution for it.
Anyone knows what could be going wrong?
Reply
#2

Bump. Anyone?
Reply
#3

Use INI_WriteFloat, and make it float in enum as well.
Reply
#4

Gave me two warnings:
Код:
warning 213: tag mismatch
warning 213: tag mismatch
The lines are:
Код:
FactionInfo[i][DmgDoors][veh] = door;
FactionInfo[i][DmgTires][veh] = tire;
I changed them to float in enum and used INI_WriteFloat.

it's not working.
Reply
#5

sry about that shit.. use integer instead of float.

and you can use something like this..
PHP код:
GetVehicleDamageStatus(FactionInfo[i][Veh][veh], FactionInfo[i][DmgPanel][veh], FactionInfo[i][DmgDoors][veh], FactionInfo[i][DmgLights][veh], FactionInfo[i][DmgTires][veh]); 
witch .ini system do you use?
Reply
#6

Used it but still got this in my .ini:
Код:
Doors6 = 50331648
And the visual damage still isn't saved.

I'm using Yini.
Reply
#7

Bump! Anyone?
Reply
#8

Anyone, please?
I have no idea how to get these values to save properly.
I tried to use "encode_" stuff found on another topic (https://sampforum.blast.hk/showthread.php?tid=358351) but still no success.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)