Menu

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 Menu

Messages - vitovc

#1
maybe you need to try another version of game/or just gta-vc.exe. I never had socialclub with vcmp so I dont know how it works.
#3
I dont have windows to show an example but you can google/youtube 'msi run as administrator'
#4
Quote from: EazyVU on Apr 30, 2024, 05:31 PMthere's no administartive on this file
did you unpacked archive (exe/install file) before run as admin? also you can create link of installer file and change its attributes to run as admin. Removing read-only protection from vice city directory or install in another directory can help too.
#5
Quote from: PSL on Mar 11, 2024, 10:41 AMWhen the NPC is in the vehicle and is the driver, the vehicle cannot pass the Vehicle.AddSpeed to add speed.
its not a bug, same with idle (afk/away) player. addspeed works only when vehicle's syncer (player) is not away. you need to hande vehicle speed/pos by NPC's code, the driver of a car. its only correct method.
#6
Quote from: Eva on Feb 15, 2024, 04:27 PMStill its a downgrade lol, going back to an earlier release is downgrade not up
yes eva, if we count number of version then its correct. if we count quality of version then its upgrade (as quality, at least by needs of topic starter). for example if you swith your PC from Intel Celeron G6900 to Intel Core i7-8700 it will be 'downgrade' because G6900 is newer but i7-8700 has better perfomance (though 5 years older).
when we play game we need experience not number of version. and vice city itself is 22 years old game... so it all depends of point of view.
#7
Quote from: Eva on Feb 14, 2024, 04:13 PMehm thats not upgrade but downgrade, going from 04rel006 to 04rel004.
it depends how to count. 6 is more than 4, rel006 has more value of bugs and limitations and rel004 has less value of bugs and limitations... in rel006 you can not use classsicaxis.asi, widescreen.asi is bugged, you can not push players (it considered as 'bug' by devs), you can not look back by middle mouse button in every angle of player with correct turning head... but  in rel006 you can edit stadium text and turn on taxi lights... do it depends of personal preference.
#9
Quote from: PSL on Feb 03, 2024, 05:39 AMHello, habi. Can you update the save location of the recording file?  I want to save it directly in the npcscripts/recordings folder, so that it can be played back directly, without manually copying the past.
Simple create a link https://en.wikipedia.org/wiki/Ln_(Unix)
#10

This script can be helpful in development to draw npc paths, visualize raytrace or just for laser rifle feature.

