I see. Also:
$Rules::File="Add-Ons/Script_GRules/Rules.txt"; //File path for loading
function LoadRules(%f)
{
%FO=new FileObject(); //FileObject, so you can read it
%FO.openForRead(%f);
$Rules::Title=%FO.readLine(); //Read the first line for the title
$Rules::Text=%FO.readLine(); //Read the next for the rules
while(!%fo.isEOF())
{
$Rules::Text=$Rules::Text NL %FO.readLine(); //For more rules, until you reach the end of the file
}
%FO.close(); //Close, then delete the fileObject.
%FO.delete();
}
LoadRules($Rules::File); //Actually load the rules
package Rules_Server
{
function gameconnection::OnClientEnterGame(%this,%a,%b,%c,%d,%e) //When they enter, the gui pops up.
{
schedule(1000,0,commandToClient,%this,'MessageBoxOK',$Rules::Title,$Rules::Text);
Parent::OnClientEnterGame(%this,%a,%b,%c,%d,%e);
}
};
Activatepackage(Rules_Server);
function ServerCmdRules(%client,%a,%b,%c,%d,%e) //Send them the rules if they want to see it, what the hell is with the %a,%b,%c, etc ?
{
commandToClient(%client,'MessageBoxOK',$Rules::Title,$Rules::Text);
}
function ServerCmdRulesAll(%client,%a,%b,%c,%d,%e) //Sends the rulees to everyone
{
if(%client.isSuperAdmin) //check for supr admin
{
commandToAll('MessageBoxOK',$Rules::Title,$Rules::Text); //send the command to all bringing up the rules
}
else
{
messageclient(%client,"","\c0You are not Super admin. Please type \c3/rules \c0for the server rules."); //If their not, show this message.
}
}
I can read code damn well.
Also, sorry about that needing help from nix. but still, its not very amazing.