Liberty Unleashed

Scripting => Script Help => Topic started by: aledark24 on December 09, 2013, 03:39:42 pm

Title: Help :p SQ i hate you :p
Post by: aledark24 on December 09, 2013, 03:39:42 pm
well, as you already said in my other post, i dont know squirrel
then I want to know how to do the following
as my server is not even create from 0, I need to know how to add more commands in a VBS server, because I tried but I did not grab any command and recording system stops working ...
The only thing that works for me is that OnPlayerSpawn, weapons at the beginning but the rest does not work me and the commands are good because I got a database server ..
The other thing I wanted to just give a command of armor, but only if they can help me with it first :p
I use notepad c++
Thank you very much: D
aledark24 pwn scripter in VCMP

-- Post edited, stop using abusive words.
-- Also, it's SQ not SQL, SQL stands for Structured Query Language
Title: Re: Help :p Fucking sql i hate you :p
Post by: Kevin on December 09, 2013, 04:09:27 pm
that script requires??
Title: Re: Help :p Fucking sql i hate you :p
Post by: Merkel on December 09, 2013, 10:38:12 pm
Try FBS (Force's Beginner Scripts) is for newbies in Squirrel, but is very bugged.
Title: Re: Help :p Fucking sql i hate you :p
Post by: aledark24 on December 09, 2013, 11:07:41 pm
Try FBS (Force's Beginner Scripts) is for newbies in Squirrel, but is very bugged.

-_- if is for newbies how i learn well squirrel if this server is very bugged?
Title: Re: Help :p Fucking sql i hate you :p
Post by: Merkel on December 09, 2013, 11:10:29 pm
Try FBS (Force's Beginner Scripts) is for newbies in Squirrel, but is very bugged.

-_- if is for newbies how i learn well squirrel if this server is very bugged?

Read...
Title: Re: Help :p Fucking sql i hate you :p
Post by: Vortrex on December 10, 2013, 06:10:10 pm
well, as you already said in my other post, i dont know squirrel

That's why some of us are here to help.

as my server is not even create from 0, I need to know how to add more commands in a VBS server, because I tried but I did not grab any command and recording system stops working ...

There is a server sided event in LU that detects when a player enters a command.
Take a look here: http://liberty-unleashed.co.uk/LUWiki/Squirrel/Server/Events/Player/onPlayerCommand (http://liberty-unleashed.co.uk/LUWiki/Squirrel/Server/Events/Player/onPlayerCommand)
That link will explain the arguments when using that function.
I would recommend using a switch statement when processing commands.

The only thing that works for me is that OnPlayerSpawn, weapons at the beginning but the rest does not work me and the commands are good because I got a database server ..

I'm glad to see you were able to give a player weapons at spawn. This is progress!
Now, I am a bit confused at your explanation that the "commands are good because it's a database server".
Commands should work with any kind of server.

The other thing I wanted to just give a command of armor, but only if they can help me with it first :p

Take a look at the link I put above to learn the "onPlayerCommand" event.
For now, here is an example:
Code: [Select]
function onPlayerCommand( player , command , parameters )
{
switch( command.tolower( ) )
{
case "armour": // Used to give full armour
player.Armour = 100;
break;

case "health":
player.Health = 100;
break;

default: // This is processed if nothing matches
MessagePlayer("Unknown command. Sorry!" , player , Colour( 255 , 0 , 0 ) );
break;
}
}

I use notepad c++

I assume you mean Notepad++? If so, that's my preference as well.