Author Topic: New VC:MP Server (With Squirrel!)  (Read 39544 times)

Stoku

  • lck.gudio.eu
  • Full Member
  • ***
  • Posts: 276
  • Karma: +26/-2
  • Liberty City Killers
    • View Profile
    • Liberty City Killers (GTA3/VC Clan)
Re: New VC:MP Server (With Squirrel!)
« Reply #15 on: June 18, 2009, 08:23:58 pm »
Quote
Could it be possible to add some new part reasons to vcmp.partreason? Cause when i crash in game, it displays "Quit", but i have a crashed, would be better "Crash" or smthing else as part reason.
I think it's impossible, because client is disconected on crash and it will be impossible to send a part info packet after that.

Quote
Ive got today an idea  ;). Could it be haxable?
Yes it can, but you have to have a hack what will change that text and send it to other players on your server :P. The other way is slapping VC-MP team to add it to the next version of VC-MP ;).

NC

  • Full Member
  • ***
  • Posts: 101
  • Karma: +2/-3
  • cipa
    • View Profile
Re: New VC:MP Server (With Squirrel!)
« Reply #16 on: June 18, 2009, 10:08:36 pm »
Buuu, and i think adding "Crash" its possible. Worked on the mIRC script, alias code:
Code: [Select]
alias qreason {
  if ($1 == 0) return (Crash/Lost)
  elseif ($1 == 1) return (Quit)
  elseif ($1 == 2) return (Kick)
}

Quote
The other way is slapping VC-MP team to add it to the next version of VC-MP
Good joke, VCMP team is laaaazy....

I think VRocker, Juppi and Knight2k9 can hax this :).

Website online:
My YT channel: http://www.youtube.com/user/1234sdg131

VRocker

  • Liberty Unleashed Developer
  • Administrator
  • Full Member
  • ******
  • Posts: 342
  • Karma: +43/-15
    • View Profile
    • Madnight Software
Re: New VC:MP Server (With Squirrel!)
« Reply #17 on: June 19, 2009, 12:58:17 am »
umm that original idea is very possible in squirrel... since onPlayerPart sends a reason ID just as mirc does. Although its a bad way of detecting crashes, since some time people really do just time out.

Its not possible to change the ammunation text without modifying the client, which would involve a big rewrite and ould then turn it into something thats not vcmp anymore. It cannot be done via the server anyway.


NC

  • Full Member
  • ***
  • Posts: 101
  • Karma: +2/-3
  • cipa
    • View Profile
Re: New VC:MP Server (With Squirrel!)
« Reply #18 on: June 19, 2009, 09:39:06 pm »
some time people really do just time out.

For me timeout means Crash or Lost connection. I dont see any other reasons, why a player should time out and quit the server.

I think i found a bug in the vcmp.settime $1 <HOUR> <MINUTE>. If i set e.g. 20 06, the hour changes only to 20, but minutes are still the same...
Code: [Select]
vcmp.settime $1 $4 $5
Ym, what a pity with this Ammu text ;(.

Ok, now only i need to have the 2 answers to my post from the 1st page :).

Or... The respawn pickup in squirrel still doesnt work for me. Adtec and Force tried to help me, but it doesnt respawn :/.

I made this code for test:
Code: [Select]
function onPickupPickedUp( player, pickup ) {
if( pickup.Model == 366 ) {
Message( "omg its a " + pickup.Model );
}
}
And this works, but where i have to put now the respawn stuff? After a time delay ofc :).

Solved after few hmm hours :P... Here the code for some other nubs :D
Code: [Select]
  if ( pickup.Model == ID ) {
    MessagePlayer( "bla bla", player );
    pickup.RespawnTime = 3;
  }
« Last Edit: June 27, 2009, 11:03:29 am by NC »

Website online:
My YT channel: http://www.youtube.com/user/1234sdg131

VRocker

  • Liberty Unleashed Developer
  • Administrator
  • Full Member
  • ******
  • Posts: 342
  • Karma: +43/-15
    • View Profile
    • Madnight Software
