Author Topic: Age Requirement [6/1/2015]  (Read 4683 times)

Link: http://www.mediafire.com/download/kcnzes55j6v3sr0/Server_MaturityWarning.zip



[Admin Commands]

/SetAgeRating <#> to set the age+ that is required.

/SetAgeRating Group <low#> <high#> to set the required age group.

/AgeRequireHelp to list these commands.
« Last Edit: June 01, 2015, 03:52:03 PM by Soretooth »

[Features]

The player who hasn't agreed yet can not; spawn, talk, or hear.


(Omg so many features)
« Last Edit: May 31, 2015, 06:58:37 AM by Soretooth »



You should never result a package of an important game function with return or nothing, especially gameconnection commands.

Also, you set age like:
$Pref::Server::MaturityWarning = (%rating@"+");
and reference to it like:
messageClient(%client,'',"<color:FFFFFF>You agreed to being at least " @$Pref::Server::MaturityWarning@"+ years of age.");

resulting in [age]++

I like this.
Keep it up.

You should never result a package of an important game function with return or nothing, especially gameconnection commands.

Oops. Updated, hopefully i'm not returning anything anymore. - [12:50 PM (EST)  -  5/30/2015]


Also, you set age like:
$Pref::Server::MaturityWarning = (%rating@"+");
and reference to it like:
messageClient(%client,'',"<color:FFFFFF>You agreed to being at least " @$Pref::Server::MaturityWarning@"+ years of age.");

resulting in [age]++


Updated. Thanks for catching that! - [12:55 PM (EST)] - [Should be working correctly, 1:00 PM (EST)] - [12:50 PM (EST)  -  [5/30/2015]
« Last Edit: May 30, 2015, 12:02:17 PM by Soretooth »

The following code would break seeing player's name's in blue when they're typing since it redirects to the wrong parent function.
Code: [Select]
function ServerCmdStartTalking(%client)
{
if(%client.AcceptedMaturity == 1)
{
parent::ServerCmdStopTalking(%client);
}
}
You have to use parent::ServerCmdStartTalking(%client);

Also, someone can still set a non integer if it's above -1, and  %t = getWord(%msg,0); is useless since it's never used in the script.
« Last Edit: May 30, 2015, 12:06:54 PM by QuadStorm »

The following code would break seeing player's name's in blue when they're typing since it redirects to the wrong parent function.
Code: [Select]
function ServerCmdStartTalking(%client)
{
if(%client.AcceptedMaturity == 1)
{
parent::ServerCmdStopTalking(%client);
}
}
You have to use parent::ServerCmdStartTalking(%client);

Should be fixed now. I copy and pasted the other function and wasn't paying attention to change the parent. Thanks! - [1:04 PM (EST)  -  5/30/2015]

Congrats, we're now teaching kids to lie.
On topic: neat little script, but it's kind of useless, and easy to bypass. If you deny, will you be kicked?

you should really test your add-ons before releasing them
« Last Edit: May 30, 2015, 03:57:40 PM by Electrk. »

test your stuff before releasing it on this board

couldn't you have said that any less aggresively
no wonder everyone gets scared off...
geez

couldn't you have said that any less aggresively
no wonder everyone gets scared off...
geez

you're right that was pretty rude
« Last Edit: May 30, 2015, 05:06:20 PM by Electrk. »

Congrats, we're now teaching kids to lie.
On topic: neat little script, but it's kind of useless, and easy to bypass. If you deny, will you be kicked?

You either disconnect or agree really.

Teaching kids to lie? It's more of a fail safe honestly.