Vice City Multiplayer

VC:MP 0.4 (Beta) => Script Discussion => Script Releases => Topic started by: soulshaker on October 08, 2014, 07:28:39 pm

Title: Lift Function (Office building lift working again :D )
Post by: soulshaker on October 08, 2014, 07:28:39 pm
Hello all.
As we know that the lift of office building doesn't works in vcmp 0.4, so i made this function to make it work just like 0.3.

Add this timer in onScriptLoad/OnServerStart:-
Code: [Select]
NewTimer("lift", 500, 0 );
and

Add this function in your script:-
Code: [Select]
function lift()
{
for ( local i = 0; i < GetMaxPlayers(); i++ ) 
{
local plr = FindPlayer( i );
if ( plr )
{
if (InPoly( plr.Pos.x, plr.Pos.y, -558.963,783.904,-558.962,780.521,-555.975, 780.518,-555.912, 783.902 ))
{
plr.Pos = Vector( -555.542,788.014,97.5104 );
}
else if (InPoly( plr.Pos.x, plr.Pos.y, -553.059,789.694,-550.05,789.696,-550.052,786.313,-553.151,786.317 ))
{
plr.Pos = Vector( -560.125,782.265,22.8768 );
}
}
}
}

Enjoy :)
Title: Re: Lift Function (Office building lift working again :D )
Post by: sseebbyy on October 08, 2014, 08:07:19 pm
Well, I like more the one made with greenscanlines, setcamera and etc. from Polska server. :D
Buuut, this also is good, faster. (like in 0.3 but with no fade in/out black)

If you will script every teleportation/transition that exists in 0.3, for 0.4, then I believe someone will use it. :)
Title: Re: Lift Function (Office building lift working again :D )
Post by: thijn on October 08, 2014, 08:10:08 pm
You can easily increase that timer to 1 or 2 seconds, still takes you up pretty quickly and reduces lag.
Title: Re: Lift Function (Office building lift working again :D )
Post by: Honey. on October 08, 2014, 08:15:14 pm
@Seby it wad whitescanlines not green :) and taking the camera pos is Seriously a hard task.When i tried to freeze the camera it was set on the road of downtown instead of the lift :o
Title: Re: Lift Function (Office building lift working again :D )
Post by: soulshaker on October 08, 2014, 08:59:59 pm
If you will script every teleportation/transition that exists in 0.3, for 0.4, then I believe someone will use it. :)

nice idea :D