SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 16/05/2013, 01:00 AM   #1
OpticKiller
Banned
 
Join Date: May 2013
Location: N/A
Posts: 524
Reputation: -13
Default AVS Vehicle issue.

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
http://forum.sa-mp.com/showthread.php?t=276887
OpticKiller is offline   Reply With Quote
Old 16/05/2013, 01:09 AM   #2
horsemeat
Huge Clucker
 
Join Date: Mar 2013
Location: London, Ontario, Canada
Posts: 233
Reputation: 7
Default Re: AVS Vehicle issue.

do you have all the required includes at the latest versions
horsemeat is offline   Reply With Quote
Old 16/05/2013, 01:17 AM   #3
OpticKiller
Banned
 
Join Date: May 2013
Location: N/A
Posts: 524
Reputation: -13
Default Re: AVS Vehicle issue.

yea it makes the files and stuff .ini files but it does not save the vehicles this only happens when i reset the server
OpticKiller is offline   Reply With Quote
Old 16/05/2013, 01:24 AM   #4
horsemeat
Huge Clucker
 
Join Date: Mar 2013
Location: London, Ontario, Canada
Posts: 233
Reputation: 7
Default Re: AVS Vehicle issue.

try recompiling the script
horsemeat is offline   Reply With Quote
Old 16/05/2013, 01:30 AM   #5
OpticKiller
Banned
 
Join Date: May 2013
Location: N/A
Posts: 524
Reputation: -13
Default Re: AVS Vehicle issue.

already done that am going to try and see if it saves on the filterscript.
OpticKiller is offline   Reply With Quote
Old 16/05/2013, 01:42 AM   #6
OpticKiller
Banned
 
Join Date: May 2013
Location: N/A
Posts: 524
Reputation: -13
Default Re: AVS Vehicle issue.

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 ??
Code:
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;
}
OpticKiller is offline   Reply With Quote
Old 16/05/2013, 02:15 AM   #7
horsemeat
Huge Clucker
 
Join Date: Mar 2013
Location: London, Ontario, Canada
Posts: 233
Reputation: 7
Default Re: AVS Vehicle issue.

Quote:
Originally Posted by OpticKiller View Post
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 ??
Code:
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 http://wiki.sa-mp.com/wiki/OnGameModeExit
horsemeat is offline   Reply With Quote
Old 16/05/2013, 02:17 AM   #8
OpticKiller
Banned
 
Join Date: May 2013
Location: N/A
Posts: 524
Reputation: -13
Default Re: AVS Vehicle issue.

fixed it pal thanks alot +rep
OpticKiller is offline   Reply With Quote
Old 16/05/2013, 02:20 AM   #9
horsemeat
Huge Clucker
 
Join Date: Mar 2013
Location: London, Ontario, Canada
Posts: 233
Reputation: 7
Default Re: AVS Vehicle issue.

Thanks for the rep I am here to help
horsemeat is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Issue with the vehicle locking system brianvis Scripting Help 1 23/05/2012 08:45 PM
Vehicle health issue HeLiOn_PrImE Scripting Help 4 25/09/2011 06:02 AM
Vehicle id issue BMan17 Scripting Help 2 24/08/2011 11:37 PM
weird vehicle issue killar456 Client Support 1 23/08/2009 10:30 PM
[HELP] Vehicle issue and moneybug killar456 Help Archive 2 17/08/2009 02:46 PM


All times are GMT. The time now is 09:42 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.