Re: New VC:MP Server (With Squirrel!)
« Reply #19 on: June 29, 2009, 10:59:39 am »
Just a quick update. Me and Juppi have fixed a couple of things in the server since the last post.

  • Fixed a crash relating to animation ID 32
  • Fixed sending messages with Squirrel under onPlayerChat could cause messages appearing above the command in remote players windows
  • Fixed a bug in SetPlayerWeapon in the mIRC dll not setting the ammo
  • Fixed a bug in CreatePickup, RespawnPickup and AnnounceAll in the mIRC DLL sometimes not sending to all players
  • Fixed some silly spelling error on Brass Knuckles

Remember if you find any bugs, please let us know and we will fix them as soon as we can :)

Edit: Fixed the SetTime bug in the rcon in the windows server. Found it just after i closed the linux server so it will be compiled at another time.
« Last Edit: June 29, 2009, 11:19:43 am by VRocker »


NC

  • Full Member
  • ***
  • Posts: 101
  • Karma: +2/-3
  • cipa
    • View Profile
Re: New VC:MP Server (With Squirrel!)
« Reply #20 on: June 29, 2009, 01:20:22 pm »
Bugs:
1. Split returns an array error :@

This was an example from Squirrel's web page
Code: [Select]
eg.
local a = split("1.2-3;4/5",".-/;");
// the result will be  [1,2,3,4,5]

2. Kick on Join or on Spawn = auto closing the Server :(

In this example, it was a kick when the Nickname is a number. My code:
Code: [Select]
if ( IsNum( player.Name ) ) {
 Message( "** Auto-kick " + player.Name + ", bla bla." );
    Announce( "Kick: nick", player );
 KickPlayer( player );
 }
But what funny, if I use a timer e.g.
Code: [Select]
NewTimer( "KickPlayer", 600, 1, player );The server is not auto closing.

3. HP decreasing bug  ???
I made a goto cmd, but if someone use it, immediately HP is decreasing by 20%, e.g. from 100% hp -> 80% hp, from 77% hp -> 57% hp, but if a player has less then 20% hp...


And sometimes, the player is flying in the air (classic vcmp bug).
Code: [Select]
player.Health = ( player.Health - 20 );
4. Small spelling bugs:
From the get weapon name from id:
id 32 returns m60, should be M60 :D
id 30 was probably Rocketlauncer, should be Rocket Launcher

5. Counting players on player part
If im leaving the server, then it's empty :P. But i used the GetPlayers() in the Part function, and this returns 1 player :(. I know, a small bug but maybe its worth to report :).

Help :) :
1. From Squirrels web page:
Code: [Select]
RAND_MAX

the maximum value that can be returned by the rand() function
But how to set the RAND_MAX to e.g. 10? I found something about RAND_MAX on a C forum :) but the 1st random number is always the same :/.
Code: [Select]
local max = 10;
    local asd = (rand() % max) + NUMBER;

2. Again Squirrels web page:
Code: [Select]
date([time], [format]);

returns a table containing a date/time splitted in the slots:

sec Seconds after minute (0 - 59).
min Minutes after hour (0 - 59).
hour Hours since midnight (0 - 23).
day Day of month (1 - 31).
month Month (0 - 11; January = 0).
year Year (current year).
wday Day of week (0 - 6; Sunday = 0).
yday Day of year (0 - 365; January 1 = 0).

if time is omitted the current time is used.
if format can be 'l' local time or 'u' UTC time, if omitted is defaulted as 'l'(local time).
But every time i tried smthing, nothing happend  :-[ . Maybe someone could say how does the code look like, to return HOUR:MINUTE ?

Suggestions:
1. I made now 500 squirrel code lines ^^ but i would like to echo irc some actions like: after setting weather with a "squirreled" cmd, the Message [e.g. Admin player.Name has changed weather ID to...] could be echoed. Maybe a print2 or smthing :) ?

