[FilterScript] [FS] Car Tuning Menu v. 1.1 Mod by Rsts [Lucas] Updated Link
#19

I love the script, but had to make some changes before I'd run it on my server. The way the script checks modelid is a little insane:

Код:
    if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 562 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 565 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 559 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 561 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 560 ||
		GetVehicleModel(GetPlayerVehicleID(playerid)) == 575 ||

etc so forth
To make things easier on the server, I put this:

Код:
public OnPlayerStateChange(playerid, newstate, oldstate) {
	if(newstate == PLAYER_STATE_DRIVER) {
	  pvehicleid[playerid] = GetPlayerVehicleID(playerid);
	  pmodelid[playerid] = GetVehicleModel(pvehicleid[playerid]);
	}
	else {
	  pvehicleid[playerid] = 0;
	  pmodelid[playerid] = 0;
	}
	return 1;
}
then changed the modelid check routine:

Код:
	switch(pmodelid[playerid]) {
    case 562,565,559,561,560,575,534,567,536,535,576,411,579,602,496,518,527,589,597,419,
and changed ALL of the other GetVehicleModel(GetPlayerVehicleID(playerid)) to a simple pmodelid[playerid]. This made the response time visibly better (to me anyways).

I cleaned up SOME of the indentation and added supporting code for the changes made above, as well as tweaked some spelling/grammar. I also noticed the Slamvan doesn't register as a Locos Low vehicle, even though it should. That fix is up to you

Version with my edits: http://madoshi.net/samp/kaiser_tuningcar.pwn


I am not responsible for the forum raping the indentation posted...
Reply


Messages In This Thread
[FS] Car Tuning Menu v. 1.1 Mod by Rsts [Lucas] Updated Link - by caki - 08.01.2008, 23:02
Re: Car Tuning Menu v. 1.0 Mod by Rsts [Lucas] - by Alejandro - 08.01.2008, 23:17
Re: Car Tuning Menu v. 1.0 Mod by Rsts [Lucas] - by ray8995 - 08.01.2008, 23:20
Re: Car Tuning Menu v. 1.0 Mod by Rsts [Lucas] - by [MW]JuGGz - 08.01.2008, 23:22
Re: Car Tuning Menu v. 1.0 Mod by Rsts [Lucas] - by Paduche - 09.01.2008, 10:42
Re: Car Tuning Menu v. 1.0 Mod by Rsts [Lucas] - by Tornado - 09.01.2008, 10:47
Re: Car Tuning Menu v. 1.0 Mod by Rsts [Lucas] - by kaisersouse - 09.01.2008, 11:14
Re: Car Tuning Menu v. 1.0 Mod by Rsts [Lucas] - by aleksandra - 09.01.2008, 11:54
Re: Car Tuning Menu v. 1.0 Mod by Rsts [Lucas] - by Fire17 - 09.01.2008, 12:07
Re: [FS] Car Tuning Menu v. 1.0 Mod by Rsts [Lucas] - by russo666 - 09.01.2008, 19:04
Re: [FS] Car Tuning Menu v. 1.0 Mod by Rsts [Lucas] - by caki - 09.01.2008, 23:55
Re: [FS] Car Tuning Menu v. 1.0 Mod by Rsts [Lucas] - by caki - 10.01.2008, 00:11
Re: [FS] Car Tuning Menu v. 1.0 Mod by Rsts [Lucas] - by jake08 - 10.01.2008, 06:37
Re: [FS] Car Tuning Menu v. 1.0 Mod by Rsts [Lucas] - by caki - 10.01.2008, 10:15
Re: [FS] Car Tuning Menu v. 1.0 Mod by Rsts [Lucas] - by jake08 - 10.01.2008, 17:56
Re: [FS] Car Tuning Menu v. 1.0 Mod by Rsts [Lucas] - by caki - 12.01.2008, 05:33
Re: [FS] Car Tuning Menu v. 1.0 Mod by Rsts [Lucas] - by caki - 12.01.2008, 17:45
Re: [FS] Car Tuning Menu v. 1.0 Mod by Rsts [Lucas] - by caki - 13.01.2008, 08:11
Re: [FS] Car Tuning Menu v. 1.0 Mod by Rsts [Lucas] - by kaisersouse - 12.04.2008, 01:00
Re: Car Tuning Menu v. 1.0 Mod by Rsts [Lucas] - by [aKa]sEnZaTzIE - 06.05.2011, 03:35

Forum Jump:


Users browsing this thread: 1 Guest(s)