[Pomoc] Tablice na auto


Započeo kim3205, Oktobar 28, 2015, 13:18:42 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim:BE by Jakisic
Detaljan opis problema:Kad kucam na server /v tablice tamo gde treba tj na toj lokaciji i da stavim ime nista ne pise niti se desava evo vam pawno sve vezano za tablice a nigde dialog dole?
Dio skripte:
#define DIALOG_TABLICE 3880

enum cInfo
{
	cModel,
	Float:cLocationx,
	Float:cLocationy,
	Float:cLocationz,
	Float:cAngle,
	cColorOne,
	cColorTwo,
	cOwner[MAX_PLAYER_NAME],
	cDescription[MAX_PLAYER_NAME],
	cValue,
	cTablice[128],
	cRegistration,
	cOwned,
	cLock,
};


public LoadCar()
{
	new arrCoords[27][64];
	new strFromFile2[512];
	new File: file = fopen("cfg/cars.cfg", io_read);
	if (file)
	{
	   // trenutnovehova = 0;
		new idx = 334;
		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][cTablice], arrCoords[10], 0, strlen(arrCoords[10]), 255);
			CarInfo[idx][cOwned] = strval(arrCoords[11]);
			CarInfo[idx][cLock] = strval(arrCoords[12]);
			printf("CarInfo: %d Owner:%s Tablice %s",idx,CarInfo[idx][cOwner],CarInfo[idx][cTablice]);
			idx++;
		//	trenutnovehova++;
		}
	}
	return 1;
}

while (idx < sizeof(CarInfo))
	{
		new coordsstring[512];
		format(coordsstring, sizeof(coordsstring), "%d,%f,%f,%f,%f,%d,%d,%s,%s,%d,%s,%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][cOwner],//
		CarInfo[idx][cDescription],//
		CarInfo[idx][cValue],//
		CarInfo[idx][cTablice],//
		CarInfo[idx][cOwned],//
		CarInfo[idx][cLock]);

		if(idx == 334)
		{
			file2 = fopen("cfg/cars.cfg", io_write);
		}
		else
		{
			file2 = fopen("cfg/cars.cfg", io_append);
		}
		fwrite(file2, coordsstring);
		idx++;
		fclose(file2);
	}
	return 1;
}

if(dialogid == DIALOG_VEHINFO)
		{
		if(response)
		{
		if(listitem == 0)
		{
		if(500 > JBC_GetPlayerMoney(playerid)) return SCM(playerid, SIVA, "   Nemate novca !");
		JBC_GivePlayerMoney(playerid, -500);
		JBC_RepairVehicle(GetPlayerVehicleID(playerid));
        JBC_SetVehicleHealth(GetPlayerVehicleID(playerid), 1000.0);
        SendClientMessage(playerid, COLOR_GREY, "   Vozilo je popravljeno !");
		ShowPlayerDialog(playerid,DIALOG_TABLICE,DIALOG_STYLE_INPUT,"VEHINFO","Upisite zeljeno\nime tablice:","OK","EXIT");
		}

        else if(strcmp(x_nr,"tablice",true) == 0) 
	        {
            new length = strlen(cmdtext);
			while ((idx < length) && (cmdtext[idx] <= ' '))
			{
				idx++;
			}
			new offset = idx;
			new result[64];
			while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
			{
				result[idx - offset] = cmdtext[idx];
				idx++;
			}
			result[idx - offset] = EOS;
			if(!strlen(result))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "{0B83E6}[{FFFFFF}AG:RP{0B83E6}]{FFFFFF} CMD | {FFFFFF}/v tablice [tablice]");
				return 1;
			}
				//if(2000 > JBC_GetPlayerMoney(playerid)) return SCM(playerid, SIVA, "   Nemas 2 k !");
				if(!IsPlayerInRangeOfPoint(playerid, 5, 1297.6108,-1875.2379,14.6003)) return SCM(playerid, SIVA, "Niste u servisu pored Taxi-a!");
	            new vehid;
				if(GetPlayerVehicleID(playerid) == PI[playerid][pPcarkey]) { vehid = PI[playerid][pPcarkey]; }
				else if(GetPlayerVehicleID(playerid) == PI[playerid][pPcarkey2]) { vehid = PI[playerid][pPcarkey2]; }
				else if(GetPlayerVehicleID(playerid) == PI[playerid][pPcarkey3]) { vehid = PI[playerid][pPcarkey3]; }
				else { return 1; }

				if(IsPlayerInVehicle(playerid, vehid))
	        	{
	        	for(new c = 0; c < MAX_VEHICLES; c++)
	            {
	        	//strmid(CarInfo[c][cLicense], result, 0, strlen(result), 255);
	        	SetVehicleNumberPlate(vehid, result);
				SacuvajIgraca(playerid);
				//format(string,sizeof(string),"Postavili ste tablice,one ce nestati nakon restarta servera!  Tablice:%s",result);
				//SCM(playerid, SIVA, string);
				//JBC_GivePlayerMoney(playerid, -2000);
				}
				}
	        	else
	        	{
	            	SendClientMessage(playerid, COLOR_GREY,"Niste u svom vozilu.");
	            	return 1;
	        	}
	        	return 1;
	        }


To je to!
Neke slike/video za lakse dobivanje pomoci(neobavezno)://

i am king!

Probaj da uradis /v park nakon toga,nesecam se kako sta sam tu cackao davno je to bilo :D

Citat: Jakisic poslato Oktobar 28, 2015, 17:02:44 POSLE PODNE
Probaj da uradis /v park nakon toga,nesecam se kako sta sam tu cackao davno je to bilo :D

Ma dzabe nista se ne desava

i am king!

Nisi postavio ocitavanje dialoga na       ispod     
else if(strcmp(x_nr,"tablice",true) == 0)



Probaj pa javi ;)

Citat: [UP] Nixi_Montana poslato Oktobar 28, 2015, 20:38:22 POSLE PODNE
Nisi postavio ocitavanje dialoga na       ispod     
else if(strcmp(x_nr,"tablice",true) == 0)



Probaj pa javi ;)

Ma nista se ne desava

i am king!

The vehicle must be re-spawned or re-streamed for the changes to take effect.




Progress doesn't come from early risers — progress is made by lazy men looking for easier ways to do things. - Robert A. Heinlein

Citat: Vodka Play poslato Oktobar 28, 2015, 21:54:19 POSLE PODNE
The vehicle must be re-spawned or re-streamed for the changes to take effect.

Ma probao sam i to nece pa nece sve sam probao i park i sve i rac i rtc ma nist

i am king!

-Nadam se da ce ti ova FS  pomoc !  8)

http://forum.sa-mp.com/showthread.php?t=383090
Poslednja Izmena: Oktobar 28, 2015, 23:08:39 POSLE PODNE od United Extreme RolePlay

My PC:
# Procesor: AMD FX-8350 (8 x 4,0 GHz)
# Matična ploča: Asus M5A78M-M LX3
# Memorija: Kingston Fury 8 GB 1600 MHz
# Hard disk: Seagate / WD 500 GB
# Grafička kartica: GTX750-Ti 2 GB GDDR5
# Windows 8.1 64-Bit

Citat: United Extreme RolePlay poslato Oktobar 28, 2015, 23:07:11 POSLE PODNE
-Nadam se da ce ti ova FS  pomoc !  8)

http://forum.sa-mp.com/showthread.php?t=383090


Ne pomaze ni to :(

i am king!