Author Topic: Lift Function (Office building lift working again :D )  (Read 5418 times)

0 Members and 1 Guest are viewing this topic.

Offline soulshaker

  • Street Thug
  • *
  • Posts: 21
    • View Profile
    • Ethical DM VC:MP 0.4
Lift Function (Office building lift working again :D )
« 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 :)

Offline sseebbyy

  • VC:MP Veteran
  • *****
  • Posts: 774
  • Immortal VC:MP Player
    • View Profile
    • Zombie Invasion => Server Forum [DEAD PROJECT]
Re: Lift Function (Office building lift working again :D )
« Reply #1 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. :)

Quote
Painful/Noob scripters acts like: I Am The Best Scripter Because I Announce My Releases With Big Font Size Without Giving Too Much Info' In The Hope They All Will Download And Check It. I Ignore Bad Replies, Replies That I Could Learn From, And Replies With So Much Text.



Offline thijn

  • LU testers
  • VC:MP Veteran
  • *
  • Posts: 667
  • Im proud to be pro.
    • View Profile
    • Vice Underdogs
Re: Lift Function (Office building lift working again :D )
« Reply #2 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.

Offline Honey.

  • Made Man
  • ***
  • Posts: 111
    • View Profile
Re: Lift Function (Office building lift working again :D )
« Reply #3 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

Offline soulshaker

  • Street Thug
  • *
  • Posts: 21
    • View Profile
    • Ethical DM VC:MP 0.4
Re: Lift Function (Office building lift working again :D )
« Reply #4 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