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 3 ... 6
1  Liberty Unleashed / Liberty Unleashed Chat / Re: VU source code on: January 25, 2014, 03:39:40 pm
The LU devs are now part of the VC:MP dev team (and vice versa), so chances of any VU related news are slim to none. Instead, if you're a VC fan I'd suggest keeping an eye on VC:MP 0.4.

LU-MP released on 25/10/2010 (but the beta version on 2007)

LU, not LU-MP :P
2  Scripting / Script Help / Re: [Request] GetFileList() on: November 23, 2013, 07:15:56 pm
Kinda late, but you shouldn't be downloading and using dll's from random sources.

Thanks Thijn, but now it's missing MSVCR110.dll. It should be probably compiled with the same VC++ redist package as LU has, anyone could recompile it to work without additional thingies please?

You need to install the VS2012 C++ redistributable package from
3  Scripting / Module Releases / Re: Juppi's MySQL Module (lu_mysql) on: October 24, 2013, 10:52:29 pm
There's no 64bit LU server available so a 64bit module would be useless. You're probably missing some dependencies (make sure you have the 32bit versions installed). Try 'ldd', it should tell you what youre missing.
4  Scripting / Script Releases / Re: Fast Cars :D on: August 26, 2013, 08:55:20 am
Having a custom handling.cfg and using Vehicle.SetHandlingData aren't the same thing, handling.cfg affects every vehicle while Vehicle.SetHandlingData overrides those values and sets the data per vehicle.

(but as far as I know it's bugged)

I would like to hear more about this. I've personally used Vehicle.SetHandlingData in the past to edit the vehicle's acceleration (and it worked fine) but it's possible that an update has broken it at some point. So if the function is bugged, can you report it with a minimal script to reproduce the issue?
5  Scripting / Script Help / Re: What are the parameters of onPlayerKeyStateChange ? on: August 09, 2013, 09:48:18 am
onPlayerKeyStateChange only detects GTA's control keys, and it can't be used to detect other keys. For that you'll want to use client-side key binds (BindKey etc.)

The parameters for onPlayerKeyStateChange are a player pointer and two integers, oldkeys and newkeys. These show the current and previous states of the player's GTA controls. For example, if you want to detect whether the fire key was pressed (you can find a list of key constants here)

Code: [Select]
function onPlayerKeyStateChange( player, oldkeys, newkeys )
if ( ( oldkeys & KEY_ONFOOT_FIRE == 0 ) && ( newkeys & KEY_ONFOOT_FIRE != 0 ) )
MessagePlayer( "Fire key pressed", player );
return 1;

Didn't actually test it but it should give you the right idea.
6  Scripting / Module Releases / Re: Juppi's MySQL Module (lu_mysql) on: June 20, 2013, 04:40:12 pm
That error appears because whoever compiled the latest module compiled a debug build, and you can only run it if you have Visual Studio installed (or you can download the debug runtime dll and put it in your server folder however that is NOT recommended).

The solution is to re-build the module in release mode, I'm unfortunately away for the time being and dont have access to a pc with Visual Studio installed, so I'm hoping another dev/tester could perhaps compile and upload the module?
7  Scripting / Script Help / Re: IsLineOfSightClear(?) on: May 19, 2013, 10:23:11 pm
Ah yeah I can confirm that. Hopefully it'll be fixed in the next update
8  Scripting / Script Help / Re: IsLineOfSightClear(?) on: May 19, 2013, 02:21:19 pm
Code: [Select]
bool IsLineOfSightClear( Vector pos1, Vector pos2 [, bool buildings, bool vehicles, bool peds, bool objects, bool transparent, bool ignoreStuff ] )
Test whether the line of sight between two points is clear. Returns false if one of the checks caused a collision, true if the line of sight is clear.

  • pos1 - first point
  • pos2 - second point
  • buildings - check GTA buildings (optional argument, defaults to true)
  • vehicles - check vehicles (optional argument, defaults to true)
  • peds - check peds (right now players, in the future also NPCs) (optional argument, defaults to true)
  • objects - check objects (optional argument, defaults to true)
  • transparent - check transparent stuff, such as glass and windows (optional argument, defaults to false)
  • ignoreStuff - exclude some dynamic stuff from the test (probably crates and barrels) (optional argument, defaults to false)

For the next update I've also added a function which does basically the same check as this one, but it also returns some extra info about the collision. This includes the collision position, object model (useful for finding the model of a GTA object) and possible LU pool info (pointer to player, vehicle, object etc).
9  Liberty Unleashed / Liberty Unleashed Chat / Re: [Random] LU on a tablet on: April 11, 2013, 10:06:55 pm
Is that the mobile version of Win8, or the full one? Last I heard, III didn't run on the mobile one! D:
What if get touch controls from android/ios version and set to your tablet?

That's full Win8 - LU doesn't have a build for mobile devices (Android, iOS or anything else). Since this is the native PC version of GTA3 a touch control system would have to be created using a separate mod.
10  Scripting / Scripting Discussion / Re: Finding letter or word from string? Possible? on: April 10, 2013, 07:21:36 pm
If you only need to filter certain illegal characters this is probably the best method as it only compares single characters instead of strings:

Code: [Select]
function IsValidNick( nick )
for ( local i = 0; i < nick.len(); i++ )
switch ( nick[i] )
case '@':
case '!':
case '#':
case '$':
case '%':
case '^':
case '&':
case '*':
case '(':
case ')':
case '-':
case '`':
case '~':
case '.':
case '-':
case '+':
return false;

return true;

The code is untested but it should work fine. If you need to find whole words then you'd be better off using string.find like Thijn suggested.
11  Scripting / Module Releases / Re: Improved Hashing Module on: April 08, 2013, 02:31:52 pm
Okay, so who remembers mIRC scripting in VCMP where passwords were saved as plain text and no one got a problem with it? :)
Some people also believed that drilling a hole in the head could cure migraine even after the dark ages.

