LlRemoveFromLandPassList/fr: Difference between revisions
Jump to navigation
Jump to search
Gally Young (talk | contribs) Localized to french |
relecture et re-synchronisation |
||
| (One intermediate revision by one other user not shown) | |||
| Line 9: | Line 9: | ||
|spec | |spec | ||
|caveats | |caveats | ||
|examples=< | |examples=<lsl> | ||
// Ce script necessite le nom complet de l'avatar pour fonctionner | |||
// | // il est fourni comme exemple d'utilisation des fonctions de controle d'acces. | ||
// | |||
// | // Les commandes de chat sont: | ||
// | // /5 ban:nom_complet | ||
// | // /5 tempban:nom_complet | ||
// | // /5 unban:nom_complet | ||
// | // /5 pass:nom_complet | ||
// /5 unpass:nom_complet | |||
// | // /5 clearban | ||
// | // /5 clearpass | ||
string | string command; | ||
default | default | ||
{ | { | ||
state_entry() | |||
{ | { | ||
llListen(5, "", llGetOwner(), ""); | |||
} | } | ||
on_rez(integer param) | |||
{ | { | ||
llResetScript(); | |||
} | } | ||
listen(integer | listen(integer chan, string name, key id, string message) | ||
{ | { | ||
if ( | if (command != "") | ||
{ | |||
llOwnerSay("Desole, le traitement de la commande precedente est encore en cours, retentez dans un moment."); | |||
} | |||
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); | |||
} | } | ||
} | } | ||
sensor(integer | no_sensor() | ||
{ | |||
command = ""; | |||
} | |||
sensor(integer num) | |||
{ | { | ||
integer i | integer i; | ||
for (;i< | for (i=0; i< num; ++i) | ||
{ | { | ||
if ( | if (command == "ban") | ||
{ | |||
// Bannir indefiniment un avatar | |||
llAddToLandBanList(llDetectedKey(i),0.0); | |||
} | |||
if (command == "tempban") | |||
{ | |||
// Bannir un avatar pour 1h | |||
llAddToLandBanList(llDetectedKey(i),1.0); | |||
} | |||
if (command == "unban") | |||
{ | |||
// Supprimer le bannissement d'un avatar | |||
llRemoveFromLandBanList(llDetectedKey(i)); | |||
} | |||
if (command == "pass") | |||
{ | |||
// Ajouter un avatar a la liste d'acces | |||
llAddToLandPassList(llDetectedKey(i),1.0); | |||
} | |||
if (command == "unpass") | |||
{ | { | ||
// Supprimer un avatar de la liste d'acces | |||
llRemoveFromLandPassList(llDetectedKey(i)); | |||
} | } | ||
} | } | ||
command = ""; | |||
} | } | ||
} | |||
</lsl> | |||
} | |||
</ | |||
|helpers | |helpers | ||
|also_header | |also_header | ||
Latest revision as of 05:55, 29 May 2009
| LSL Portail Francophone | LSL Portail Anglophone | Fonctions | Évènements | Types | Operateurs | Constantes | Contrôle d'exécution | Bibliothèque | Tutoriels |
Description
Fonction: llRemoveFromLandPassList( key avatar );| 311 | N° de fonction |
| 0.1 | Delais |
| 10.0 | Energie |
Supprime un avatar de la liste de droit de passage.
| • key | avatar |
Avertissements
- Cette fonction fait dormir le script pendant 0.1 secondes.
Exemples
<lsl> // Ce script necessite le nom complet de l'avatar pour fonctionner // il est fourni comme exemple d'utilisation des fonctions de controle d'acces. // // Les commandes de chat sont: // /5 ban:nom_complet // /5 tempban:nom_complet // /5 unban:nom_complet // /5 pass:nom_complet // /5 unpass:nom_complet // /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("Desole, le traitement de la commande precedente est encore en cours, retentez dans un moment.");
}
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;
for (i=0; i< num; ++i)
{
if (command == "ban")
{
// Bannir indefiniment un avatar
llAddToLandBanList(llDetectedKey(i),0.0);
}
if (command == "tempban")
{
// Bannir un avatar pour 1h
llAddToLandBanList(llDetectedKey(i),1.0);
}
if (command == "unban")
{
// Supprimer le bannissement d'un avatar
llRemoveFromLandBanList(llDetectedKey(i));
}
if (command == "pass")
{
// Ajouter un avatar a la liste d'acces
llAddToLandPassList(llDetectedKey(i),1.0);
}
if (command == "unpass")
{
// Supprimer un avatar de la liste d'acces
llRemoveFromLandPassList(llDetectedKey(i));
}
}
command = "";
}
} </lsl>
Voir également
Fonctions
| • | llAddToLandBanList | – | Ajoute un avatar à la liste des bannis | |
| • | llAddToLandPassList | – | Ajoute un avatar à la liste des droits de passage | |
| • | llRemoveFromLandBanList | – | Supprime un avatar de la liste bannis | |
| • | llResetLandPassList | – | Réinitialise la liste des droits de passage | |
| • | llResetBanPassList | – | Réinitialise la liste des bannis |
Vous cherchez encore des informations ? Peut-être cette page du LSLwiki pourra vous renseigner.