26.05.2012, 16:09
(
Последний раз редактировалось niels44; 27.05.2012 в 14:24.
)
hey guys,
today i was tuning cars and i had to tune about 50 cars, and i had after tuning about 15 cars i had a hughe amount of code, so i thought, there MUST be a easier and faster way to tune cars
so i decided to make this small include for it:
it has all the tuner cars(sultan, elegy, jester, etc.....) and i think all the lowriders(slamvan, blade, remington, etc...)
im not sure if it has all lowriders but i think it has
so ok to the point:
to use this include:
as you can see in the include there are several functions made for this, like TuneSultan and TuneElegy and TuneSlamvan etc...
also you can see it is with vehicleid params
so like: TuneSultan(vehicleid)
vehicleid means the id of the vehicle you wanna tune,
so for example
you have a sultan and wanna tune it
before this include you had to go to this page:https://sampwiki.blast.hk/wiki/Car_Components
and search every single component and add it 1 by 1 to the car,
well its now easier, you can now easily use: TuneSultan(sultan0);
or TuneElegy(elegy0);
sultan0 and elegy0 are the vehicleids, so if you have for example this car in your GM/FS:
then you should add in front of it:
elegy0 =
so you get this:
but if you now compile youll see it will say: error: undefined symbol: elegy0
well thats why you havent created the variable elegy0 yet
so add on top of your script under #include and #define
and recompile and it will say:
warning: symbol elegy0 is assigned a value that is never used, something like that,
so now we will fix that:
so add in your ongamemodeinit the TuneElegy(elegy0);
and it will work

NOTE: ALWAYS PLACE THE TuneElegy(and others) AFTER THE CREATED VEHICLE!!!
so for example!:
NEVER DO THIS!!!!:
cuz then it might not work and then your car isnt tuned 
ok as we now compile it it will say:
symbol is never used: TuneRemington
and
symbol is never used: TuneBlade
and all the other tune functions you havent used yet,
well you can easily fix that by using:
i hope my explaination is clear enough 
also if anyone knows how to make it that you dont have to use pragma unused, tell me
, also i would be glad if you also told me other new ideas for this 
also if there are ANY buggs PLEASE tell me so i can fix them
download?:
OFCOURSE :P
SOLIDFILES:
http://www.solidfiles.com/d/15f934969f/
PASTEBIN:
http://pastebin.com/KfRvEeLs
Download V2 here!:
you wont be needed to use #pragma unused anymore, you can now just easily use it
thanks to MP2
thnx MP2 
SOLIDFILES:
http://www.solidfiles.com/d/bce53dc35d/
PASTEBIN:
http://pastebin.com/9sgZ5x66
also if you havent understood yet how to tune your car? please see my small tutorial i made:
https://sampforum.blast.hk/showthread.php?tid=312263
also remember! i have there the AddVehicleComponent function but you should use: TuneSultan/Elegy/Blade/etc..(vehicleid);
ok i hope everyone understand what i said
CREDITS:
MP2 - for telling me i can use the stock function so you wont be needing to use #pragma unused anymore
samp team - for making this possible to make
me - for making these things
greets niels
today i was tuning cars and i had to tune about 50 cars, and i had after tuning about 15 cars i had a hughe amount of code, so i thought, there MUST be a easier and faster way to tune cars

so i decided to make this small include for it:
it has all the tuner cars(sultan, elegy, jester, etc.....) and i think all the lowriders(slamvan, blade, remington, etc...)
im not sure if it has all lowriders but i think it has

so ok to the point:
to use this include:
as you can see in the include there are several functions made for this, like TuneSultan and TuneElegy and TuneSlamvan etc...
also you can see it is with vehicleid params
so like: TuneSultan(vehicleid)
vehicleid means the id of the vehicle you wanna tune,
so for example
you have a sultan and wanna tune it
before this include you had to go to this page:https://sampwiki.blast.hk/wiki/Car_Components
and search every single component and add it 1 by 1 to the car,
well its now easier, you can now easily use: TuneSultan(sultan0);
or TuneElegy(elegy0);
sultan0 and elegy0 are the vehicleids, so if you have for example this car in your GM/FS:
pawn Код:
AddStaticVehicleEx(562,-1633.19995117,-196.80000305,13.89999962,344.00000000,-1,-1,15); //Elegy
elegy0 =
so you get this:
pawn Код:
elegy0 = AddStaticVehicleEx(562,-1633.19995117,-196.80000305,13.89999962,344.00000000,-1,-1,15); //Elegy
well thats why you havent created the variable elegy0 yet
so add on top of your script under #include and #define
pawn Код:
new elegy0;
warning: symbol elegy0 is assigned a value that is never used, something like that,
so now we will fix that:
so add in your ongamemodeinit the TuneElegy(elegy0);
and it will work


NOTE: ALWAYS PLACE THE TuneElegy(and others) AFTER THE CREATED VEHICLE!!!
so for example!:
pawn Код:
elegy0 = AddStaticVehicleEx(562,-1633.19995117,-196.80000305,13.89999962,344.00000000,-1,-1,15); //Elegy
TuneElegy(elegy0);
pawn Код:
TuneElegy(elegy0);
elegy0 = AddStaticVehicleEx(562,-1633.19995117,-196.80000305,13.89999962,344.00000000,-1,-1,15); //Elegy

ok as we now compile it it will say:
symbol is never used: TuneRemington
and
symbol is never used: TuneBlade
and all the other tune functions you havent used yet,
well you can easily fix that by using:
pawn Код:
#pragma unused TuneRemington
#pragma unused TuneBlade
#pragma unused rest of the tunefucnts you havent used yet here

also if anyone knows how to make it that you dont have to use pragma unused, tell me


also if there are ANY buggs PLEASE tell me so i can fix them

download?:
OFCOURSE :P
SOLIDFILES:
http://www.solidfiles.com/d/15f934969f/
PASTEBIN:
http://pastebin.com/KfRvEeLs
Download V2 here!:
you wont be needed to use #pragma unused anymore, you can now just easily use it



SOLIDFILES:
http://www.solidfiles.com/d/bce53dc35d/
PASTEBIN:
http://pastebin.com/9sgZ5x66
also if you havent understood yet how to tune your car? please see my small tutorial i made:
https://sampforum.blast.hk/showthread.php?tid=312263
also remember! i have there the AddVehicleComponent function but you should use: TuneSultan/Elegy/Blade/etc..(vehicleid);
ok i hope everyone understand what i said

CREDITS:
MP2 - for telling me i can use the stock function so you wont be needing to use #pragma unused anymore

samp team - for making this possible to make

me - for making these things

greets niels