Racing/tuner decals on non-tuner vehicles! -
darles92 - 03.04.2016
cars supported:
- Alpha
- Banshee
- Bullet
- Cadrona
- Cheetah
- Comet
- Euros
- Fortune
- Infernus
- Manana
- Super GT
- Turismo
- ZR350
---------------------------------
commands:
/decals - for racing decals
/nobumper - remove front bumper (great on drift cars)
/nobumpers - removes both bumpers (Comet and Huntley gets sweet looks)
/nohood - removes hood (show your muscle!)
/nodecals - removes decals
---------------------------------
Suggestions and advices wellcome.
Wanted to add tuning parts but mostly of them don't fit well. Maybe using attaching object to player and then scaling to right size would fit?
Re: Racing/tuner decals on non-tuner vehicles! -
Dignity - 03.04.2016
this is really nice, good job
edit: except for the code, nice idea nevertheless
Re: Racing/tuner decals on non-tuner vehicles! -
darles92 - 03.04.2016
Ye, code is bit mess, I plan to clear it up, also what to improve in code itself?
I'm still learning, this is my 1st FS done in samp.
Was nightmare to get proper car body coords (XYZ, rXrYrZ) for these decals, also wanted fonts similar to ones used in tuner cars (SPLIT/ALIEN logos for example)
Re: Racing/tuner decals on non-tuner vehicles! -
Dignity - 03.04.2016
Quote:
Originally Posted by darles92
Ye, code is bit mess, I plan to clear it up, also what to improve in code itself?
I'm still learning, this is my 1st FS done in samp.
Was nightmare to get proper car body coords (XYZ, rXrYrZ) for these decals, also wanted fonts similar to ones used in tuner cars (SPLIT/ALIEN logos for example)
|
dont use
try using 2 dimensional arrays
pawn Код:
#define MAX_CAR_OBJECTS ( 10 )
new CarObject [ MAX_PLAYERS ] [ MAX_OBJECTS ] ;
Usage
pawn Код:
CarObject [ playerid ] [ object_number ] = ...
try using zcmd instead of strcmp commands
and instead of doing
pawn Код:
else
{
SendClientMessage(playerid, 0xFFFFFFFF, "You need proper vehicle first.");
}
do this
pawn Код:
else return SendClientMessage(playerid, 0xFFFFFFFF, "You need proper vehicle first.");
imho its pointless to use brackets when ur only using up only one line. i only use brackets if im adding more than one line inbetween them.
also, under onvehicledeath & spawn you use vehicleid instead of playerid, so it will spawn/despawn the wrong objects.
you could also shorten the code a lot by making it compatible with every car, not just a select few. you can do this by creating a function that does all the work for you. there's tons of includes with car offsets, maybe you could use those for it
Re: Racing/tuner decals on non-tuner vehicles! -
darles92 - 03.04.2016
Ok, thx.
used brackets coz was not sure if only this 1 lane, or maybe some extra lines, just leaving it for possible future.
onvehicledeath should be player id, not vehicle?
about compatiblity of vehicles. there is little problem. Take alook on AHAB in Super GT picture and compare with AHAB on ZR350 front.
Super GT one is in diffrent angle, right next to headlisgh, slightly on top hood surface.
ZR350 same decal is in way diffrent angle, right under lights and strictly on front of car. Car is a lot wider zo X values are diffrent. Thats why decided to re-map proper decals for each vehicle.
Also some decals feature car names (T U R I S M O) or just made up fictional stuff You would see (on Euros widnow there is J-Sports text for example) so no idea how this could be compatible.
Excluded cars with 'shaking rear' (mostly muscles, Sabre, Buffalo etc) coz decals were standing still, while body was shaking, making them constantly flickering on cars.
So to do:
- clear up code, turn to 2-d arrays, fix onvehicledeath, maybe replace if with switch/case structure
- MOAAAAR cars
suggest ones You would like to see!
Maybe add racing numbers based on player id?
getting player id, keeping it in variable, then use that variable as text on car.
Also I plan to add spoilers and more tuning stuff for bland, nontunable cars (
Bullet,
Banshee etc.. racing style looks) but maybe better use attachobject to player, so can scale spoilers or other components to fit? Which player bone should i attach them so they do not move when driving, turning, handbraking? Spine or maybe legs?
Re: Racing/tuner decals on non-tuner vehicles! -
Luis- - 16.05.2016
Seems like a good idea actually, it's different anyway.
Re: Racing/tuner decals on non-tuner vehicles! -
Pottus - 17.05.2016
What a waste of code you could write this script in about 100 lines and lot better as well.
Re: Racing/tuner decals on non-tuner vehicles! -
Skudinhu - 18.05.2016
Nice!
We were thinking of something similar to the NFS-SAMP.
Re: Racing/tuner decals on non-tuner vehicles! -
JawsCraft - 19.05.2016
Keep it up! nice work!