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
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
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
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:
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)