SA-MP Forums Archive
Getdate with 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)
+--- Thread: Getdate with save (/showthread.php?tid=552305)



Getdate with save - ilepopivanov - 23.12.2014

http://prntscr.com/5k6r9s I made this. I get the date at OnGameModeInit http://prntscr.com/5k6s3v and this under includes http://prntscr.com/5k6sgn..
When I use the public it doesnt save the date.. Year is still 0, Month is 0 and Day is 0.. How to fix this..
Is this problem? http://prntscr.com/5k6t11

Код:
public Registrira(playerid)
{
	new vehicleid = GetPlayerVehicleID(playerid);
	new i = ConvertVehIDtoDYID(vehicleid);
	MyVehicle[i][MyVehReg] = 1;
	SCMF(playerid, -1, "{00FFFF}(DWIG){FF5300}Uspesno go registriravte vaseto vozilo.Vasite novi tablicki se %d", MyVehicle[i][MyVehPlate]);
 	TogglePlayerControllable(playerid,1);
  	ZemiPlayerMoneyIle(playerid,100000);
  	MyVehicle[i][MyVehRegG] = Godina;
  	MyVehicle[i][MyVehRegM] = Mesec+1;
  	MyVehicle[i][MyVehRegD] = Den;
  	UpdateMyVehSystem(i);

}
This is under OnVehicleSpawn \/
Код:
	if(ConvertVehIDtoDYID(vehicleid) != -1)
 	{
		ChangeVehicleColor(vehicleid, MyVehicle[ConvertVehIDtoDYID(vehicleid)][MyVehCol][0], MyVehicle[ConvertVehIDtoDYID(vehicleid)][MyVehCol][1]);
	 	SetTimerEx("PravilenSpeedo", 100, false, "i", vehicleid);
		new i = ConvertVehIDtoDYID(vehicleid);
		if(Godina == MyVehicle[i][MyVehRegG] && Mesec == MyVehicle[i][MyVehRegM] && Den == MyVehicle[i][MyVehRegD])
		{
			MyVehicle[i][MyVehReg] = 0;
		    MyVehicle[i][MyVehRegG] = 0;
      		MyVehicle[i][MyVehRegM] = 0;
		    MyVehicle[i][MyVehRegD] = 0;
			UpdateMyVehSystem(i);
		}
	}
But this is under 'OnVehicleSpawn' I check in file before respawn the vehicle.. Check after Respawn the vehicle.. Still not working

HELP PLEASE!!!!!!