How To Set Lift.I want to goto to the bank upper part when i enter in the lift nothing happens.hlp me.
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?
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
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
}
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 (http://forum.vc-mp.org/?topic=18.0)
Ya All are
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"/>