Vice City: Multiplayer

Server Development => Scripting and Server Management => Snippet Showroom => Topic started by: MEGAMIND on Sep 30, 2018, 08:46 AM

Title: Vehicles Neons
Post by: MEGAMIND on Sep 30, 2018, 08:46 AM
Thanks to @Athanatos and @!
 
Vehicles Neons some how became possible, as i mentioned here (https://forum.vc-mp.org/?topic=6249.0) about the details and some conversation along with few ppl
That this system is actually not that good as it looks like, we do need a proper neon system like the ones in samp (Only depends on Devs)

Dev's dont mind but ill like to have this feature like vcmp having its own custom objecs, pickups etc etc along with attach deattach stuff and proper sync btw it, IDK if its possible yet but who knows maybe one day we will have it too, so here it is how to do it

function onScriptLoad()
{
dofile("scripts/attach_sys.nut");
neon <- CreateObject( 338, 1, -426.066, 32.066, 26.5326 , 255);
neoncar <- CreateVehicle( 141, 1, -426.066, 32.066, 26.5326, 0, -1 , -1 );
}

function onPlayerCommand( player, cmd, text )
{
        if(cmd == "n") {
player.Pos =  Vector( -426.066, 32.066+5, 26.5326 );
}

else MessagePlayer( "Error - Unknown command !",player);
}


function onPlayerEnterVehicle( player, vehicle, door )
{
attachEntity( neon, neoncar, Vector(0,0,-1) );
}

(https://i.imgur.com/D4SLr8M.jpg)

you will need to have this snippet https://forum.vc-mp.org/?topic=6224.msg43116#msg43116 in order to make it work
Title: Re: Vehicles Neons
Post by: NicusorN5 on Sep 30, 2018, 11:13 AM
Does not really look like a neon, but good work! Seems that my tuning system idea might get real.
Title: Re: Vehicles Neons
Post by: MEGAMIND on Sep 30, 2018, 12:06 PM
Quote from: Athanatos on Sep 30, 2018, 11:13 AMDoes not really look like a neon, but good work! Seems that my tuning system idea might get real.
ur system, and zeus effort on making it better ^^, if we really had neon lighs in vcmp then it would be a perfect example
Title: Re: Vehicles Neons
Post by: Xmair on Sep 30, 2018, 12:41 PM
There ARE neon lights in VC but there are 2 problems with using them in this case;
1. They are just long lines and not a sphere, they were designed to be placed on big houses.
2. They only turn on at night. 23:00 iirc.
Title: Re: Vehicles Neons
Post by: MEGAMIND on Sep 30, 2018, 01:14 PM
Quote from: Xmair on Sep 30, 2018, 12:41 PMThere ARE neon lights in VC but there are 2 problems with using them in this case;
1. They are just long lines and not a sphere, they were designed to be placed on big houses.
2. They only turn on at night. 23:00 iirc.

ik those ones but no need cuz i managed XD, soon something better will be released by me
Title: Re: Vehicles Neons
Post by: Sebastian on Sep 30, 2018, 03:18 PM
you can make your object act like a more realistic neon than this.
Just play with objects' settings like "outterange" "innerrange" "intensity" and "flash".

But it's not really attached, so idk how it would look.
Title: Re: Vehicles Neons
Post by: MEGAMIND on Sep 30, 2018, 03:58 PM
Quote from: Sebastian on Sep 30, 2018, 03:18 PMyou can make your object act like a more realistic neon than this.
Just play with objects' settings like "outterange" "innerrange" "intensity" and "flash".

But it's not really attached, so idk how it would look.

What r these outterange" "innerrange" "intensity" and "flash".

Title: Re: Vehicles Neons
Post by: Sebastian on Sep 30, 2018, 08:16 PM
Quote from: MEGAMIND on Sep 30, 2018, 03:58 PMWhat r these outterange" "innerrange" "intensity" and "flash".

settings of a custom object that you can play with. Instead of using default objects for such a project, you should use custom ones.
Tunning cars is something I love, but devs never added real attaching functions, so there was no reason to try this out, unfortunately.

(https://i.imgur.com/C9QYqvR.png)

But no matter what interval of time you use for the timer, it won't be attached.
For more info about 2dfx settings you can use, check this link out: http://gta.wikia.com/wiki/2DFX
Title: Re: Vehicles Neons
Post by: MEGAMIND on Oct 01, 2018, 02:32 AM
But will this work in vcmp? Idk seby, but i got neon objects from gta sa but they wont light up
+ ill like to add a question related such point that what kind of stuff could be added in clientside like in store i am aware of timecyc.dat, so can we add any type of .dat and txds? And .ide?
Title: Re: Vehicles Neons
Post by: Sebastian on Oct 01, 2018, 06:07 AM
Quote from: MEGAMIND on Oct 01, 2018, 02:32 AMBut will this work in vcmp?

The screenshot I posted is from vcmp.

Quote from: MEGAMIND on Oct 01, 2018, 02:32 AMi got neon objects from gta sa but they wont light up

an object is just an object, until you add properties like 2dfx effects or object.dat settings. Search on forum, there are examples.

Quote from: MEGAMIND on Oct 01, 2018, 02:32 AMwe add any type of .dat and txds? And .ide?

no. Only waterpro.dat and timecyc.dat
Title: Re: Vehicles Neons
Post by: MEGAMIND on Oct 01, 2018, 06:10 AM
Quotean object is just an object, until you add properties like 2dfx effects or object.dat settings. Search on forum, there are examples.

Is there an example on 2dfx for vcmp?

Title: Re: Vehicles Neons
Post by: Sebastian on Oct 01, 2018, 06:24 AM
Quote from: MEGAMIND on Oct 01, 2018, 06:10 AM
Quotean object is just an object, until you add properties like 2dfx effects or object.dat settings. Search on forum, there are examples.
Is there an example on 2dfx for vcmp?

 ::)

Quotean object is just an object, until you add properties like 2dfx effects or object.dat settings. Search on forum, there are examples.

https://forum.vc-mp.org/?topic=5725.msg40354#msg40354
min 3:12

https://forum.vc-mp.org/?topic=2655.0

Title: Re: Vehicles Neons
Post by: MEGAMIND on Oct 01, 2018, 06:42 AM
Quote from: Sebastian on Oct 01, 2018, 06:24 AM
Quote from: MEGAMIND on Oct 01, 2018, 06:10 AM
Quotean object is just an object, until you add properties like 2dfx effects or object.dat settings. Search on forum, there are examples.
Is there an example on 2dfx for vcmp?

 ::)

Quotean object is just an object, until you add properties like 2dfx effects or object.dat settings. Search on forum, there are examples.

https://forum.vc-mp.org/?topic=5725.msg40354#msg40354
min 3:12

https://forum.vc-mp.org/?topic=2655.0


Informative ty

k ive watched the video was interesting and easy but y wont it light up

<object id="0">
<model path="BlueNeonTube1.dff" distance="300" />
<texture path="MatTextures.txd" />
<collision type="autogenerate" />
<flags value="0" />
<effect>
            <position x="-426.066" y="32.066" z="26.53260"/>// object cords
            <colour r="51" g="51" b="255" a="200"/> //blue color
            <type>0</type>
            <light>
                <distance>100.000000</distance>
                <outerrange>0.000000</outerrange>
                <size>1.000000</size>
                <innerrange>0.000000</innerrange>
                <shadowintensity>40</shadowintensity>
                <flash>1</flash>
                <wet>0</wet>
                <flare>0</flare>
                <flags>0</flags>
                <corona>coronastar</corona>
                <shadow>shad_exp</shadow>
            </light>
        </effect>
</object>

thats the samp object there neon blue
(https://i.imgur.com/LvU2n88.jpg) + i dont have .dff option in my blender
Title: Re: Vehicles Neons
Post by: Sebastian on Oct 01, 2018, 11:17 AM
Quote from: MEGAMIND on Oct 01, 2018, 06:42 AM<position x="-426.066" y="32.066" z="26.53260"/>// object cords

Once again, check this link for more info:
http://gta.wikia.com/wiki/2DFX

X, Y, and Z coordinates relative to the center of the object.
The object position is the offset. The 2dfx light position is according to the object, not to the world.
In order to set the light in the same position as the object, you should use x=0.0 y=0.0 z=0.0

innerrange = size of shadow
outerrange = radius of affected peds/cars (get lighted up if in the radius)
Title: Re: Vehicles Neons
Post by: MEGAMIND on Oct 01, 2018, 12:07 PM
ty but can u give me the right dff plugin for blender mine is currently not supporting the dff files
(any dff file)
Title: Re: Vehicles Neons
Post by: Sebastian on Oct 01, 2018, 12:14 PM
Quote from: MEGAMIND on Oct 01, 2018, 12:07 PMty but can u give me the right dff plugin for blender mine is currently not supporting the dff files
(any dff file)

Unfortunately, cannot find it anymore ...
But if it is an object from SA, it should be loaded by vcmp without any conversion.
Title: Re: Vehicles Neons
Post by: MEGAMIND on Oct 01, 2018, 12:18 PM
Quote from: Sebastian on Oct 01, 2018, 12:14 PM
Quote from: MEGAMIND on Oct 01, 2018, 12:07 PMty but can u give me the right dff plugin for blender mine is currently not supporting the dff files
(any dff file)

Unfortunately, cannot find it anymore ...
But if it is an object from SA, it should be loaded by vcmp without any conversion.

yup ik its converted but i cannot find the right vector of that object to place that rgb colors
Title: Re: Vehicles Neons
Post by: MEGAMIND on Oct 01, 2018, 02:19 PM
Solved Thanks alot @Sebastian