In my opinion MD5 is still secure. You just have to manipulate the saved password with e.g. salt and pass it a few times through the MD5 hashing function and voilĂ , no one will be able to encode it, unless he doesn't know the instructions.
Your method may bring security through obscurity, but it doesn't fix the design flaws in MD5. Anyone determined enough can still use these exploits and crack the hashes. While this might not be a huge problem for something as small as GTA multiplayers, theres no real reason not to choose a more secure method over MD5 when alternatives are available.

12  Liberty Unleashed / Support / Re: Vehicle Respawn Time on: March 15, 2013, 02:22:42 pm
Actually it would cause an integer overflow, a buffer overflow is something completely different. Also it is worth noting is that setting the respawn time to max unsigned integer value wouldn't work in this case due to the way LU handles respawn times internally - they're signed integers, and the internal times are stored in milliseconds (so the user input is multiplied by 1000).

Setting the time to 2147483 or lower should work reliably.

Edit: Technically that doesn't keep the vehicles where they are until the server stops (it's only a couple of weeks, if the server is on longer than that some of the vehicles will respawn). If you want to keep the vehicles where they are for a longer time, you can use Vehicle.SpawnPos and Vehicle.SpawnAngle to force the vehicle to respawn at a given location.
13  Scripting / Module Releases / Re: Improved Hashing Module on: January 06, 2013, 10:30:19 am
Very nice work :)

I would recommend people to replace the default hashing module with this one, no script changes are required since the module is backwards compatible with the old one. (Still, get rid of those MD5'd passwords you all!)
14  Scripting / Script Tutorials / Re: Efficient Scripting.. on: October 17, 2012, 02:45:26 pm
Checking the first character of a command will be a big help performance-wise when your script contains lots of commands. There is also a way to optimise the code even further, and it also makes it a bit simpler.

Strings in Squirrel behave much like strings in C. They're basically arrays of characters, and so you can refer to each character by using the array syntax. To get the first character in a string you would do string[0]. This lets us get rid of the relatively expensive slice() call, and each case will become a single character instead of a string.

Notice the difference - 'a' is the character a while "a" is a string containing the text a. The first one will use less memory and comparing characters will always be cheaper than comparing strings.

Code: [Select]
function onPlayerCommand( player, cmd, params )
switch ( cmd[0] ) // Check the first character of the command
case 'e': // Commands starting with 'e'
if ( cmd == "examplecmd" )
Message("Example command1");
else if ( cmd == "examplecmd2" )
Message("Example command2");

case 'b': // Commands starting with 'b'
if ( cmd == "blah" )

return 1; // Returning is not really required but its a good practice to do so

Edit: Removed the validity check for player and cmd, LU guarantees that those two will always exist (however that's not always the case with params)
15  Scripting / Script Releases / Re: Ramp spawning on: June 12, 2012, 08:22:15 pm
Try now :)
Pages: [1] 2 3 ... 6
© Liberty Unleashed Team.