[FS] /tune (All modifiable vehicles supported) -
NeRoSiS - 07.03.2009
Tune!
So, this is my first release and I figured I would make something kinda useful.
/tune
Using a few functions I made, it will determine whether your car can be modified and what garage. Then it will teleport you to the garage where you can mod your car, once you have modded your car and exited the garage you will automatically be sent to where you used the /tune command.
Please, comment and test, my first release and I don't know whether it's good or bad, all I know is that it's simple and useful.
Download:
http://pastebin.com/f493be4de
If anybody wants to upload it anywhere else feel free to, but I prefer paste bin, I will add links to this topic.
P.S: Many people may just want the following functions.
Код:
if(!IsPlayerInTransfenderVehicle(playerid, vehicleid))
if(!IsPlayerInLocolowVehicle(playerid, vehicleid))
if(!IsPlayerInWAAVehicle(playerid, vehicleid))
Check if the car is modifiable by the garage, WAA=Wheels arch angels.
Heres the functions.
Код:
IsPlayerInTransfenderVehicle(playerid,vehicleid)
{
#define MAX_VALID_TRANSFENDER_VEHICLES 65
new InTransfenderVehicle[MAX_VALID_TRANSFENDER_VEHICLES] =
{
400,401,402,404,405,409,410,411,415,418,419,420,421,422,424,426,436,438,439,
442,445,451,458,466,467,474,475,477,478,479,480,489,491,492,496,500,505,506,
507,516,517,518,527,526,529,533,540,541,542,545,546,547,549,550,551,555,575,
579,580,585,587,589,600,602,603
};
vehicleid = GetPlayerVehicleID(playerid);
if(IsPlayerInVehicle(playerid,vehicleid))
{
for(new i = 0; i < MAX_VALID_TRANSFENDER_VEHICLES; i++)
{
if(GetVehicleModel(vehicleid) == InTransfenderVehicle[i])
{
return 0;
}
}
}
return 1;
}
IsPlayerInLocolowVehicle(playerid,vehicleid)
{
#define MAX_VALID_LOCOLOW_VEHICLES 7
new InLocolowVehicle[MAX_VALID_LOCOLOW_VEHICLES] =
{
412,534,535,536,566,567,576
};
vehicleid = GetPlayerVehicleID(playerid);
if(IsPlayerInVehicle(playerid,vehicleid))
{
for(new i = 0; i < MAX_VALID_LOCOLOW_VEHICLES; i++)
{
if(GetVehicleModel(vehicleid) == InLocolowVehicle[i])
{
return 0;
}
}
}
return 1;
}
IsPlayerInWAAVehicle(playerid,vehicleid)
{
#define MAX_VALID_WAA_VEHICLES 6
new InWAAVehicle[MAX_VALID_WAA_VEHICLES] =
{
558,559,560,561,562,565
};
vehicleid = GetPlayerVehicleID(playerid);
if(IsPlayerInVehicle(playerid,vehicleid))
{
for(new i = 0; i < MAX_VALID_WAA_VEHICLES; i++)
{
if(GetVehicleModel(vehicleid) == InWAAVehicle[i])
{
return 0;
}
}
}
return 1;
}
Thanks alot,
NeRoSiS
Re: [FS] /tune (All modifiable vehicles supported) -
Landon - 07.03.2009
Nice man!
Re: [FS] /tune (All modifiable vehicles supported) -
Weirdosport - 07.03.2009
KillTimer(tune2);
Won't do anything, as when you set timer b you did not use:
tun2 = SetTimer(stuff in here);
Re: [FS] /tune (All modifiable vehicles supported) -
CracK - 07.03.2009
Great! I'll make a checkpoint instead of /tune command
Re: [FS] /tune (All modifiable vehicles supported) -
NeRoSiS - 07.03.2009
Quote:
Originally Posted by Weirdosport
KillTimer(tune2);
Won't do anything, as when you set timer b you did not use:
tun2 = SetTimer(stuff in here);
|
Thanks for pointing that out, surprised I missed it actually, fixed feel free to re-download.
Re: [FS] /tune (All modifiable vehicles supported) -
Weirdosport - 07.03.2009
Quote:
Originally Posted by NeRoSiS
Thanks for pointing that out, surprised I missed it actually, fixed feel free to re-download.
|
Haven't tried it yet, but I am very meticulous about timers so I thought i'd have a look >.>
Re: [FS] /tune (All modifiable vehicles supported) -
Dark_BasS - 07.03.2009
Am..can you tune motrobikes 2?
Re: [FS] /tune (All modifiable vehicles supported) -
Weirdosport - 07.03.2009
Quote:
Originally Posted by *~Dark_BasS~*
Am..can you tune motrobikes 2?
|
I don't know if this script can (or if I'd know how to) but I know for a fact that some modifications can be added to the NRG. Obviously though you can't have things like bumpers though.
Re: [FS] /tune (All modifiable vehicles supported) -
Austin_Lynn - 15.03.2009
I love it
Re: [FS] /tune (All modifiable vehicles supported) -
novsonnet - 08.09.2009
SOME ERRORS
Thanks for the good script!!
But some errors when i apply this on my race mode (not adrenaline )
is there any reason for you to add this commandline --> ? "SetPlayerVirtualWorld(playerid,playerid+1);"
passenger droped at the place when driver type /tune, and loose driver on the map icon
and passenger can't see the driver even if they both teleport to same place, they can't see each others. and even in the map icon.
So i delete the line "SetVirtualWorld" for player and vehicle. and no more that errors again, would it cause any problem?
and another problem is except id "0", from id "1, 2,3,....." dont's come back to their position after they tune the vehicle. they stuck in the tune garage.
if this problem solved, It will be perfect!! would you help me please?
Thanx for read, and sorry my bad english! lol xD