Author Topic: Advanced Rules  (Read 19370 times)

and everyone ignored my rules script post when I put it out. This is better though. kinda took the /rulesall thing though.
:cookieMonster:

Gikon >  General Omega

God, this isn't amazing. Any coder worth their salt can read from a text file, and you even needed help from NiX.
Altough this is much cleaner than spamming chat with rules, it isnt the bestest thing in the world.

God, this isn't amazing. Any coder worth their salt can read from a text file, and you even needed help from NiX.
Altough this is much cleaner than spamming chat with rules, it isnt the bestest thing in the world.
Wow your a noob. You do not even know the script works do you?
man you do not know what NiX even helped with.

He had trouble with the GUI. He thought that GUI's are downloaded in V9. Instead I and Nix suggested the MessageboxOK since it is a universal GUI.

He had trouble with the GUI. He thought that GUI's are downloaded in V9. Instead I and Nix suggested the MessageboxOK since it is a universal GUI.
Yup.

Of course, apart from that fact that you could've put it in the console for the client, where they could use the scrollbar, and not risk rules getting cut off in message boxes, the message box is OK.

Of course, apart from that fact that you could've put it in the console for the client, where they could use the scrollbar, and not risk rules getting cut off in message boxes, the message box is OK.
But then they do not see it when they spawn. Its a fact of noobs being lazy.
This forces them to at the lest to see the rules.

I see. Also:
Code: [Select]
$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.

I see. Also:
I can read code damn well.
Also, sorry about that needing help from nix. but still, its not very amazing.
....Lets see if anyone else has done something like this

hmm nope...


Both where from V8 and both did not use a GUI. His is origional in the concept of using an GUI. Others have used other methods but personally I find this to be better.

Both where from V8 and both did not use a GUI. His is origional in the concept of using an GUI. Others have used other methods but personally I find this to be better.
Right on the nail there.

Fair enough. Though, there was a good reason they didn't use a GUI.

Fair enough. Though, there was a good reason they didn't use a GUI.
GUIs do not download. We know.
This gui that I used is PART of blockland already. No download.