Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


  Show Posts
Pages: 1 [2]
16  Scripting / Script Help / Reconnect command help on: October 01, 2012, 09:27:11 pm
 :o :o how can i delete " reconnect " command ??????
17  Scripting / Script Help / Why This machine dose not Work ? on: September 13, 2012, 06:16:28 pm
 this machine dose not Work  why ?



18  Scripting / Script Help / what is the error ? on: September 05, 2012, 02:07:28 pm
function onPlayerCommand( id, cmd, text )
{
    if ( cmd == "unloadRace" )
    {
        UnloadScript( "Race" );
        Message( "Race Script unloaded!" );
    }
    return 1;
}

i need to make command unload any script .
19  Scripting / Script Help / why this doesn't work ? on: July 28, 2012, 12:46:20 pm
why this doesn't work ?


Code: [Select]
const RAMP_OBJECT = 1378;

objects <- array( GetMaxPlayers(), -1 );


function SpawnRamp( id, boost )
{
   local plr = FindPlayer( id );
   if ( plr )
   {
      local pos = plr.Pos;
      local rot = plr.Angle, rad = rot * PI / 180.0;
     
      local x = pos.x, y = pos.y;
      local x2 = x + 1.0 * cos(rad) - 25.0 * sin(rad);
      local y2 = y + 1.0 * sin(rad) + 25.0 * cos(rad);
     
      if ( objects[id] != -1 )
      {
         local obj = FindObject( objects[id] );
         if ( obj )
         {
            obj.Pos = Vector( x2, y2, pos.z - 0.3 );
            obj.Angle = Vector( 0.0, 0.0, rot + 270.0 );
         }
      }
      else
      {
         local obj = CreateObject( RAMP_OBJECT, Vector( x2, y2, pos.z ), Vector( 0.0, 0.0, rot + 270.0 ) );
         if ( obj )
         {
            objects[id] = obj.ID;
         }
      }
     
      if ( boost ) Boost( plr );
   }
}

function Boost( plr )
{
   local veh = plr.Vehicle;
   if ( veh )
   {
      local vel = veh.Velocity;
      vel.x *= 1.5;
      vel.y *= 1.5;
      vel.z *= 1.5;
     
      veh.Velocity = vel;
   }
}

function Fix( plr )
{
   local veh = plr.Vehicle;
   if ( veh )
   {
   plr.Vehicle.Fix();
   }
}

function Flip( plr )
{
   local veh = plr.Vehicle;
   if ( veh )
   {
    plr.Vehicle.Fix();
   local rot = plr.Vehicle.Angle;
   plr.Vehicle.Pos = plr.Vehicle.Pos;
   plr.Vehicle.Angle = rot;
   }
}

function Jump( plr )
{
   local veh = plr.Vehicle;
   if ( veh )
   {
   local vel = veh.Velocity;
   vel.x += 0;
   vel.y += 0;
   vel.z += 0.5;

    veh.Velocity = vel;
   }
}

function onPlayerPart( plr, reason )
{
   local id = plr.ID;
   if ( objects[id] != -1 )
   {
      local obj = FindObject( objects[id] );
      if ( obj )
      {
         obj.Remove();
         objects[id] = -1;
      }
   }
   
   return 1;
}

_______________________________________________________________________________


Code: [Select]
function onScriptLoad()
{
   BindKey( 'O', BINDTYPE_DOWN, "Ramp" );
   BindKey( 'P', BINDTYPE_DOWN, "RampWithBoost" );
   BindKey( 'I', BINDTYPE_DOWN, "Boost" );
   BindKey( 'U', BINDTYPE_DOWN, "Fix" );
   BindKey( 'Z', BINDTYPE_DOWN, "Flip" );
   BindKey( '2', BINDTYPE_DOWN, "Jump" );

   g_pLocalPlayer <- FindLocalPlayer();
   
   return 1;
}

function Ramp()
{
   local veh = g_pLocalPlayer.Vehicle;
   if ( veh )
   {
      local driver = veh.Driver;
      if ( driver && driver.ID == g_pLocalPlayer.ID )
      {
         CallServerFunc( "binds/binds.nut", "Ramp", g_pLocalPlayer.ID, false );
      }
   }
}

function RampWithBoost()
{
   local veh = g_pLocalPlayer.Vehicle;
   if ( veh )
   {
      local driver = veh.Driver;
      if ( driver && driver.ID == g_pLocalPlayer.ID )
      {
         CallServerFunc( "binds/binds.nut", "Ramp", g_pLocalPlayer.ID, true );
      }
   }
}

function Boost()
{
   local veh = g_pLocalPlayer.Vehicle;
   if ( veh )
   {
      local driver = veh.Driver;
      if ( driver && driver.ID == g_pLocalPlayer.ID )
      {
         CallServerFunc( "binds/binds.nut", "Boost", g_pLocalPlayer );
      }
   }
}

function Fix()
{
   local veh = g_pLocalPlayer.Vehicle;
   if ( veh )
   {
      local driver = veh.Driver;
      if ( driver && driver.ID == g_pLocalPlayer.ID )
      {
         CallServerFunc( "binds/binds.nut", "Fix", g_pLocalPlayer );
      }
   }
}

function Flip()
{
   local veh = g_pLocalPlayer.Vehicle;
   if ( veh )
   {
      local driver = veh.Driver;
      if ( driver && driver.ID == g_pLocalPlayer.ID )
      {
         CallServerFunc( "binds/binds.nut", "Flip", g_pLocalPlayer );
      }
   }
}

function Jump()
{
   local veh = g_pLocalPlayer.Vehicle;
   if ( veh )
   {
      local driver = veh.Driver;
      if ( driver && driver.ID == g_pLocalPlayer.ID )
      {
         CallServerFunc( "binds/binds.nut", "Jump", g_pLocalPlayer );
      }
   }
}
20  Scripting / Script Help / help in Sphere on: July 27, 2012, 01:40:01 pm
how can i make Sphere  function onScriptLoad( )  how ?????
i have made it but the server sad error
21  Scripting / Script Help / i need help :P on: June 29, 2012, 08:26:57 pm
  ;D how can i make Pictures homed and garages on map
22  Liberty Unleashed / Liberty Unleashed Chat / i need help in scripts . on: June 12, 2012, 03:23:35 pm
i need to know how can i open garages in game and thanks .
23  Liberty Unleashed / Suggestions / help help on: June 10, 2012, 01:15:31 pm
 :'( admin i need players play with me ,this players from computer , can you make this ?
Pages: 1 [2]
© Liberty Unleashed Team.