2. I'm trying to do the register and login stuff. I dont think about INI, cause for many players, could work slowly, SQL in some way dont worked for my (the sample code, if i typed /c stats only was: Stats for player, but nothing else, and if i pasted the sample cmd into a new main.nut, worked  :-\ ), so i was thinking about the XML stuff. Is this a good choice :P ? And if yes, i would be happy if someone could in the next days or weeks describe it in the wiki.

3. After all i like the WeatherRate :) . But it would be cool, if i could set, what weather IDs can be included in this WeatherRate. Here an example [server.conf]:
Quote
<WeatherRate>NUMBER</WeatherRate> // if not set use default
<WeatherRateNextChoose>FROM FIRST TO LAST/RANDOM </WeatherRateNextChoose>// if not set = default, if random, the next weather ID will be one of this bellow
---skins, pickups stuff---
<Weather ID="ID" TimeRateToChangeThisWeather="AFTER HOW MANY SECS THE WEATHER WILL BE CHANGED, IF DEFAULT=USE NUMBER FROM WEATHER RATE"/> // if the function [?] <WeatherID> not found, use default weather IDs from server, but if this set, the WeatherRate will choose the IDs from <WeatherID>
<Weather.... />
<Weather.... />
 

Cause i would like that WeatherRate changes the weather also to some experimental IDs like "5426", which worked pretty good, not like on baka's server ><.

4. To squirrels function:
GetSpeed( player );
Getting the speed in mph that everyone can easy convert to kmh or something else.
GetDistance( player, plr ); or ( player, Vector( XYZ ) ); to say e.g. how far is the player from Respawn point
In meters ofc :)
GetIdleTime( player );
In secs.

5. To the KeyBind:
OnFootActionKey <TAB>
And maybe a useless vehicle key, cause i have a great idea for a key bind in vehicle, but the key should be useless and working both for driver and passenger. Is there someone :P ? Maybe also action key?

Thx for reading :D

Edited this post 20 times or more :D
« Last Edit: June 29, 2009, 09:05:50 pm by NC »

Website online:
My YT channel: http://www.youtube.com/user/1234sdg131

Juppi

  • Developer
  • Jr. Member
  • *****
  • Posts: 86
  • Karma: +3/-1
    • View Profile
    • Kuslahden alaste GTA:MP clan
Re: New VC:MP Server (With Squirrel!)
« Reply #21 on: June 29, 2009, 11:45:33 pm »
1. is not a bug; a will be the pointer to the created array so you cant print the contents of the array just like that. Instead, you can print whats in the array slots, for example print( a[0] );

2. didnt manage to re-create this, tried your script but the server was still online; someone might look into it later. Using a timer might be a good idea if this keeps happening

3. is not really a bug either, if you do health - 20 when health is <20 then the result will be negative, and since the health is an unsigned char it will go to 200 something which VC:MP will round to 100. You could fix this in your script by doing something like
Code: (squirrel) [Select]
local hp = player.Health - 20;
player.Health = hp<0 ? 0 : hp;

4. Those were copied from the old multi-dll, might be fixed in the next server update if anyone bothers to fix them *hides*

5. GetPlayers() returns the current count in player pool, and since the leaving player has not been removed yet (cant remove or the script couldnt get his info!) the function returns the player count just BEFORE the player leaves. Easily compensated by doing GetPlayers() - 1 :P



1. You cant change the RAND_MAX value afaik, however you can manipulate the values like you show in the code, by taking modulo ( rand() % max ). That shouldnt return same values.

2. date() is part of the system library which hasnt been implemented into the server. However there is GetFullTime(), which returns both date and time in the same form than mIRC $fulldate does. You can grab the time token from it



1. If you have an irc echo script, why not just echo the message when using the command..? That way you could also customise the colours etc for each command :P

2. Depends how big your server is, SQLite is the best choise especially if your server and the account number is big, however you can also use SQLite improperly. XML is better than ini because the functions implemented into the server load the file into memory and edit it there till you save it, unlike the ini funcs which keep reading and writing the file over and over again.

