“LlAddToLandBanList”的版本间的差异
| 第3行: | 第3行: | ||
{{函数详情 | {{函数详情 | ||
| − | |函数名=Function: llAddToLandBanList( key avatar, float hours ); | + | |函数名=[[Function]]: llAddToLandBanList( [[key]] avatar, [[float]] hours ); |
| − | |Add | + | |Add ’’’avatar’’’ to the land ban list for ’’’hours’’’, or indefinitely if hours is zero. |
| − | |||
| − | |||
| − | |||
| − | + | *key [[avatar]] – avatar [[UUID]] | |
| + | * float [[hours]] | ||
| − | + | |注意事项= | |
| + | *This function causes the script to sleep for 0.1 seconds. | ||
| + | *Must be owned by the land owner. | ||
| − | + | ‘’’’’Important Issues’’’’’ | |
| − | + | ~ [[All Issues]] ~[[ Search JIRA for related Bugs]] | |
| − | |||
| − | |||
| − | |||
| − | |||
| 第116行: | 第112行: | ||
|相关函数= | |相关函数= | ||
| − | [llAddToLandPassList] | + | [[llAddToLandPassList]] |
| − | + | [[llRemoveFromLandBanList]] | |
| − | [llRemoveFromLandPassList] | + | [llRemoveFromLandPassList]] |
| − | [llResetLandBanList] | + | [[llResetLandBanList]] |
| − | [llResetLandPassList] | + | [[llResetLandPassList]] |
}} | }} | ||
| + | |||
| + | |注释 | ||
| + | ‘’’’’All Issues’’’’’~ *[http://wiki.secondlife.com/wiki/LlAddToLandBanList 原网站] | ||
2020年3月1日 (日) 12:56的版本
| 首页 | 函数 | 事件 | 类型 | 操作符 | 常数 | Flow Control | Script Library | Categorized Library | Tutorials |
| 函数名 |
|---|
| Function: llAddToLandBanList( key avatar, float hours ); |
| 无 |
| 无 |
| 注意事项 |
|---|
*This function causes the script to sleep for 0.1 seconds.
‘’’’’Important Issues’’’’’ ~ All Issues ~Search JIRA for related Bugs |
| 示例 |
|---|
示例1
// This is not a complete solution, requires full avatar names to work - even for unbanning someone!
// This is meant only as an example of the land ban and pass management functions.
// free to copy, use, modify, distribute - just don't ask me to debug your modified code. ;-)
//
// Commands are:
// /5 ban:full_avatar_name
// /5 tempban:full_avatar_name
// /5 unban:full_avatar_name
// /5 pass:full_avatar_name
// /5 unpass:full_avatar_name
// /5 clearban
// /5 clearpass
string command;
default
{
state_entry()
{
llListen(5, "", llGetOwner(), "");
}
on_rez(integer param)
{
llResetScript();
}
listen(integer chan, string name, key id, string message)
{
if (command != "")
{
llOwnerSay("Sorry, still processing last command, try again in a second.");
}
list args = llParseString2List(message,[":"],[]);
command = llToLower(llList2String(args,0));
if (command == "clearbans")
{
llResetLandBanList();
}
if (command == "clearpass")
{
llResetLandPassList();
}
else
{
llSensor(llList2String(args,1),NULL_KEY,AGENT,96,PI);
}
}
no_sensor()
{
command = "";
}
sensor(integer num)
{
integer i = 0;
for (; i < num; ++i)
{
if (command == "ban")
{
// Ban indefinetely
llAddToLandBanList(llDetectedKey(i),0.0);
}
if (command == "tempban")
{
// Ban for 1 hour.
llAddToLandBanList(llDetectedKey(i),1.0);
}
if (command == "unban")
{
llRemoveFromLandBanList(llDetectedKey(i));
}
if (command == "pass")
{
// Add to land pass list for 1 hour
llAddToLandPassList(llDetectedKey(i),1.0);
}
if (command == "unpass")
{
llRemoveFromLandPassList(llDetectedKey(i));
}
}
command = "";
}
}
|
| 相关函数 |
|---|
| llAddToLandPassList
llRemoveFromLandBanList [llRemoveFromLandPassList]] llResetLandBanList llResetLandPassList |
| 相关事件 |
|---|
| 无 |
|注释 ‘’’’’All Issues’’’’’~ *原网站