[FilterScript] Racing/tuner decals on non-tuner vehicles!
#1














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?
Reply
#2

this is really nice, good job
edit: except for the code, nice idea nevertheless
Reply
#3

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)
Reply
#4

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
pawn Код:
#pragma tabsize 0
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
Reply
#5

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?
Reply
#6

Seems like a good idea actually, it's different anyway.
Reply
#7

What a waste of code you could write this script in about 100 lines and lot better as well.
Reply
#8

Nice!
We were thinking of something similar to the NFS-SAMP.
Reply
#9

Keep it up! nice work!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)