Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- integer lh1=0;
- integer lh2=0;
- string msg1 = "Suri, tp us to the skybox";
- string msg2 = "Suri, tp me to the skybox";
- teleportAll() {
- list avatarsInRegion = llGetAgentList(AGENT_LIST_PARCEL, []);
- integer numOfAvatars = llGetListLength(avatarsInRegion);
- integer index;
- while (index < numOfAvatars) {
- key id = llList2Key(avatarsInRegion, index);
- llRequestPermissions(id,PERMISSION_TELEPORT);
- ++index;
- }
- }
- default
- {
- state_entry(){
- lh1 = llListen(0, "", NULL_KEY, msg1);
- lh2 = llListen(0, "", NULL_KEY, msg2);
- }
- listen( integer canal, string name, key id, string msg ) {
- if (msg == msg1) {
- teleportAll();
- } else {
- llRequestExperiencePermissions(id, "");
- }
- }
- run_time_permissions(integer perm)
- {
- llOwnerSay(llGetPermissionsKey());
- if (PERMISSION_TELEPORT & perm) {
- llOwnerSay(llGetPermissionsKey());
- llTeleportAgent(llGetPermissionsKey(), "skybox", ZERO_VECTOR, ZERO_VECTOR);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement