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

MrDamage

  • Full Member
  • ***
  • Posts: 112
  • Karma: +32/-27
    • View Profile
    • Youtube channel
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

shane_Iron

  • Newbie
  • *
  • Posts: 37
  • Karma: +4/-16
  • 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!


Motley

  • Full Member
  • ***
  • Posts: 253
  • Karma: +32/-34
    • 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.