3. Well you could script your own weather change system, for example use a timer which continuously changes the weather and reads the pre-defined weather id's from an array or something like that.

4. A distance function is relatively easy to script:

Code: (squirrel) [Select]
function GetDistance( v1, v2 )
{
return sqrt( (v2.x-v1.x)*(v2.x-v1.x) + (v2.y-v1.y)*(v2.y-v1.y) + (v2.z-v1.z)*(v2.z-v1.z) );
}

// Example: prints player distance to (0,0,0)
print( GetDistance( player.Pos, Vector( 0, 0, 0 ) ) );

Speed could also be scripted, check how far player has moved on a certain time, divide that by the time (could use a constant timer for that). We had a similar speedo on MDR at some point, however a serverside speedo can never be as accurate as a clientside one would be.

5. All the possible keys are already listed on the wiki, those are all the keys that can be retrieved from the sync data. You'll have to use them. Adding more keys would include editing the client (and would be pointless for syncing the movements anyways)
« Last Edit: June 29, 2009, 11:48:33 pm by Juppi »

NC

  • Full Member
  • ***
  • Posts: 101
  • Karma: +2/-3
  • cipa
    • View Profile
Re: New VC:MP Server (With Squirrel!)
« Reply #22 on: June 30, 2009, 01:54:41 pm »
Well thx for the answers :D.

I have tried to do a very stupid script: on player join auto kick. And the server wasnt shutting down  :o . Hmm so i guess i have smthing broken in my script [but reload_scripts works  ;) ]. Anyway the timer solve it. From beginning i have tried to kick the player after 20 ms, so the player only saw the Kaufman Cabs interior and auto quitted without any msg :D.

Quote
when health is <20 then the result will be negative, and since the health is an unsigned char it will go to 200 something which VC:MP will round to 100.

Hmm i dont remember now, but i have a similar one command in the mirc script with old dll and havent got this problem. Anyway ur code works :).

Quote
You cant change the RAND_MAX value afaik

Pff so who needs this RAND_MAX if its useless  ::) ?

If i use the code for RAND e.g. on scripts load, then ok, every time is another number. But im making a Weapon Crates. It will give the player a weap ID X-Y. And everytime i pick the pickup, restart server and again pick it, they r still the same weap ids.
Example:
Server start.
Crate 1 -> ID 20
Crate 2 -> ID 30
Restart server
Crate 1 -> ID 20
Crate 2 -> ID 30
So not very randomly, but the same code used on scripts load gives always a new number....

Btw. Grenades and remote grenades are also crashy like on baka's server?

I have tried GetFullTime, yeah works good, but it returns too many informations like day of week or year :P. One time ago i wanted to do in mIRC a time synchronizer [ local host time -> game time ]. So i done vcmp.settime $1 $asctime(ymm hours?) and $asctime(for minutes). So if the library wasnt implented, im not able to do this in squirrel :( ?

Quote
If you have an irc echo script, why not just echo the message when using the command..? That way you could also customise the colours etc for each command

Ym... /me blames my english teacher :P
Cause if i made in mIRC a vcmp.say thing, it was echoed on the chan. If i do Message (); in squirrel, its not echoed [but visible in game] and i would like to echo it :P. Ofc i could do a cmd in squirrel e.g. /c test and do the same in mIRC but only visible in chan [ msg $chan bla bla ], but i think it would be more complicated then useful.

Quote
if your server and the account number is big

Hmm im not trying to do a second LW or XE :D.

Quote
Well you could script your own weather change system,

Too lazy for difficult scripts :P. Im now playing with squirrels "while" to teleport all players to me etc. Btw. the weather rate uses all weather IDs from 0 to 9?

Quote
A distance function is relatively easy to script:

Ymm yeah REALLY EASY after i saw the code :D. But anyway it should be as a Squirrel functions, because other nubs would like to use it too i guess ;).

