Jump to content
  • 0

Problema dealership


MrAndyAdv

Question

Problema intalnita (descriere): Cand un player isi cumpara o masina din dealrship nu se salveaza cand da /v
Ero(area / rile) / warning-(ul / urile): -
Liniile de cod / sursa / script-ul(obligatoriu): Imi spuneti voi ca sa va dau.
Imagini / Video (optional): -
Ati incercat sa rezolvati singur?: Da ! si cu ajutorul lui DaDeric. 

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0

 

CMD:v(playerid, params[], help)
{
	new szMessage[1024];
	new param4[124],param69[124],param59[124],param70[124], param90[124];
	if(PlayerInfo[playerid][CarKey1] != 0)
	{
		new spawntext[24];
		new m = despawntime1[playerid] / 60;
		new s = despawntime1[playerid] - m*60;
		new idd = PlayerInfo[playerid][CarKey1];
		if(CarInfo[idd][Spawned] > 0)
		{
			format(spawntext, sizeof(spawntext), "{33cc33}Spawnata(%02d:%02d)", m, s);
		}
		else
		{
			spawntext = "{ff0000}Despawnata";
		}
		format(param4, sizeof(param4), "{ffffff}1.\t%s\t%s", vehName[CarInfo[idd][cModel]-400], spawntext);
	}
	else
	{
		param4 = "1.\t{ffff00}Empty";
	}
	if(PlayerInfo[playerid][CarKey2] != 0)
	{
		new spawntext[24];
		new m = despawntime2[playerid] / 60;
		new s = despawntime2[playerid] - m*60;
		new idd = PlayerInfo[playerid][CarKey2];
		if(CarInfo[idd][Spawned] > 0) {format(spawntext, sizeof(spawntext), "{33cc33}Spawnata(%02d:%02d)", m, s);}
		else {spawntext = "{ff0000}Despawnata";}
		format(param69, sizeof(param4), "{ffffff}2.\t%s\t%s", vehName[CarInfo[idd][cModel]-400], spawntext);
	}
	else
	{
		param69 = "2.\t{ffff00}Empty";
	}
	if(PlayerInfo[playerid][CarKey3] != 0)
	{
		new spawntext[24];
		new m = despawntime3[playerid] / 60;
		new s = despawntime3[playerid] - m*60;
		new idd = PlayerInfo[playerid][CarKey3];
		if(CarInfo[idd][Spawned] > 0) {format(spawntext, sizeof(spawntext), "{33cc33}Spawnata(%02d:%02d)", m, s);}
		else {spawntext = "{ff0000}Despawnata";}
		format(param59, sizeof(param59), "{ffffff}3.\t%s\t%s", vehName[CarInfo[idd][cModel]-400], spawntext);
	}
	else
	{
		param59 = "3.\t{ffff00}Empty";
	}
	if(PlayerInfo[playerid][CarKey4] != 0)
	{
		new spawntext[24];
		new m = despawntime4[playerid] / 60;
		new s = despawntime4[playerid] - m*60;
		new idd = PlayerInfo[playerid][CarKey4];
		if(CarInfo[idd][Spawned] > 0) {format(spawntext, sizeof(spawntext), "{33cc33}Spawnata(%02d:%02d)", m, s);}
		else {spawntext = "{ff0000}Despawnata";}
		format(param70, sizeof(param70), "{ffffff}4.\t%s\t%s", vehName[CarInfo[idd][cModel]-400], spawntext);
	}
	else
	{
		param70 = "4.\t{ffff00}Empty";
	}
	if(PlayerInfo[playerid][CarKey5] != 0)
	{
		new spawntext[24];
		new m = despawntime5[playerid] / 60;
		new s = despawntime5[playerid] - m*60;
		new idd = PlayerInfo[playerid][CarKey5];
		if(CarInfo[idd][Spawned] > 0) {format(spawntext, sizeof(spawntext), "{33cc33}Spawnata(%02d:%02d)", m, s);}
		else {spawntext = "{ff0000}Despawnata";}
		format(param90, sizeof(param90), "{ffffff}5.\t%s\t%s", vehName[CarInfo[idd][cModel]-400], spawntext);
	}
	else
	{
		param90 = "5.\t{ffff00}Empty";
	}
	format(szMessage, sizeof(szMessage), "Slot\tModel\tStatus\n%s\n%s\n%s\n%s\n%s\n",param4,param69,param59,param70, param90);
	ShowPlayerDialog(playerid, DIALOG_CARTOOLS, DIALOG_STYLE_TABLIST_HEADERS, "Vehicles", szMessage, "Spawn", "Cancel");
	return 1;
}

