Vice City: Multiplayer

Server Development => Scripting and Server Management => Topic started by: UncleRus on Apr 21, 2020, 06:28 AM

Title: Who help me fix it problem?
Post by: UncleRus on Apr 21, 2020, 06:28 AM
I have a problem with the choice of classes, I need a class to vibrate through the skins, for example a robber id id 0 cop skin id 3 and so on here is a script script https://drive.google.com/open?id=1wl8mMtX7ssE5Rwmt0IR4VULkTLP80w2y
Title: Re: Who help me fix it problem?
Post by: Sebastian on Apr 21, 2020, 10:07 AM
Try this AddClass function (http://wiki.thijn.ovh/index.php?title=Scripting/Squirrel/Functions/AddClass).
You can find a list of skins here: Skins IDs (http://wiki.thijn.ovh/index.php?title=Skins)
Title: Re: Who help me fix it problem?
Post by: UncleRus on Apr 21, 2020, 12:01 PM
I don't understand where to embed this code; you can explain where to embed it
Title: Re: Who help me fix it problem?
Post by: Sebastian on Apr 21, 2020, 12:03 PM
Quote from: UncleRus on Apr 21, 2020, 12:01 PMI don't understand where to embed this code; you can explain where to embed it

onScriptLoad()
{
 //here
}
Title: Re: Who help me fix it problem?
Post by: UncleRus on Apr 21, 2020, 12:27 PM
and if I embed this code, then embedding the code will affect it my code
function onScriptLoad(){
   
   dofile( "scripts/functions.nut" );
   dofile( "scripts/commands.nut" );
   dofile( "scripts/admin.nut" );
   dofile( "scripts/object.nut" );
   
   pstats <- array( GetMaxPlayers(), null );
    sqliteDB <- mysql_connect( "localhost", "root", "Jilop1!", "vcmprp" );

   createpickups();
      
   rightclick <- BindKey(true, 0x02, 0, 0);
   ALT_KEY <- BindKey(true, 0x12, 0, 0);
   
Title: Re: Who help me fix it problem?
Post by: UncleRus on Apr 21, 2020, 02:12 PM
I put the code there but nothing has changed, you can climb in the script and find the line that I need, please :(
Title: Re: Who help me fix it problem?
Post by: Sebastian on Apr 21, 2020, 02:22 PM
Quote from: UncleRus on Apr 21, 2020, 02:12 PMI put the code there but nothing has changed, you can climb in the script and find the line that I need, please :(

Put here the code you used "but nothing changed", please.
Title: Re: Who help me fix it problem?
Post by: UncleRus on Apr 21, 2020, 02:54 PM
function onScriptLoad(){
AddClass (3, RGB (24, 255, 241), 0, Vector (-378.79, -537.962, 17.2832), 140.020, 21, 999, 1, 1, 25, 255);
}   
Title: Re: Who help me fix it problem?
Post by: UncleRus on Apr 21, 2020, 02:59 PM
can try to insert the script into the server.conf file?
Title: Re: Who help me fix it problem?
Post by: UncleRus on Apr 21, 2020, 03:00 PM
line skin configuration
Title: Re: Who help me fix it problem?
Post by: Sebastian on Apr 21, 2020, 03:06 PM
Quote from: UncleRus on Apr 21, 2020, 02:59 PMcan try to insert the script into the server.conf file?

Yeah, you can try that.
But AddClass had to work though

PS: The position you set must be in the camera view btw.
Title: Re: Who help me fix it problem?
Post by: UncleRus on Apr 21, 2020, 03:20 PM
https://prnt.sc/s3efyn
put a script there but nothing has changed
Title: Re: Who help me fix it problem?
Post by: UncleRus on Apr 21, 2020, 03:21 PM
I set the camera position as in the config script but nothing happened
Title: Re: Who help me fix it problem?
Post by: UncleRus on Apr 21, 2020, 03:24 PM
Sebastian, can you download the script and try to install it? Please, I really need
Title: Re: Who help me fix it problem?
Post by: habi on Apr 21, 2020, 04:04 PM
function onScriptLoad(){
   AddClass (....
   dofile( "scripts/functions.nut" );
   dofile( "scripts/commands.nut" );
   dofile( "scripts/admin.nut" );
   dofile( "scripts/object.nut" );
......
Title: Re: Who help me fix it problem?
Post by: Sebastian on Apr 21, 2020, 04:07 PM
Quote from: UncleRus on Apr 21, 2020, 03:20 PMhttps://prnt.sc/s3efyn
put a script there but nothing has changed

Oh man...

UncleRus, there are 2 different formats that you use in .xml files and .nut files.
AddClass function (http://wiki.thijn.ovh/index.php?title=Scripting/Squirrel/Functions/AddClass) is not to be used in the .xml file.
Just take a look at the example above the code you added! You can see it is Class related, so follow it!

So you should convert your AddClass, like this:


AddClass( 3, RGB (24, 255, 241), 0, Vector ( -378.79, -537.962, 17.2832 ), 140.020, 21, 999, 1, 1, 25, 255 );

<Class team="Robber" skin="0" x="-378.79" y="-537.962" z="17.2832" angle="140.020" weapon1="21" ammo1="999" weapon2="1" ammo2="1" weapon3="25" ammo3="255"/>



Not even being able to see such similarities ?! Bad sign for you my friend.
Title: Re: Who help me fix it problem?
Post by: UncleRus on Apr 21, 2020, 04:37 PM
Habi,thank you.
Title: Re: Who help me fix it problem?
Post by: UncleRus on Apr 21, 2020, 04:38 PM
Thank guys it work
Title: Re: Who help me fix it problem?
Post by: UncleRus on Apr 21, 2020, 04:39 PM
Sebastian thank you