SA-MP Forums Archive
AVS Vehicle issue. - 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: AVS Vehicle issue. (/showthread.php?tid=437533)



AVS Vehicle issue. - OpticKiller - 16.05.2013

hi guys i added this vehicle ownership system into my script but the issue is everytime i make a vehicle and the dealership it does not save when i reset the server. any ideas??

But from what its saying its saved and it creates the files into Dealership in scriptfiles & vehicles . really its not even saving the vehicles even tho it says it
https://sampforum.blast.hk/showthread.php?tid=276887


Re: AVS Vehicle issue. - horsemeat - 16.05.2013

do you have all the required includes at the latest versions


Re: AVS Vehicle issue. - OpticKiller - 16.05.2013

yea it makes the files and stuff .ini files but it does not save the vehicles this only happens when i reset the server


Re: AVS Vehicle issue. - horsemeat - 16.05.2013

try recompiling the script


Re: AVS Vehicle issue. - OpticKiller - 16.05.2013

already done that am going to try and see if it saves on the filterscript.


Re: AVS Vehicle issue. - OpticKiller - 16.05.2013

alright tested it as a filterscript everything works great there is only one thing i cant get is this public filterscriptexit

so okay if i wanted to add this on my gamemode and not as a filterscript were should i add all this


ino is public OnFilterScriptExit() would it be like ongamemodeexit ??
Код:
public OnFilterScriptExit()
{
	KillTimer(maintimer);
	KillTimer(speedotimer);
	KillTimer(savetimer);
	//TextDrawDestroy(SpeedoBox);
	for(new i=0; i < MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i))
		{
			OnPlayerDisconnect(i, 1);
		}
	}
	for(new i=1; i < MAX_DVEHICLES; i++)
	{
		if(VehicleCreated[i])
		{
			DestroyVehicle(VehicleID[i]);
			if(VehicleCreated[i] == VEHICLE_DEALERSHIP)
			{
				Delete3DTextLabel(VehicleLabel[i]);
			}
		}
	}
	for(new i=1; i < MAX_DEALERSHIPS; i++)
	{
		if(DealershipCreated[i])
		{
			Delete3DTextLabel(DealershipLabel[i]);
		}
	}
	for(new i=1; i < MAX_FUEL_STATIONS; i++)
	{
		if(FuelStationCreated[i])
		{
			Delete3DTextLabel(FuelStationLabel[i]);
		}
	}
	print("\n------------------------------------------------");
	print("     Advanced Vehicle System 1.0 Unloaded");
	print("------------------------------------------------\n");
	return 1;
}



Re: AVS Vehicle issue. - horsemeat - 16.05.2013

Quote:
Originally Posted by OpticKiller
Посмотреть сообщение
alright tested it as a filterscript everything works great there is only one thing i cant get is this public filterscriptexit

so okay if i wanted to add this on my gamemode and not as a filterscript were should i add all this


ino is public OnFilterScriptExit() would it be like ongamemodeexit ??
Код:
public OnFilterScriptExit()
{
	KillTimer(maintimer);
	KillTimer(speedotimer);
	KillTimer(savetimer);
	//TextDrawDestroy(SpeedoBox);
	for(new i=0; i < MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i))
		{
			OnPlayerDisconnect(i, 1);
		}
	}
	for(new i=1; i < MAX_DVEHICLES; i++)
	{
		if(VehicleCreated[i])
		{
			DestroyVehicle(VehicleID[i]);
			if(VehicleCreated[i] == VEHICLE_DEALERSHIP)
			{
				Delete3DTextLabel(VehicleLabel[i]);
			}
		}
	}
	for(new i=1; i < MAX_DEALERSHIPS; i++)
	{
		if(DealershipCreated[i])
		{
			Delete3DTextLabel(DealershipLabel[i]);
		}
	}
	for(new i=1; i < MAX_FUEL_STATIONS; i++)
	{
		if(FuelStationCreated[i])
		{
			Delete3DTextLabel(FuelStationLabel[i]);
		}
	}
	print("\n------------------------------------------------");
	print("     Advanced Vehicle System 1.0 Unloaded");
	print("------------------------------------------------\n");
	return 1;
}
yes i think so here so info https://sampwiki.blast.hk/wiki/OnGameModeExit


Re: AVS Vehicle issue. - OpticKiller - 16.05.2013

fixed it pal thanks alot +rep


Re: AVS Vehicle issue. - horsemeat - 16.05.2013

Thanks for the rep I am here to help