Personal Cars
#1

So we have a system of personal cars I've integrated into GM works with the command buycar but after I buy the car from the "dealership" I want when they enter ownerul into it than someone else to write this vehicle is that of X and you give off the car I looked and in the personalcars file but I found the car created although I bought it may not do well.
Reply
#2

I would like to help you on this, but really, I don't understand what exactly you do want. Do you want a text to appear when someone else enters the car? Or do you want a 3D text on or above the car?

You've used around 70 words for that sentence and only one dot. Maybe it could help to form proper sentences with dots between them. No matter what your english skills are like, a dot after a sentence shouldn't be too much asked.
Reply
#3

So.
I have a place where I can buy personal car with/buycar. command
I want that after you have bought the car with/buycar at that sign when they join another player in the car to pull out and defend a text that's not his car.
Reply
#4

Quote:
Originally Posted by KiLLeR11222
Посмотреть сообщение
So.
I have a place where I can buy personal car with/buycar. command
I want that after you have bought the car with/buycar at that sign when they join another player in the car to pull out and defend a text that's not his car.
so what your asking here is for something if im not mistaken so a user can put his own text on the car?
Reply
#5

I get it this way: When someone enters a car as a driver who does not own this car, there appears a message, telling him that this car is owned by someone else. Right?

In this case, please show us the variable of the car that shows which player is assigned as the owner.
Reply
#6

No. I want that if I buy car X, Y gets in the car to write: the vehicle is of X.

The problem is that this dealership works like this: go to/buycar select checkpoint and give your car and you get in the car.
I did not find any personalcars. cfg player slots created by the cars, I don't know where to look for them.
Reply
#7

Quote:
Originally Posted by KiLLeR11222
Посмотреть сообщение
No. I want that if I buy car X, Y gets in the car to write: the vehicle is of X.

The problem is that this dealership works like this: go to/buycar select checkpoint and give your car and you get in the car.
I did not find any personalcars. cfg player slots created by the cars, I don't know where to look for them.
so wait is this in your filterscripts folder your talking?
Reply
#8

The system is integrated into GM dealership, not filescript.
Reply
#9

Show us the script where it saves the cars otherwise we won't be able to help you further as it might be in a MYSQL file if u use MYSQL.
Reply
#10

Код:
/*----------Car Save Functions----------*/

PUBLIC: LoadCar()
{
	new arrCoords[31][64];
	new strFromFile2[256];
	new File: file = fopen("personalcars.cfg", io_read);
	if (file)
	{
		new idx = carsonserver;
		while (idx < sizeof(CarInfo))
		{
			fread(file, strFromFile2);
			split(strFromFile2, arrCoords, ',');
			CarInfo[idx][cModel] = strval(arrCoords[0]);
			CarInfo[idx][cLocationx] = floatstr(arrCoords[1]);
			CarInfo[idx][cLocationy] = floatstr(arrCoords[2]);
			CarInfo[idx][cLocationz] = floatstr(arrCoords[3]);
			CarInfo[idx][cAngle] = floatstr(arrCoords[4]);
			CarInfo[idx][cColorOne] = strval(arrCoords[5]);
			CarInfo[idx][cColorTwo] = strval(arrCoords[6]);
			strmid(CarInfo[idx][cOwner], arrCoords[7], 0, strlen(arrCoords[7]), 255);
			strmid(CarInfo[idx][cDescription], arrCoords[8], 0, strlen(arrCoords[8]), 255);
			CarInfo[idx][cValue] = strval(arrCoords[9]);
			strmid(CarInfo[idx][cLicense], arrCoords[10], 0, strlen(arrCoords[10]), 255);
			CarInfo[idx][cOwned] = strval(arrCoords[11]);
			CarInfo[idx][cLock] = strval(arrCoords[12]);
			CarInfo[idx][mod1] = strval(arrCoords[13]);
			CarInfo[idx][mod2] = strval(arrCoords[14]);
			CarInfo[idx][mod3] = strval(arrCoords[15]);
			CarInfo[idx][mod4] = strval(arrCoords[16]);
			CarInfo[idx][mod5] = strval(arrCoords[17]);
			CarInfo[idx][mod6] = strval(arrCoords[18]);
			CarInfo[idx][mod7] = strval(arrCoords[19]);
			CarInfo[idx][mod8] = strval(arrCoords[20]);
			CarInfo[idx][mod9] = strval(arrCoords[21]);
			CarInfo[idx][mod10] = strval(arrCoords[22]);
			CarInfo[idx][mod11] = strval(arrCoords[23]);
			CarInfo[idx][mod12] = strval(arrCoords[24]);
			CarInfo[idx][mod13] = strval(arrCoords[25]);
			CarInfo[idx][mod14] = strval(arrCoords[26]);
			CarInfo[idx][mod15] = strval(arrCoords[27]);
			CarInfo[idx][mod16] = strval(arrCoords[28]);
			CarInfo[idx][mod17] = strval(arrCoords[29]);
			CarInfo[idx][paintjob] = strval(arrCoords[30]);
			printf("CarInfo: %d Owner:%s LicensePlate %s",idx,CarInfo[idx][cOwner],CarInfo[idx][cLicense]);
			idx++;
		}
	}
	return 1;
}

PUBLIC: SaveCarCoords()
{
	new idx;
	new File: file2;
	while (idx < sizeof(CarInfo))
	{
	    new coordsstring[256];
	    format(coordsstring, sizeof(coordsstring), "%d|%f|%f|%f|%f|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d\n",
		CarInfo[idx][cModel],
		CarInfo[idx][cLocationx],
		CarInfo[idx][cLocationy],
		CarInfo[idx][cLocationz],
		CarInfo[idx][cAngle],
		CarInfo[idx][cColorOne],
		CarInfo[idx][cColorTwo],
		CarInfo[idx][mod1],
		CarInfo[idx][mod2],
		CarInfo[idx][mod3],
		CarInfo[idx][mod4],
		CarInfo[idx][mod5],
		CarInfo[idx][mod6],
		CarInfo[idx][mod7],
		CarInfo[idx][mod8],
		CarInfo[idx][mod9],
		CarInfo[idx][mod10],
		CarInfo[idx][mod11],
		CarInfo[idx][mod12],
		CarInfo[idx][mod13],
		CarInfo[idx][mod14],
		CarInfo[idx][mod15],
		CarInfo[idx][mod16],
		CarInfo[idx][mod17],
		CarInfo[idx][paintjob]);
		if(idx == carsonserver)
		{
			file2 = fopen("personalcars.cfg", io_write);
		}
		else
		{
			file2 = fopen("personalcars.cfg", io_append);
		}
		fwrite(file2, coordsstring);
		idx++;
		fclose(file2);
	}
	return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)