Ah and final question  8) . On another topic VRocker said, how squirrel is good, briliant, easy and good for game scripts or smthing like that. But why when i type "squirrel lang" in google i dont get much results? And if i type "squirrel" i see more informations about this animal from the forest :P. I already saw forums for help with PAWN, LUA, C, C++, C-- :P scripting, but nothing about Squirrel [ok, one forum this at the official web page ^^].

HOLY! After few hours server on, played on LW... I think, before i shuted down and started again the server, so...

[CTRL+ALT+DEL]

Ym and yeah, i ve got this "Unknown player" bug. After this, i couldnt join the server no more :(.
« Last Edit: July 02, 2009, 10:18:00 pm by NC »

Website online:
My YT channel: http://www.youtube.com/user/1234sdg131

MexikanoS

  • Newbie
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: New VC:MP Server (With Squirrel!)
« Reply #23 on: August 11, 2009, 09:17:15 pm »
Hello! I want ask you about .ini files. I want make the command !savepos and !loadpos (i have maked for load with car etc.) But im making command like this: When i will bail from another vehicle but i've saved position in this vehicle i will back to my vehicle, but I don't know what .ini file i should use to save my own car ID :-\ Thanks for help guys! :)

VRocker

  • Liberty Unleashed Developer
  • Administrator
  • Full Member
  • ******
  • Posts: 342
  • Karma: +43/-15
    • View Profile
    • Madnight Software
Re: New VC:MP Server (With Squirrel!)
« Reply #24 on: August 27, 2009, 10:10:18 am »
Just got around to updating the server. Fixed quite a few bugs that were brought to my attention.

This includes:
  • Fixed a name length crash where you could crash the server with a long nickname
  • Fixed AnnounceAll not sending to all users
  • Fixed Team Chat
  • Fixed 'onPlayerVehicleEnter' calling for the driver when a passenger exits the vehicle
  • Muting now also affects private messages
  • Various other misc fixes

I have also added PrivMessageAll, and fixed script stuff happening before remote clients receive any data.
For example:
Quote
<script> Your health: 100%
VRocker: !health


On another note, the project has been updated to use Visual Studio 2008 SP1, so you'd need these runtimes if you dont have them already. They can be found Here

Thanks to everyone for finding these bugs and letting us know :)


NC

  • Full Member
  • ***
  • Posts: 101
  • Karma: +2/-3
  • cipa
    • View Profile
Re: New VC:MP Server (With Squirrel!)
« Reply #25 on: September 13, 2009, 08:13:50 pm »
New suggestions * snap *

I think this is possible to do :P:

* GetHowManyPlayersAreInTheVehicle( vehicle's id)
Returns the number of players in a vehicle. I think its quite simple to script it [using while and checking how many times the player.Vehicle.ID will be the same as the number in ( ) ]. But i think if this will be a default Squirrel function, it could by used by many scripters [like for a check before using vehicle.Respawn, that is crashy ^ ]

* GetServerBuildDate
Returns the date when the server was compiled like 13/09/09. Can be useful for checking if our server hoster has updated teh server :P.

And this isnt probably possible ;)

* MovePlayerToSeat( player, seat number )
Moves the player to a seat. It was possible in VC single player [in the rob bank mission, botz in car have changed they seats].

* ChangePlayerName( player, newname )
In MTA SA is a command /nick newnick that changes our nick, and after this is a message Name is now know as NewName [similar to irc]. I think the server is holding all players nicknames, then why dont enable to change it :)?

* ChangePlayerTeam( player, Teamid )
Changing players team.
And questions:

Juppi said
Quote
Instead, you can print whats in the array slots, for example print( a[0] );
Ok and now i wanna make a /c kick command with NICK + REASON. Nick will be lets say in the array slot a[0]. But i cant specify how many words will be for the REASON. Then i would need something like "print everything from a[1] to end". Is this in some way possible?

From google code:
Quote
bool SetVehicleIndestructible( vehicle pVehicle )
I dont see this in the wiki. Is it possible to set some vehicles indestructible? And if yes: how?