Si adica "inserteaza" te rog mai pe limba incepatorilor..

Link to comment
Share on other sites

  • 0
3 hours ago, MrAndy said:

 


CMD:v(playerid, params[], help)
{
	new szMessage[1024];
	new param4[124],param69[124],param59[124],param70[124], param90[124];
	if(PlayerInfo[playerid][CarKey1] != 0)
	{
		new spawntext[24];
		new m = despawntime1[playerid] / 60;
		new s = despawntime1[playerid] - m*60;
		new idd = PlayerInfo[playerid][CarKey1];
		if(CarInfo[idd][Spawned] > 0)
		{
			format(spawntext, sizeof(spawntext), "{33cc33}Spawnata(%02d:%02d)", m, s);
		}
		else
		{
			spawntext = "{ff0000}Despawnata";
		}
		format(param4, sizeof(param4), "{ffffff}1.\t%s\t%s", vehName[CarInfo[idd][cModel]-400], spawntext);
	}
	else
	{
		param4 = "1.\t{ffff00}Empty";
	}
	if(PlayerInfo[playerid][CarKey2] != 0)
	{
		new spawntext[24];
		new m = despawntime2[playerid] / 60;
		new s = despawntime2[playerid] - m*60;
		new idd = PlayerInfo[playerid][CarKey2];
		if(CarInfo[idd][Spawned] > 0) {format(spawntext, sizeof(spawntext), "{33cc33}Spawnata(%02d:%02d)", m, s);}
		else {spawntext = "{ff0000}Despawnata";}
		format(param69, sizeof(param4), "{ffffff}2.\t%s\t%s", vehName[CarInfo[idd][cModel]-400], spawntext);
	}
	else
	{
		param69 = "2.\t{ffff00}Empty";
	}
	if(PlayerInfo[playerid][CarKey3] != 0)
	{
		new spawntext[24];
		new m = despawntime3[playerid] / 60;
		new s = despawntime3[playerid] - m*60;
		new idd = PlayerInfo[playerid][CarKey3];
		if(CarInfo[idd][Spawned] > 0) {format(spawntext, sizeof(spawntext), "{33cc33}Spawnata(%02d:%02d)", m, s);}
		else {spawntext = "{ff0000}Despawnata";}
		format(param59, sizeof(param59), "{ffffff}3.\t%s\t%s", vehName[CarInfo[idd][cModel]-400], spawntext);
	}
	else
	{
		param59 = "3.\t{ffff00}Empty";
	}
	if(PlayerInfo[playerid][CarKey4] != 0)
	{
		new spawntext[24];
		new m = despawntime4[playerid] / 60;
		new s = despawntime4[playerid] - m*60;
		new idd = PlayerInfo[playerid][CarKey4];
		if(CarInfo[idd][Spawned] > 0) {format(spawntext, sizeof(spawntext), "{33cc33}Spawnata(%02d:%02d)", m, s);}
		else {spawntext = "{ff0000}Despawnata";}
		format(param70, sizeof(param70), "{ffffff}4.\t%s\t%s", vehName[CarInfo[idd][cModel]-400], spawntext);
	}
	else
	{
		param70 = "4.\t{ffff00}Empty";
	}
	if(PlayerInfo[playerid][CarKey5] != 0)
	{
		new spawntext[24];
		new m = despawntime5[playerid] / 60;
		new s = despawntime5[playerid] - m*60;
		new idd = PlayerInfo[playerid][CarKey5];
		if(CarInfo[idd][Spawned] > 0) {format(spawntext, sizeof(spawntext), "{33cc33}Spawnata(%02d:%02d)", m, s);}
		else {spawntext = "{ff0000}Despawnata";}
		format(param90, sizeof(param90), "{ffffff}5.\t%s\t%s", vehName[CarInfo[idd][cModel]-400], spawntext);
	}
	else
	{
		param90 = "5.\t{ffff00}Empty";
	}
	format(szMessage, sizeof(szMessage), "Slot\tModel\tStatus\n%s\n%s\n%s\n%s\n%s\n",param4,param69,param59,param70, param90);
	ShowPlayerDialog(playerid, DIALOG_CARTOOLS, DIALOG_STYLE_TABLIST_HEADERS, "Vehicles", szMessage, "Spawn", "Cancel");
	return 1;
}

