Jump to content
  • 0

Problema Culoare vehicule!!!


Flavius88

Question

Buna,am un bug la GM ,nu se poate schimba culoarea :( Ramane numai la culoare alba (orice vehicul).Nici atunci cand o creez nu merge sa apara cum vreau,nici dak proprietarul incearca sa o schimbe nu merge....merge doar la ala unde tunezi masinile dar dupa respawn au iarasi culoarea alba :| Mentionez ca,Clientul, este luat 60% de la clientul lui Darksone!

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

Aici?Si cum ar trebuii sa il pun...? :|

public LoadCar()
{
	new arrCoords[30][64];
	new strFromFile2[256];
	new File: file = fopen("masini.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]);
			CarInfo[idx][cOwned] = strval(arrCoords[10]);
			CarInfo[idx][mod1] = strval(arrCoords[11]);
			CarInfo[idx][mod2] = strval(arrCoords[12]);
			CarInfo[idx][mod3] = strval(arrCoords[13]);
			CarInfo[idx][mod4] = strval(arrCoords[14]);
			CarInfo[idx][mod5] = strval(arrCoords[15]);
			CarInfo[idx][mod6] = strval(arrCoords[16]);
			CarInfo[idx][mod7] = strval(arrCoords[17]);
			CarInfo[idx][mod8] = strval(arrCoords[18]);
			CarInfo[idx][mod9] = strval(arrCoords[19]);
			CarInfo[idx][mod10] = strval(arrCoords[20]);
			CarInfo[idx][mod11] = strval(arrCoords[21]);
			CarInfo[idx][mod12] = strval(arrCoords[22]);
			CarInfo[idx][mod13] = strval(arrCoords[23]);
			CarInfo[idx][mod14] = strval(arrCoords[24]);
			CarInfo[idx][mod15] = strval(arrCoords[25]);
			CarInfo[idx][mod16] = strval(arrCoords[26]);
			CarInfo[idx][mod17] = strval(arrCoords[27]);
			CarInfo[idx][paintjob] = strval(arrCoords[28]);
			LoadComponents(idx);
			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("masini.cfg", io_write);
		}
		else
		{
			file2 = fopen("masini.cfg", io_append);
		}
		fwrite(file2, coordsstring);
		idx++;
		fclose(file2);
	}
	return 1;
}

public settime(playerid)
{
		new string[256],year,month,day,hours,minutes,seconds;
        getdate(year, month, day), gettime(hours, minutes, seconds);
        format(string, sizeof string, "%d/%s%d/%s%d", day, ((month < 10) ? ("0") : ("")), month, (year < 10) ? ("0") : (""), year);
        TextDrawSetString(Date, string);
        format(string, sizeof string, "%s%d:%s%d:%s%d", (hours < 10) ? ("0") : (""), hours, (minutes < 10) ? ("0") : (""), minutes, (seconds < 10) ? ("0") : (""), seconds);
        TextDrawSetString(Time, string);

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.