::line3d <- {
  "list" : {},
  "del" : function(id){
    if(::line3d.list.rawin(id)){
      return ::line3d.list.rawdelete(id);
    }
  },
  "set" : function(id, color, from, to){
    if(::line3d.list.rawin(id)){
      return ::line3d.update(id, from, to);
    }
    local item = {
      "id" : id,
      "pos" : {
        "from" : ::Vector(0, 0, 0),
        "to" : ::Vector(0, 0, 0)
      },
      "dist" : 0
      "raw" : []
    }
    for(local j = 0; j < 4; j++){
      local ca = ::GUICanvas();
      ca.Colour = color;
      ca.Position = ::VectorScreen(0, 0);
      ca.Size = ::VectorScreen(1, 1);
      ca.AddFlags(GUI_FLAG_BACKGROUND | GUI_FLAG_3D_ENTITY);
      ca.Position3D = ::Vector(0.0,0.0,0.0);
      ca.Rotation3D = ::Vector(0.0,0.0,0.0);
      if(j < 2){
        ca.Size3D = ::Vector(0.01, 0.01, 0.0);
      } else {
        ca.Size3D = ::Vector(0.01, 0.01, 0.0);
      }
      item.raw.push(ca);
    }
    ::line3d.list.rawset(id, item);
    return ::line3d.update(id, from, to);
  },
  "update" : function(id, from, to){
    if(::line3d.list.rawin(id)){
      local item = ::line3d.list.rawget(id);
      item.pos.from = ::Vector(from.X, from.Y, from.Z);
      item.pos.to = ::Vector(to.X, to.Y, to.Z);
      item.dist = ::line3d.dist_3d(from.X, from.Y, from.Z, to.X, to.Y, to.Z);

      local lp2 = item.pos.from;
      local lp = item.pos.to;
      local fp = ::Vector(lp2);
      local fp0 = ::Vector(lp);

      for(local j = 0; j < 4; j++){
        if(0 == j){
          local rot = ::line3d.rotate1(lp.X, lp.Y, lp.Z, lp2.X, lp2.Y, lp2.Z);
          rot.X += -1.570796;
          item.raw[j].Rotation3D = ::Vector(rot);
          local pitch = rot.X;
          local yaw = rot.Z;
          local rel_y = 1;
          local reloffset = sin(pitch) + 1;
          local X = fp.X + -0.005 * cos(yaw) - ((rel_y * -2) + rel_y + reloffset) * sin(yaw);
          local Y = fp.Y + -0.005 * sin(yaw) + ((rel_y * -2) + rel_y + reloffset) * cos(yaw);
          local Z = fp.Z + 1 + cos(pitch) * -1;
          item.raw[j].Size3D.Y = item.dist;
          item.raw[j].Position3D = ::Vector(X, Y, Z);
        } else if(1 == j){
          local rot = ::line3d.rotate1(lp.X, lp.Y, lp.Z, lp2.X, lp2.Y, lp2.Z);
          rot.X += 1.570796;
          item.raw[j].Rotation3D = ::Vector(rot);
          local pitch = rot.X;
          local yaw = rot.Z;
          local rel_y = 1;
          local reloffset = sin(pitch) + 1;
          local X = fp0.X + -0.005 * cos(yaw) - ((rel_y * -2) + rel_y + reloffset) * sin(yaw);
          local Y = fp0.Y + -0.005 * sin(yaw) + ((rel_y * -2) + rel_y + reloffset) * cos(yaw);
          local Z = fp0.Z + 1 + cos(pitch) * -1;
          item.raw[j].Size3D.Y = item.dist;
          item.raw[j].Position3D = ::Vector(X, Y, Z);
        } else if(2 == j){
          local rot = ::line3d.rotate2(lp.X, lp.Y, lp.Z, lp2.X, lp2.Y, lp2.Z);
          rot.X += -1.570796;
          item.raw[j].Rotation3D = ::Vector(rot);
          local pitch = rot.X;
          local yaw = rot.Z;
          local rel_y = 1;
          local reloffset = sin(pitch) + 1;
          local X = fp.X + -0.005 * cos(yaw) - ((rel_y * -2) + rel_y + reloffset) * sin(yaw);
          local Y = fp.Y + -0.005 * sin(yaw) + ((rel_y * -2) + rel_y + reloffset) * cos(yaw);
          local Z = fp.Z + 1 + cos(pitch) * -1;
          item.raw[j].Size3D.X = item.dist;
          item.raw[j].Position3D = ::Vector(X, Y, Z);
        } else if(3 == j){
          local rot = ::line3d.rotate2(lp.X, lp.Y, lp.Z, lp2.X, lp2.Y, lp2.Z);
          rot.X += 1.570796;
          item.raw[j].Rotation3D = ::Vector(rot);
          local pitch = rot.X;
          local yaw = rot.Z;
          local rel_y = 1;
          local reloffset = sin(pitch) + 1;
          local X = fp.X + -0.005 * cos(yaw) - ((rel_y * -2) + rel_y + reloffset) * sin(yaw);
          local Y = fp.Y + -0.005 * sin(yaw) + ((rel_y * -2) + rel_y + reloffset) * cos(yaw);
          local Z = fp.Z + 1 + cos(pitch) * -1;
          item.raw[j].Size3D.X = item.dist;
          item.raw[j].Position3D = ::Vector(X, Y, Z);
        }
      }
    }
  },
  "dist_2d" : function (x, y, x2, y2){
    return ::sqrt((x - x2)*(x - x2) + (y - y2)*(y - y2));
  },
  "dist_3d" : function (x, y, z, x2, y2, z2){
    return ::sqrt((x - x2)*(x - x2) + (y - y2)*(y - y2) + (z - z2)*(z - z2));
  },
  "rotate1" : function(x1, y1, z1, x2, y2, z2){
    local rotx = ::atan2(z2 - z1, ::line3d.dist_2d(x1, y1, x2, y2));
    rotx = rotx - 1.570796;
    local rotz = -1 * ::atan2( x2 - x1, y2 - y1 );
    if(rotz < -3.141592){
      rotz = rotz + 6.283184;
    }
    return ::Vector(rotx, 0,rotz);
  },
  "rotate2" : function(x1, y1, z1, x2, y2, z2){
    local rotx = ::atan2(z2 - z1, ::line3d.dist_2d(x1, y1, x2, y2));
    local rotz = -1 * ::atan2( x2 - x1, y2 - y1 );
    rotz = rotz + -1.570796;
    if(rotz < -3.141592){
      rotz = rotz + 6.283184;
    }
    local roty = ::atan2(z2 - z1, ::line3d.dist_2d(x1, y1, x2, y2));
    rotx = rotx - roty;
    return ::Vector(rotx, roty,rotz);
  }
}