Si adica "inserteaza" te rog mai pe limba incepatorilor..

E gm kropex, caută Dsbuy textdrawl si o sa dai si de inserția mașinilor și arată.ne

**********************************

Servicii Scripting de calitate:

*********************************

Future Project: ExpertGame

*********************************

Link to comment
Share on other sites

  • 0
mysql_format(handle, string, sizeof(string),"INSERT INTO cars (ID, Model) VALUES (%d, %d)",  idd, CarInfo[idd][cModel]);
			mysql_tquery(handle, string, "", "");
			mysql_format(handle, string, sizeof(string), "UPDATE cars SET Locationx='%f' WHERE ID=%d", CarInfo[idd][cLocationx], idd);
			mysql_tquery(handle, string, "", "");
			mysql_format(handle, string, sizeof(string), "UPDATE cars SET Locationy='%f' WHERE ID=%d", CarInfo[idd][cLocationy], idd);
			mysql_tquery(handle, string, "", "");
			mysql_format(handle, string, sizeof(string), "UPDATE cars SET Locationz='%f' WHERE ID=%d", CarInfo[idd][cLocationz], idd);
			mysql_tquery(handle, string, "", "");
			mysql_format(handle, string, sizeof(string), "UPDATE cars SET Angle='%f' WHERE ID=%d", CarInfo[idd][cAngle], idd);
			mysql_tquery(handle, string, "", "");
			mysql_format(handle, string, sizeof(string), "UPDATE cars SET ColorOne='%d' WHERE ID=%d", CarInfo[idd][cColorOne], idd);
			mysql_tquery(handle, string, "", "");
			mysql_format(handle, string, sizeof(string), "UPDATE cars SET ColorTwo='%d' WHERE ID=%d", CarInfo[idd][cColorTwo], idd);
			mysql_tquery(handle, string, "", "");
			mysql_format(handle, string, sizeof(string), "UPDATE cars SET Owner='%s' WHERE ID=%d", CarInfo[idd][cOwner], idd);
			mysql_tquery(handle, string, "", "");
			mysql_format(handle, string, sizeof(string), "UPDATE cars SET Value='%d' WHERE ID=%d", CarInfo[idd][cValue], idd);
			mysql_tquery(handle, string, "", "");
			mysql_format(handle, string, sizeof(string), "UPDATE cars SET License='%s' WHERE ID=%d", CarInfo[idd][cLicense], idd);
			mysql_tquery(handle, string, "", "");
			mysql_format(handle, string, sizeof(string), "UPDATE cars SET Alarm='%d' WHERE ID=%d", CarInfo[idd][cAlarm], idd);
			mysql_tquery(handle, string, "", "");
			mysql_format(handle, string, sizeof(string), "UPDATE cars SET Lockk='%d' WHERE ID=%d", CarInfo[idd][cLock], idd);
			mysql_tquery(handle, string, "", "");
			mysql_format(handle, string, sizeof(string), "UPDATE cars SET Userid='%d' WHERE ID=%d", PlayerInfo[playerid][pSQLID], idd);
			mysql_tquery(handle, string, "", "");

Done ( credca astea sunt) 

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.