lift

Started by Nothing, Jul 10, 2015, 05:56 AM

Previous topic - Next topic

Nothing

How To Set Lift.I want to goto to the bank upper part when i enter in the lift nothing happens.hlp me.

[VSS]Shawn

#1
Add this on Functions

function isbank(player)
{
if(InPoly(player.Pos.x, player.Pos.y, -939.308, -352.559, -939.308, -350.304, -937.33, -352.558, -937.143, -350.229 ))
{
if ( pinfo[player.ID].frombank == true )
{
 player.Pos = Vector( -933.531, -351.39, 17.8038 ); // From bank locker
 pinfo[player.ID].frombank = false;
 }
else
{
 player.Pos = Vector( -933.277, -351.746, 7.22692 ); // To bank locker
pinfo[player.ID].frombank = true;
}
}
}

function onPlayerMove( player, lastX, lastY, lastZ, newX, newY, newZ )
{
isbank(player);
}

.

@[VSS]Shawn Can't you enclose that in [-code] tags like a f*ing normal person? What dafuq is wrong with you people?
.

EK.IceFlake

Quote from: [VSS]Shawn on Jul 10, 2015, 08:08 AMAdd this on Functions

function isbank(player)
{
if(InPoly(player.Pos.x, player.Pos.y, -939.308, -352.559, -939.308, -350.304, -937.33, -352.558, -937.143, -350.229 ))
{
if ( pinfo[player.ID].frombank == true )
{
 player.Pos = Vector( -933.531, -351.39, 17.8038 ); // From bank locker
 pinfo[player.ID].frombank = false;
 }
else
{
 player.Pos = Vector( -933.277, -351.746, 7.22692 ); // To bank locker
pinfo[player.ID].frombank = true;
}
}
}

function onPlayerMove( player, lastX, lastY, lastZ, newX, newY, newZ )
{
isbank(player);
}
Use that if you wanna lag the shit out of your server.
You'd better off be using pickups or spheres

[VSS]Shawn

Another example of pickup

function onPickupPickedUp( player, pickup )
{
if (pickup.Model == 408)
 {
PrivMessage( player, Wow Upper" );
 player.Pos = Vector( -933.531, -351.39, 17.8038 ); // From bank locker
}

MacTavish

Quote from: [VSS]Shawn on Jul 10, 2015, 11:08 AMAnother example of pickup

function onPickupPickedUp( player, pickup )
{
if (pickup.Model == 408)
 {
PrivMessage( player, Wow Upper" );
 player.Pos = Vector( -933.531, -351.39, 17.8038 ); // From bank locker
}

Actually the best way is This

Grand Hunting Project
Join #SLC, #KAKAN, #Doom, #GHP @LUnet

Retired VC:MP Player/Scripter :P

[VSS]Shawn


KAKAN

Use this

Add this in functions.nut
function onPickupPickedUp( player, pickup )
{
switch( pickup.ID )
  {
case 0:
player.Pos = Vector( -933.277, -351.746, 7.22692 ); // To bank locker
break;
case 1:
player.Pos = Vector( -933.531, -351.39, 17.8038 ); // From bank locker
break;
return0;
}
}

Add this in server.conf
<Pickup model="376" world="1" x="-935.85" y="-351.315" z="17.8038"/>
<Pickup model="376" world="1" x="-936.923" y="-351.838" z="7.22692"/>
oh no