Trouble loading vehicle plates using dini
#1

Hi folks. I know you get pissed off with repeated questions about plates, but I do need help.

I'm using trying to load plates from a file and assign them to players cars. (Im using the dreaded Ravens Roleplay script and players can set plates using /v plate)

No the plate shows on the car after player does /v plate <text> and car respawns. It saves to the relevant file in the scriptfiles folder. When the player respawns, the plate is still there. However, when the server restarts, this info is lost (although it's still showing in the players vehicle folder)

Heres the code:

public LoadCar()
{
new file[26];
for(new idx = 1; idx < sizeof(CarInfo) ; idx++)
{
format(file, sizeof(file),"LARP/Vehicles/%d.ini", idx);
CarInfo[idx][cModel] = dini_Int(file,"Model");
CarInfo[idx][cLocationx] = dini_Float(file,"Location_X");
CarInfo[idx][cLocationy] = dini_Float(file,"Location_Y");
CarInfo[idx][cLocationz] = dini_Float(file,"Location_Z");
CarInfo[idx][cAngle] = dini_Float(file,"Angle");
CarInfo[idx][cColorOne] = dini_Int(file,"Color_1");
CarInfo[idx][cColorTwo] = dini_Int(file,"Color_2");
strmid(CarInfo[idx][cOwner], dini_Get(file,"Owner"), false, strlen(dini_Get(file,"Owner")), 255);
CarInfo[idx][cOwned] = dini_Int(file,"Owned");
strmid(CarInfo[idx][cPlate], dini_Get(file,"Plate"), false, strlen(dini_Get(file,"Plate")), 255);

Everything else loads fine EXCEPT the plate. What am i doing wrong?

Cheers and apologies in advance
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)