Author Topic: How do i add cmds to a server  (Read 87 times)

DonCorleone

  • Full Member
  • ***
  • Posts: 118
  • Karma: +6/-19
  • 90 Xronia original®
    • View Profile
    • https://www.youtube.com/channel/UCP_6YCRd7fD8whagTfQG0UA
How do i add cmds to a server
« on: February 10, 2017, 07:29:32 pm »
Hi again,i would appriciate if someone would help me with scripts i just want to make a plain server :D
Thanks :3
~Don Corleone~

shane221

  • Newbie
  • *
  • Posts: 24
  • Karma: +3/-15
  • I LOVE NY
    • View Profile
    • Shane Iron
Re: How do i add cmds to a server
« Reply #1 on: February 19, 2017, 01:00:31 am »
download from Here~~!
Click:http://liberty-unleashed.co.uk/LUWiki/Scripts!
download LU_FBS_01_R1 or VBS script!
put the script into your script folder!
open Content.XML file in LU folder!
do <script folder="LU_FBS_01_R1" />
open server.conf and configure it!
to add cmds check the LUWIKI!

regards..

Shane!


Mötley

  • Full Member
  • ***
  • Posts: 316
  • Karma: +32/-29
  • Scripter
    • View Profile
Re: How do i add cmds to a server
« Reply #2 on: February 19, 2017, 03:01:10 am »
I coded this out of randomness. :P
A cmd is noting but a function that you can call at anytime, but typically LU server owners use it for players or admin usage.

Banning players, Spawning cars etc etc..

I do not know your previous knowledge of any programing, So I am sorry if you are clueless to this
Code: [Select]
class Char_Class
{
A = 0;
B = 0;
C = 0;
}; //Just a random class

function onPlayerCommand(player, cmd, text)
{
    if ( cmd == "cmd1")
    {
    Random_Char <- [ "A", "B", "C" ];
    Random_Char_Class_ID <- array(2); //Starts from zero not 1
count <- 0;

while(count !=3)
{
print( "The character of " + Random_Char[count] + " class ID: \n" + count );

if ( count == 3) // Last check
{
        print( Random_Char[count] ); // Shows the listed Char
Random_Char_Class_ID[count] = Char_Class(); //Sets the class according to the ID of the character
return true;
}
count++;
}
return true;
    }
   
    return true;
}
Wasn't trying to be fancy, Haven't touched squirrel in some time...
« Last Edit: February 19, 2017, 03:03:44 am by Mötley »

 

© Liberty Unleashed Team.