Liberty Unleashed
Scripting => Script Releases => Topic started 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:
- A basic accounts system
- An admin system with differant admin levels
- An area system similar to Aerons MTA0.5 area system
- A cash and bank system
The commands that are currently implemented are:
- register
- login
- logout
- autologin
- admins
- sun
- cloud
- rain
- fog
- kick
- ban
- setlevel
- setcmdlevel
- cash
- bank
- deposit
- withdraw
- send
- wire
- loc
- p
- del
- savearea
It can be downloaded Here (http://liberty-unleashed.co.uk/Scripts/VBS.zip)
Hopefully these can help some people with their scripts :)
-
Awesome!, now all you need to do is make a small tut for nubs like me so we can do this too =D
-
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!
-
Nice :)
I like how there's plenty of spaces between bits of the code as well :D
-
Nice! Looks awesome!
-
Lol very nice script vrocker !
-
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?
-
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 :)
-
I cant add myself as lvl 6, it gets reset back to lvl 0
-
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.
-
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?
-
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:
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.
-
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.
-
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)
-
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?
-
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)
-
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++
-
How do you become admin? I set the thing to 6 in control.XML but it comes up a minus 1
-
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
-
Bringing up this topic back, sorry about that.
Anyways. Vrocker can you realese the 64-bit version of the modules?