Liberty Unleashed

Scripting => Script Releases => Topic started by: VRocker on June 28, 2011, 11:40:10 pm

Title: VRockers Base Scripts
Post by: VRocker on June 28, 2011, 11:40:10 pm
The last 2 days i have been working on a set of scripts for an idea i had, and thought i would share the base stuff with the community.

Note: These are not finished scripts and are intended as a base or as learning material. You should add your own commands for your own functionality

The scripts include the following:


The commands that are currently implemented are:

It can be downloaded Here (http://liberty-unleashed.co.uk/Scripts/VBS.zip)

Hopefully these can help some people with their scripts :)
Title: Re: VRockers Base Scripts
Post by: bl0x0ld on June 29, 2011, 01:26:04 am
Awesome!, now all you need to do is make a small tut for nubs like me so we can do this too =D
Title: Re: VRockers Base Scripts
Post by: Thijn on June 29, 2011, 11:40:31 am
You can't really make a tutorial about scripting. You need to learn it by watching scripts like these and try to understand the syntax and maybe even make your own commands (or at least try to, we can always help you if you're stuck). Just don't start with too difficult commands and you'll learn fast.

(That's what I do at least...)

EDIT: Forgot to say, Nice work VRocker!
Title: Re: VRockers Base Scripts
Post by: Windlord on June 29, 2011, 07:33:41 pm
Nice :)

I like how there's plenty of spaces between bits of the code as well :D
Title: Re: VRockers Base Scripts
Post by: Knucis on June 30, 2011, 01:37:53 pm
Nice! Looks awesome!
Title: Re: VRockers Base Scripts
Post by: matheo on July 07, 2011, 02:43:11 pm
Lol very nice script vrocker !
Title: Re: VRockers Base Scripts
Post by: Laura on July 30, 2011, 05:14:34 am
Recently downloaded this, added to my server, and made my own commands in a separate .nut, made sure it would load, and it didn't work. It conflicted with the registration/login system. Any idea what I'm doing wrong?
Title: Re: VRockers Base Scripts
Post by: VRocker on July 30, 2011, 01:38:31 pm
If you are using onPlayerCommand in your new script then using dofile in another script to include it, the onPlayerCommand will override the one in these scripts.

If you look in Commands.nut you will see i forward the command to other scripts with calls such as ProcessAdminCommands.
If you change the onPlayerCommand in your script to something like ProcessMyCommands then call them in Commands.nut, you should have no problems :)
Title: Re: VRockers Base Scripts
Post by: Jan on July 30, 2011, 02:30:27 pm
I cant add myself as lvl 6, it gets reset back to lvl 0
Title: Re: VRockers Base Scripts
Post by: VRocker on July 30, 2011, 02:33:08 pm
You need to modify the hsh file when the server isn't running or the script isnt loaded, otherwise the server will overwrite it when you close it or when a player joins.
Title: Re: VRockers Base Scripts
Post by: Jan on July 30, 2011, 02:38:34 pm
When i try to spawn a car it only asks for ID not as normal Name (only ID) anyway how to fix it and the 2nd thing is it spams Invalid Command when i spam /wep (id) How to fix both of em?
Title: Re: VRockers Base Scripts
Post by: VRocker on July 30, 2011, 02:50:04 pm
When i try to spawn a car it only asks for ID not as normal Name (only ID) anyway how to fix it and the 2nd thing is it spams Invalid Command when i spam /wep (id) How to fix both of em?

To spawn a car based on the name, you can use the function GetVehicleIDFromName. Heres an example:

Code: (squirrel) [Select]
if ( cmd == "spawncar" )
{
if ( IsNum( args ) )
{
// an ID was entered
CreateVehicle( args.tointeger(), plr.Pos, plr.Angle );
MessagePlayer( "Created vehicle with model " + args, plr );
}
else
{
local vehid = GetVehicleIDFromName( args );
CreateVehicle( vehid, plr.Pos, plr.Angle );
MessagePlayer( "Created vehicle with model " + vehid, plr );
}
}

To stop it saying Invalid command, make the function you called return 1; like i have done in my commands.
Title: Re: VRockers Base Scripts
Post by: Bob on November 24, 2011, 02:18:57 am
Very good, I've been interested in looking into scripting for LU servers more recently so its great to have some material to start with and learn from.

EDIT:  I'm getting LoadScripts() and onScriptLoad() error on Functions.nut at line 14 and Main.nut at line 23. I don't understand programming right now so I'm not sure why. I haven't edited the files.

Fixed it lol.
Title: Re: VRockers Base Scripts
Post by: Thomas1907 on April 28, 2012, 04:23:22 pm
Hey , if i set my level to level 6 in the levels.hsh
It says im level -1 ? How to fix this?
Also, i havent set autologin or anything, i think that happens with ip ?
(http://s14.postimage.org/kvutxc5wx/Fout.png)
Title: Re: VRockers Base Scripts
Post by: Thomas1907 on April 29, 2012, 03:25:44 pm
Level -1 means unregistered player, level 0 is registered player.
When you are changing your level the server must be closed but make sure that you registered previously.
I registered yes, (/register password) and then go outgame, and stop the server, i go in the levels file, and then change 0 to 6 at my name, whats the problem there?
Title: Re: VRockers Base Scripts
Post by: mimomohamed on May 18, 2012, 06:07:19 pm
that problem happend with me and the fix of it

1: re reg
2:u will find ur name in the Levels.hsh
3:if the name is ( XXXXX0 )
Change the 0 by replacing it don't delete replace !! by pointin on it
like this (http://www.mlfnt.com/lives6/13373572211.jpg)
Title: Re: VRockers Base Scripts
Post by: Thijn on May 18, 2012, 09:56:41 pm
that problem happend with me and the fix of it

1: re reg
2:u will find ur name in the Levels.hsh
3:if the name is ( XXXXX0 )
Change the 0 by replacing it don't delete replace !! by pointin on it
like this ([url]http://www.mlfnt.com/lives6/13373572211.jpg[/url])

Or use a proper editor like Notepad++
Title: Re: VRockers Base Scripts
Post by: WheatleyGAMING on January 12, 2016, 08:36:52 am
How do you become admin? I set the thing to 6 in control.XML but it comes up a minus 1
Title: Re: VRockers Base Scripts
Post by: Mötley on January 12, 2016, 09:06:21 am
How do you become admin? I set the thing to 6 in control.XML but it comes up a minus 1
You must start the server and register then shut it down and manually change your level in folder accounts/levels.  then save,
#BTW#Make sure to look on Google for Notepad++ works good for Lu
Title: Re: VRockers Base Scripts
Post by: WheatleyGAMING on January 27, 2016, 12:23:21 am
How do you become admin? I set the thing to 6 in control.XML but it comes up a minus 1
You must start the server and register then shut it down and manually change your level in folder accounts/levels.  then save,
#BTW#Make sure to look on Google for Notepad++ works good for Lu

Thank you so much :D It was cause I wasnt using Notepad++, You are amazing ^-^ :D
Title: Re: VRockers Base Scripts
Post by: RealAnderi on March 30, 2017, 07:07:14 am
                                  Bringing up this topic back, sorry about that.

Anyways. Vrocker can you realese the 64-bit version of the modules?