I coded this out of randomness. 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
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...