From ini saving:
Quote
[bla bla]
AoDNC = 1234
Instead of [ and ], my nickname is saved as a - and a circle v_v. If i wanna print the content of the ini file with message, it returns AoD NC [without everything]. Is this a bug, that to ini arent saved [ and ]?

Website online:
My YT channel: http://www.youtube.com/user/1234sdg131

Juppi

  • Developer
  • Jr. Member
  • *****
  • Posts: 86
  • Karma: +3/-1
    • View Profile
    • Kuslahden alaste GTA:MP clan
Re: New VC:MP Server (With Squirrel!)
« Reply #26 on: September 13, 2009, 09:48:10 pm »
* GetHowManyPlayersAreInTheVehicle( vehicle's id)
Returns the number of players in a vehicle. I think its quite simple to script it [using while and checking how many times the player.Vehicle.ID will be the same as the number in ( ) ]. But i think if this will be a default Squirrel function, it could by used by many scripters [like for a check before using vehicle.Respawn, that is crashy ^ ]


Hmm that could be possible, i could take a look the next time i'm editing the code (no guarantees when that would be, LU still comes before this project D:)

* GetServerBuildDate
Returns the date when the server was compiled like 13/09/09. Can be useful for checking if our server hoster has updated teh server :P.


That could be useful if there was only one main build available. Now its possible that there are different builds from different people using random revisions of the code, so the server build date wouldnt tell much about the server.

* MovePlayerToSeat( player, seat number )
Moves the player to a seat. It was possible in VC single player [in the rob bank mission, botz in car have changed they seats].


That is not possible to do for the player that should be moved (no clientside code)

* ChangePlayerName( player, newname )
In MTA SA is a command /nick newnick that changes our nick, and after this is a message Name is now know as NewName [similar to irc]. I think the server is holding all players nicknames, then why dont enable to change it :)?


Same problem, no clientside code - it would work for players who join the server after the nick has been changed but not for the players who are currently online.

* ChangePlayerTeam( player, Teamid )
Changing players team.


Not possible since team data is only sent on player spawn.

Juppi said
Quote
Instead, you can print whats in the array slots, for example print( a[0] );

Ok and now i wanna make a /c kick command with NICK + REASON. Nick will be lets say in the array slot a[0]. But i cant specify how many words will be for the REASON. Then i would need something like "print everything from a[1] to end". Is this in some way possible?


You can get array length with a.len(). So you could make a gettok command which gets the tokens from 1 to a.len(), merges them and returns the result as a string.

From google code:
Quote
bool SetVehicleIndestructible( vehicle pVehicle )

I dont see this in the wiki. Is it possible to set some vehicles indestructible? And if yes: how?


