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 4 5
16  Scripting / Script Snippets / Basic /gotoloc, /saveloc command on: September 24, 2016, 09:29:36 pm
Requires the lu_ini Module!

I have not played with a Ini system in sometime.
I wanted to remove hashes from the Worst server and rebuild all of the saved hashes to Ini.

The origanal location system started from,985.msg6245.html#msg6245
Released by Svenko, Unless I'm wrong with the script.

Ini can be rather funny compared to other systems. Others might know this as well.

Hoping someone could find use of this.
:P Enjoy

Code: [Select]
function onScriptLoad() {
  if ( LoadModule("lu_ini")) {
    print( "lu_ini module loaded" );
  else print( "Error: Loading of lu_ini module failed." );


function onPlayerCommand( player, cmd, text ) {

   if ( cmd == "saveloc" ) {
     local x = ReadIniFloat( "Locations.ini", text, "X" ), y = ReadIniFloat( "Locations.ini", text, "Y" ), z = ReadIniFloat( "Locations.ini", text, "Z" );
     if (!x, !y, !z) {
       WriteIniFloat( "Locations.ini", text, "X", player.Pos.x );
       WriteIniFloat( "Locations.ini", text, "Y", player.Pos.y );
       WriteIniFloat( "Locations.ini", text, "Z", player.Pos.z );
       MessagePlayer( "Saved location " + text + ".", player, Colour( 225, 225, 225 ) );
     else MessagePlayer( "The saved location " + text + " already exist!!", player, Colour( 255, 0, 0 ) );

     return true;

  if ( cmd == "gotoloc" ) {
     local x = ReadIniFloat( "Locations.ini", text, "X" ), y = ReadIniFloat( "Locations.ini", text, "Y" ), z = ReadIniFloat( "Locations.ini", text, "Z" );
     if (x,y,z) {
       MessagePlayer( "Going to location " + text + ".", player, Colour( 225, 225, 225 ));
       player.Pos = Vector(x, y, z);
     else MessagePlayer( "Going to location " + text + " FAILED!!", player, Colour( 255, 0, 0 ) );

      return true;

  return false;
17  Liberty Unleashed / Suggestions / GetMaxVehicles on: September 17, 2016, 01:59:27 pm
Topic says it all. I cant really script this myself as there might be more vehicles in the server due to spawned cars in command.
18  Liberty Unleashed / Bug Reports / Client Directory, Cant retreave file to load if to many folders on: September 15, 2016, 01:05:16 am
^Topic basically says it all. So I was working on a system when I thought the build was becoming currupted..

Well anyway hear is the output for the max allowed dirrectory limit

Code: [Select]
<script file="Objects/MapEditor/Main_c.nut" client="1" />
Hear is the Max not allowed limit

Code: [Select]
<script file="Objects/MapEditor/Client/Main_c.nut" client="1" />
No clue as to what could be the cause but this is a little depressing.
19  Scripting / Scripting Discussion / Encrypting text/passwords on: September 03, 2016, 04:31:28 am
So I became curious to creating a better method of encryting passwords, Thats when I began testing.

Well what do you think?

Is there better methods?

As well is it possible to receive this when logging in?

Code: [Select]
password <- "Password";

function onScriptLoad()
        local password = "Password";
        print( "Encrypted text test: " + SHA1(password) + MD5(password) );
The output on print

SCRIPT: Encrypted text test:
20  Scripting / Scripting Discussion / Windlord OMG on: August 24, 2016, 06:36:19 pm

Maybe Ankris will see this.... As well as Vortex

After a deep web search I happened to find this, "Was looking for xml mixed with squirrel in some fashion" When all of a sudden I found these interesting scripts by Windlord.

I would like to leave this topic open for discussion about these scripts
21  Scripting / Scripting Discussion / [Request]For Xml red linked layouts on: August 23, 2016, 02:45:36 pm
Okay topic basically says it all

For every red linked function I would like to see the layout of each function, Instance etc.

Some I have figgured out and I will list the few I remember the rest I will re comment latter on

Code: [Select]
XmlElement.LinkSibling || XmlElement.NextSibling
This is unknown, I really really need this output.
XmlElement.Clear //I forget the output, but it's simple

Please, Developers/Testers this is really needed,.

I would be somewhat most happy to at least see the layout for
Code: [Select]
XmlElement.LinkSibling || XmlElement.NextSibling
22  Liberty Unleashed / Bug Reports / XML help on: August 18, 2016, 07:38:25 am

I really, really would like to think this is a bug, Could sugarD pm Vrocker to see if there is something going on with the xml tutorial?

:P I'm hoping there will be one like the sq lite tutorial.
If not I plan to make one and have more eyes view it to professionalize it.

Okay I have really been studying Extensible Markup Language (xml), I am trying to understand the different wording in the lu wiki "broken wiki links are not helping", I am trying to create a simple account system, If someone could lead me to get the name of the player where I saved the player that would be helpful.

Example of the current layout:

Code: [Select]
        <liberty Name="Jeff" Money="20" Skin="14" Health="50" />
        <liberty Name="Donald" Money="14" Skin="33" Health="45" />
        <liberty Name="Frank" Money="47" Skin="1" Health="95" />

So if I could figure out a way to get the name where player.Name = Name, Then I am very close to getting threw this more "Speeding me threw".

I have a dumb feeling I need to do something similar to an xml 'Entity',

And for in LU I think that might be XmlElement.Text
And that description for lu can be found at
***Broken link**

I think I am doing this all wrong, At another time I am going to do something more of

Code: [Select]
        <liberty Money="20" Skin="14" Health="50" />

This should solve my issue..

Tried. Doesn't update...
23  Scripting / Script Help / Database never updates [Sq-Lite] on: August 01, 2016, 03:35:44 pm
I'm not familiar with sq-lite but i really do not understand why it never updates.

Code: [Select]
function onUpdatePlayerAccount(player, statDB) {
          // format the update query
          local szquery = format( "UPDATE Stats SET Auto_Login=" + Auto_Login[  player.ID ] + ", Kills=" + Kills[  player.ID ] + ", Deaths=" + Deaths[  player.ID ] + ", Money=" + Money[  player.ID ] + ", Bank=" + Bank[  player.ID ] + ", Skin='" + player.Skin + ", Wanted_Level='" + player.WantedLevel + ", Health='" + player.Health + ", Armour='" + player.Armour + "' WHERE Name='" + player.Name + "'" );

          // execute the query
          ::sqlite_query( statDB, szquery );

          MessagePlayer("Done", player);//just a random test

Any guidance is appreciated.

Also I do not receive errors
24  Liberty Unleashed / Support / Port forward a server on: July 11, 2016, 01:05:53 am
So I followed every instruction. I am using linux,.

I even tried the windows server.exe and nothing. I have Xfinity comcast.

The server is setup for UDP. I do not have my tower connected to a Ethernet as I haven't bought the cords or additional hardware for a clean job, I am running wifi at this time, maybe thats the issue?

My browser setup is exact to this so maybe you will see something I do not.

25  Liberty Unleashed / Liberty Unleashed Chat / [Death-Match Expectations] on: July 10, 2016, 06:40:35 pm
This Topic will be reserved for future servers, As well current Death-match servers.

So this topic could use a player base feed back.

What are your expectations of a Death-match server?

I will list a few randomly, Some do not apply there just there.

Every scripter typically builds a great death-match before making there server RPG like.

* Saving cash
* Saving Kills, Deaths, hopefully a KD ratio as well.
* Either a Pay and spray or /fix car commands, Car color commands.
* Hopefully some type of pickups after a player died, Ranging from weapons to cash
* Possibilities of a bank, “some reason the player base loves banks”.
* “NO” empty radar, It's nice when you join a Death-match and you see icons on the radar.
* 8 ball bombing a car, either within a command or  a shop.
* Adding cleo.dll to the anticheat.uac “This blocks the main file for cleo users from being able to join”
* Position saving, “It's a death match but players love to return as if they never left”.
26  Liberty Unleashed / Suggestions / [Request]Player.Vehicle.Alarm on: July 10, 2016, 05:14:04 am
Title says it all.

In case your mind needs a little help  ;).

In story mode you could steal a vehicle and at a generated random time the car alarm would go off and if any near by police you receive a wanted level.

And of course if there was a way to detect the engine state
Code: [Select]
if (player.Vehicle.EngineState == true );Then we wont run that script.
Just a wack modified what if of the code at

Now in a situation of using the Alarm in scripting would possibly be similar to
Code: [Select]
rand() and when that code is called a call back function could be made setting there wanted level in that call back etc,

But of course setting a code like
Code: [Select]
if (player.Vehicle.EngineState == true ); to validate the alarm as we do not want a player entering a already stolen vehicle and receiving an alarm

* I only fear it is not synced, but the cops detect it how ever it was scripted in story mode.
  So what ever is in the main.scm would give off clues I guess.
27  Liberty Unleashed / Support / Saving weapon ammo on: July 07, 2016, 06:28:24 am
Some might think that this is in the wrong board when honestly it's not.

We need our update for saving weapon ammo.

Personally how can I bring more players to LU by sharing the same data from weapon ammo, to kills, deaths etc with vcmp and samp and lu sharing the same data from each server??
I can't really go any further than where I am.

If you want your mod to grow I'd really suggest adding saving weapons.

Please, let's keep the mod alive.
Technically this mod is still in beta format rather the developers believe it or not.
Even though it's truly just a alpha build, nothing else nothing more than alpha.

I'm not being mean when I say this as I honestly care about this mod, As well the world of this multiplayer. I would not be working on this idea if I did not want to see the multilayer succeed. 

Add saving ammo to save this multiplayer.

And with what I am working on should grab players from samp as well vcmp and hopefully bring a community hear by luring them in with rpg big money features to have better cash in the other dm servers.

Please understand why this is important and not only for my server but others as well.
28  Liberty Unleashed / Suggestions / [Request]CreatePickup for client on: July 03, 2016, 04:30:40 am
I would like to see this possible for client scripts for many reasons, One of the reasons would have to be synced hidden packages for only the client to grab. other players can not see these packages or disturb these packages only the user that needs to obtain them..

In the aspect of single player hidden packages.
29  Scripting / Script Help / Hash password, not working in classes on: May 04, 2016, 03:20:06 am
This really bugged me and had me currious as to what is the issues,. Finnaly I removed the hashing of passwords to see what was wrong and nothing was wrong. Its using hashing algorithms in a class.
I try to keep functions out of commands. Does any one have any ideas?
This is not a fix script etc more of how should I do it? hopefully not in the command system.

This is just a play script of mine

Hashes  :P

Code: [Select]
class PlayerClass
// ------------------------------------------------------------------- //
IP = "";
Cash = 0;
Bank = 0;
Kills = 0;
Deaths = 0;
Level = 0;
Password = null;
Logged = false;
// ------------------------------------------------------------------- //
constructor( player )
IP = Accounts.Get( player + " IP" );
        Cash = Accounts.Get( player + " Cash" );
        Bank = Accounts.Get( player + " Bank" );
        Kills = Accounts.Get( player + " Kills" );
        Deaths = Accounts.Get( player + " Deaths" );
        Level = Accounts.Get( player + " Level" );
Password = Accounts.Get( player + " Password" );
Logged = false;

function Join( player )
    if( Level == 0 )
MessagePlayer( "Please register to play.", player );
MessagePlayer( "Register with /register <password>", player );
    else if ( Password )
    // If they are registered, ask for them to login
    if ( Level >= 1 )
MessagePlayer( "Login before spawning! /login <password>", player );
MessagePlayer( "Please login to play.", player );
MessagePlayer( "Login with /login <password>", player );
        function Register( player, text )
    if ( Level >= 1 )
        MessagePlayer( "Error - You are already registered.", player );
        return 1;
         // Otherwise they have logged in succesfully!
         Accounts.Add( player.Name + " Password", text );
         Accounts.Add( player.Name + " Level", 1 );
         Accounts.Add( player.Name + " IP", player.IP );
         Accounts.Add( player.Name + " GOTO", "off" );

         // Then we will add their kills/deaths and cash/bank
         Accounts.Add( player.Name + " Cash", 0 );
                 Accounts.Add( player.Name + " Bank", 0 );
                 Accounts.Add( player.Name + " Kills", 0 );
                 Accounts.Add( player.Name + " Deaths", 0 );
         // Then finally log that player in
         Account[ player.ID ].Logged = true;
         MessagePlayer( "To login to this account type: /login <password>", player );
         MessagePlayer( "You have successfully registered with us!", player );

         // And save the hash files
        function LoginPlayer( player, text )
           if ( Level == 0 )
                  // Player hasn't registered so tell them to do so
          MessagePlayer( "// Error: You do not have an account, register with /register <password>", player );
          return 1;
           if ( Account[ player.ID ].Logged == true )
                  // Player has already logged in
                  MessagePlayer( "// Error: You are already logged in to your account.", player );
          return 1;

           if ( text != Password )
                  // Player has entered wrong password
          MessagePlayer( "Error - Invalid Password.", player ); 
          return 1;
                   // Otherwise they have logged in succesfully!
                   Account[ player.ID ].Logged = true;
                   Account[ player.ID ].Cash = Accounts.Get( player.Name + " Cash" );
                   Account[ player.ID ].Bank = Accounts.Get( player.Name + " Bank" );
                   Account[ player.ID ].Kills = Accounts.Get( player.Name + " Kills" );
                   Account[ player.ID ].Deaths = Accounts.Get( player.Name + " Deaths" );
                   Account[ player.ID ].Level = Accounts.Get( player.Name + " Level" );
          player.Cash = Account[ player.ID ].Cash;
                  MessagePlayer( "You have successfully logged in!", player );
30  Scripting / Script Help / Lowering names on: May 02, 2016, 06:52:41 am
So it appears no matter what I do when using
Code: [Select]
Player.Name.tolower(); It becomes highly exploitable. I can create an account and use Motley, Register, Leave, Use a new user name and make it MOTLEY and there is the exploit I can now load admin setting to what ever I want. Heck I could join any server using it and give the cash to my user and I am rich.

Please anyone else that also has dealt with this or mostly LIKED Is there a fix to this issue?

Maybe This is supposed to be in the concept of

Code: [Select]
else if ( MD5( text ) != Password ) MessagePlayer( "Error - Invalid Password.", player );
And instead get the lowered name? but even FBS and VBS has this stupid exploit(I knew they wouldnt do it wrong). Maybe The squirrel edition needs to be updated?
Pages: 1 [2] 3 4 5
© Liberty Unleashed Team.