SA-MP Forums Archive
cars dont save - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: cars dont save (/showthread.php?tid=218357)



cars dont save - THE_KNOWN - 30.01.2011

this is my dealership veh code. after the player buys it wont save:

Код:
if(dialogid==25)
	    {
	    if(response)
	        {
	        new string[128],name[MAX_PLAYERS];
	        GetPlayerName(playerid, name, sizeof(name));
			Money[playerid] = GetPlayerMoney(playerid);
			if(Money[playerid]<300000) return SendClientMessage(playerid, red, "You dont have enough money.");
 			tvid[playerid] = CreateVehicle(515,659.2692,1850.1108,6.4836,170.6889,13,88, -1);
			PutPlayerInVehicle(playerid, tvid[playerid], 0);
			tmdl[playerid]=GetVehicleModel(tvid[playerid]);
  			format(string, sizeof(string), "INSERT INTO vehs (ID,Name,Model,col1,col2) VALUES (%d,'%s',%d,0,1)", tvid[playerid], name, tmdl[playerid]);
  			mysql_query(string);
  			owner[vid]=GetPlayerName(playerid,name,sizeof(name));
			}
		else
		    {
		    SendClientMessage(playerid, red, "See you next time");
		    }
		}
the dialog pops up when the player gets into that dealer veh