That list is outdated, all the current functions are listed here: http://liberty-unleashed.co.uk/VCWiki/Scripting/squirrel
There was a command to set vehicles indestructible, but it was buggy (didnt work always due to VCMP's fail vehicle hp code) so i removed the command. You could try setting different values for vehicle health using vehicle.Health

From ini saving:
Quote
[bla bla]
AoDNC = 1234

Instead of [ and ], my nickname is saved as a - and a circle v_v. If i wanna print the content of the ini file with message, it returns AoD NC [without everything]. Is this a bug, that to ini arent saved [ and ]?


That seems to be a bug. There had to be some changes in the ini save code since [blah] means a new ini section and clan tags interfered with that, so [] was replaced with different characters. It should return [] though, someone will take a look at that later
« Last Edit: September 13, 2009, 09:50:10 pm by Juppi »

VRocker

  • Liberty Unleashed Developer
  • Administrator
  • Full Member
  • ******
  • Posts: 342
  • Karma: +43/-15
    • View Profile
    • Madnight Software
Re: New VC:MP Server (With Squirrel!)
« Reply #27 on: September 13, 2009, 10:19:39 pm »
With regards to the ini thing, its not a bug. As juppi said, [ and ] in ini files will mean that it will get parsed as a new section, so [AoD]NC would mean it would need to read section AoD with the value NC, meaning the init file gets royally screwed. This happens in mirc too btw.

The solution was to replace any []'s with rarely used characters in the values stored. The server will re-parse these when reading so you can still ask it to read [AoD]NC and it will read the AoDNC part.


NC

  • Full Member
  • ***
  • Posts: 101
  • Karma: +2/-3
  • cipa
    • View Profile
Re: New VC:MP Server (With Squirrel!)
« Reply #28 on: September 14, 2009, 10:30:47 pm »
Quote
That could be useful if there was only one main build available.


Hmm...

Quote
Squirrel is a high level imperative/OO programming language, designed to be a powerful scripting tool that fits in the size, memory bandwidth, and real-time requirements of applications like games.

Then it must be a way to read this stuff! :P



For example my IM [coded in... eek dunno :P ] is able to check what browser i have as default and whats the browser version.

Quote
That is not possible to do

;(. Hoping this will be possible to do in LU/VU :P.

Quote
This happens in mirc too btw.

But in mirc [ ] is replaced by ~ and ~. This looks better then a circle and - :).

Quote
The solution was to replace any []'s with rarely used characters in the values stored.

mmm...

Ok here new suggestions :P.

This will be useful for admins that likes banning players >:D.
* IsIpBanned( string? )
Checks the ban list for the entered ip and returns true or false. E.g. if i banned 127.0.0.1 and type /c isbanned 127.0.0.1 will return TRUE... But typing only 127.0 will returns false :P.

This can be used as an alternative form for respawning vehicle
* vehicle.StartPos
Returns or sets the vehicle pos to his originally from the Server.conf.
One time i entered the server and i said "WTF". All cars were placed in a line [yeah i have done a spawnall x/y/z command]. But the angles from cars were different [not always 0^ like in VCMP] and a few cars werent in the line... Everytime i joined an empty server the car were in a line. I have done the respawn stuff, every vehicle got his right pos, but if the server was again empty, vehicles has auto moved back! :(.

Website online:
My YT channel: http://www.youtube.com/user/1234sdg131

jansi

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: New VC:MP Server (With Squirrel!)
« Reply #29 on: October 11, 2009, 02:10:00 am »
Hello!
These suggestions goes as well to the LU but since VCMP server is where I can work with the squirrel, i'm posting it here :p

It would be nice to have:

1. A way to split the script in many smaller files instead of keeping it all in one huge file.
I have a class that is used by the main script and I'd like to keep this class in a separate file, but if I do this:
Code: [Select]
<script>myclass.nut</script>
<script>myscript.nut</script>
the main script refuses to work (specifically the functions that are using this class). It looks like scripts doesn't 'see' each other.

2. Ability to connect squirrel scripts to remote servers - the same principle as it is now with mirc scripts:
[ Location A: Some computer + Script X ] ----> [ Location B: Server (+ optional Script Y) ]
I know about the .dll for mirc and this server but... that's not for squirrel :p

3. Currently not so important in my eyes: loading/unloading scripts dynamically (without changing server.conf).
Like, if today is wednesday (or the weather is rainy) i'm going to use Script1, but on the other days - Script2.
EDIT: With this it will be possible to reload scripts without restarting the server.


And if there is already a solution for any of these things, I'd like to hear them :]

EDIT: I've found something that looks like a small bug:
The server crashes if I use this script and type "asd " in the console (without the quotes and with exactly one space). If there are 2 or more spaces, everything is ok.
Code: [Select]
function onConsoleInput( cmd, text ) {
  if ( cmd == "asd" )
    if ( text )
      local a = split( text, " " );
}
And the funny thing is that these functions do the same thing, but doesn't crash the server.
Code: [Select]
function onPlayerChat( player, text ) {
  if ( text )
    local a = split( text, " " );
}
function onPlayerCommand( player, cmd, text ) {
  if ( cmd == "asd" )
    if ( text )
      local a = split( text, " " );
}
« Last Edit: October 11, 2009, 05:39:51 pm by jansi »

 

© Liberty Unleashed Team.