::line3d.set("test", ::Colour(255,0,0,200), Vector(-29.2778, -1342.03, 12.3133), Vector(-36.4452, -1342.45, 10.3133));
#11
Snippet Showroom / Relative position (in 3d)
Jan 26, 2024, 01:08 PM
I'd wanted to share some functions from my vc-mp archive.

This function will find relative position based by z_angle (vertical angle) and relative X and Y distance from base point.
rel_pos2d <- function(z_angle, pos_x, pos_y, pos_z, rel_x, rel_y, rel_z){
  local rX = pos_x + rel_x * ::cos(z_angle) - rel_y * ::sin(z_angle);
  local rY = pos_y + rel_x * ::sin(z_angle) + rel_y * ::cos(z_angle);
  local rZ = pos_z + rel_z;
  return ::Vector(rX, rY, rZ);
}

This function will find relative position based by z_angle (vertical angle), y_angle (horizontal angle) and distance.
rel_pos3d <- function(dist, pos_x, pos_y, pos_z, y_angle, z_angle){
  local rX = dist * ::cos(y_angle) * ::cos(z_angle);
  local rY = dist * ::cos(y_angle) * ::sin(z_angle);
  local rZ = dist * ::sin(y_angle);
  return ::Vector(pos_x + rX, pos_y + rY, pos_z + rZ);
}
#12
Tutorials / VC-MP on linux [knowage database]
Dec 27, 2023, 12:24 PM
i moved from windows to linux about 2 years ago and i want to share some useful information how to configure wine (playonlinux) for vcmp by my own experience:

wine version, correctly working with vcmp (I tested on rel004 client):
7.0-staging
7.0-rc6-staging
7.0-rc6
7.0-rc5-stagging
7.0-rc4-staging
7.0-rc3-stagging
7.0-rc2-stagging
6.18-stagging
6.18
6.17-staging
6.17
6.16-staging
6.16
6.15-staging
6.15
in some others wine versions vcmp browser will not run, in some - mouse sensitivity will be incorrect - so it wont be playable.
please note: in official vcmp browser text in servers list will not be visible, i still dont know how to fix that so most likely i have to live with that.

my display configuration:

to load .dll plugins from game's dir you need to add them here:

if you want to add something useful how to use vcmp in linux - feel free to post here.
#13
Quote from: Mohamed Boubekri on Oct 05, 2023, 07:14 AM
Quote from: Gulk on Oct 01, 2023, 03:23 PMTry setting the vehicle weight very high when its unoccupied.
It's seems a good idea :p
But i think it's not real, i will be like the person who will be laugh at the players indirectly.
https://forum.vc-mp.org/index.php?topic=4991.msg37376#msg37376
#14
Map Showroom / small downtown addon (stairs)
Sep 20, 2023, 05:24 AM

I have added some stairs in downtown. Feel free to use it in your server.


<?xml version="1.0" encoding="ASCII" ?>
<map>
<itemlist>
<item model="2027" name="fix9"><!-- dt g-spot stairs 1 -->
<position x="-573.91" y="1374.23" z="15.63" />
<rotation format="axisangle" x="0.936672" y="0" z="0" angle="0.350207" />
</item>
<item model="2027" name="fix10"><!-- dt g-spot stairs 2 -->
<position x="-367.1" y="913.05" z="16.28" />
<rotation format="axisangle" x="-0.191693" y="-0.952011" z="0.233975" angle="-0.0467349" />
</item>
<item model="2334" name="fix23"><!-- dt hole stairs 1 -->
<position x="-536.29" y="880.1" z="70.7" />
<rotation format="axisangle" x="0" y="0" z="-0.999998" angle="-0.00174547" />
</item>
<item model="2334" name="fix24"><!-- dt hole stairs 2 -->
<position x="-517.09" y="1024.7" z="70.7" />
<rotation format="axisangle" x="0" y="0" z="0.0017449" angle="0.999999" />
</item>
<item model="449" name="fix25"><!-- dt hole palm 1 -->
<position x="-521.09" y="1020.9" z="60.3" />
<rotation format="axisangle" x="0" y="0" z="-0.921185" angle="-0.389124" />
</item>
<item model="449" name="fix26"><!-- dt hole palm 2 -->
<position x="-532.69" y="883.3" z="60.3" />
<rotation format="axisangle" x="0" y="0" z="-0.921185" angle="-0.389124" />
</item>
</itemlist>
</map>
#15
no idea about DecUI lib. but moving/rotation gui elements is generic in vcmp clientside script